duanlieshuang5330 2012-12-10 16:26
浏览 211
已采纳

在Win7上从PHP运行Photoshop Droplet

I'm trying to put together a proof-of-concept for a commercial project that takes an image file-upload from a web page and outputs an image transformed with various Photoshop filters and a 3rd party commercial filter. Because it's a proof of concept and only available on internal IPs I'm not particularly worried about security. At this point I'd just like to show that it's theoretically possible.

The problem is that I can make a Photoshop Droplet work perfectly, as executed from a CMD prompt using full paths... But when I use the exact same command-line to an exec call in PHP (as verified by debugging with echo), the droplet exe runs (as verified by Sysinternals ProcessExplorer), but Photoshop fails to start, or if it's already running (even as Administrator) it fails to execute the actions in the droplet.

I've tried:

  • Disabling UAC control on the test PC (Win7)
  • Setting all relevant processes to "Run as Administrator" for all users (mydroplet.exe, photoshop.exe, httpd.exe, php.exe)
  • Elevating permissions of httpd.exe
  • No "Safe-Mode" in php.ini
  • Wrapping the droplet execution into a BAT file to be called from PHP exec

Note: The particular image manipulation I'm trying to achieve it too complex for ImageMagik or similar (please no suggestions about this), and the 3rd party filter is only available on Windows. For my tests I'm not using this 3rd party filter. I'm just trying to get the above to work with simple built-in Photoshop filters first. I'm using PS CS3.

In a nutshell... How to execute a Photoshop droplet from PHP (on Win7)?

[ I'm using absolute paths throughout (DOS compatible), and if I run the string passed to exec manually in a CMD prompt it works as expected, so I strongly suspect permissions problems (I had similar problems getting the droplets to work outside of PHP, which I resolved using the instructions at http://helpx.adobe.com/photoshop/kb/troubleshoot-photoshop-droplets-windows.html). Server security is not an issue (at this stage), so ideally I'd like to set everything to have all permissions (like it was in the old easier win95 days! ;-) -- it's just a test box on an internal LAN !!! I can turn it off after my presentation. At least on Linux I could just chmod -R 777 /* -- and reformat the HDD later --- what's the equivalent on Windows7??? (i.e give everything to everybody?) ]

  • 写回答

1条回答 默认 最新

  • duanpacan9388 2012-12-10 16:31
    关注

    I'd say you've changed everything except the "Allow service to interact with desktop" checkbox for the Apache service.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据