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 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示