Question

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?) ]

Était-ce utile?

La solution

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top