Forum Moderators: coopster

Message Too Old, No Replies

PHP Exec File Paths

On a Windows 2003 server (sorry)

         

vordmeister

6:15 pm on Mar 1, 2009 (gmt 0)

10+ Year Member Top Contributors Of The Month



On the off-change than anyone uses PHP exec() on a Windows 2003 server.

Using Imagemagik this works:
exec("convert D:/www/image.bmp D:/www/image.gif")

But this doesn't:
exec("C:\\Programs\\ImageMagick\\convert.exe D:/www/image.bmp D:/www/image.gif")

A call to a batch file works on my 2000 home testing server running apache, but not on the 2003 server. I've tried various different ways of writing the file path to the executable but none have been successful.

I'm running a dedicated windows server using PHP in FastCGI mode, and have allowed the site permissions to cmd.exe and the files I'm trying to run. Can't see anything useful showing in PHP error logs or the event log on the server. Not a lot on the web either which makes me think I'm missing something simple.

Anyone any ideas for things to try?

vordmeister

10:02 pm on Mar 1, 2009 (gmt 0)

10+ Year Member Top Contributors Of The Month



Scratch that - turned out to be a permissions issue not a path issue, though the code I posted might not have worked either.

Haven't got to the bottom of it yet, but making the average web user an administrator seems to work. Not a long term solution....