problems with system() function

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Zoran_Dimov
Forum Newbie
Posts: 16
Joined: Wed Jun 21, 2006 6:10 pm
Location: Macedonia
Contact:

problems with system() function

Post by Zoran_Dimov »

I am trying to execute DOS command with the function system()

$res=system("c:\Program Files\ImageMagick-6.2.8-Q16\convert.exe"
"x:\web\tmobile-jpg-generator\top_nav.gif"
-density 288 -fill #666666 -font Arial -pointsize 13 -background #ffffff label:"dimov" -resize 80%"x:\web\tmobile-jpg-generator\smile.gif",$retval)

I am running PHP on Apache (Windows)

When i try to execute the same command directly in DOS it is OK

Is there some other function for executing commands??
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

you could try exec().

if you look at the bottom of the description section you'll see some other alternative as well.
Post Reply