Re: exec command fails in php, works in the command line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ernst@xxxxxxxxxxxxxxx wrote:
I don't want to crowd the list up with dead ends, so I was trying to respond only to you.
<snip>

You'll get more chances at finding the solution to this with the list's eyes on it rather than just myself. Plus, it provides an archive of the problem and the (if we find it) solution to the next person who comes along.

</snip>
I'm not calling a php program from exec, I'm calling ecasound and convert. For example, in the php code:
<snip>

Understood, but if the web server doesn't have permission to execute the app, it won't.

</snip>
exec("convert $internalpath/$filename -resize {$thumbWidth}x{$thumbHeight} $internalpath/$thumbname", $out, $err);

doesn't always work, but with variables substituted on the command line:
<snip>

Are you sure that the variables have value, and it is the value you want? What is stored in $err when you try to execute this? Echo that out, and it may tell you exactly what's going wrong.

</snip>
bash:~> convert futon.jpg -resize 240x180 futon_thumb.jpg

will always work.

The same is true, on a different server, of my exec that calls ecasound, an mp3 processing utility. Both of these could conceivably use a lot of resources, which is why I think php is killing them off some of the time.
<snip>

Try increasing the memory limit in your script with ini_set.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
john@xxxxxxxxxxxx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux