php cgi and exec

fmen

Verified User
Joined
Mar 14, 2009
Messages
26
I have build PHP as CGI but now the function exec says with every command like uptime this error: [Thu Apr 16 10:28:37 2009] [error] [client xxx.xxx.xxx.xxx] sh: uptime: command not found
This also happens when I do the command convert (yes Imagemagick is installed). Strange enough when I login with the permissions of the exame user I can do the commands through SSH without any problem.

I use DirectAdmin with custombuild. How can I resolve this? Am I required to build PHP to CLI to use the exec command?
 
Enter the full path to the uptime command.

Example: /usr/bin/uptime
 
That is not the problem, but I have already build PHP to CLI because I had some more problems with it like 1.83MB file upload which didn't works. The settings are good, the file upload settings are the exame as the CLI version but it returned on $_FILES['tmp_name'] [error].
 
I have installed the cgi build again on another server and you (scsi) are right that I have to fill in the full path. But I have still another error when I upload a file:
Code:
Array ( [name] => Creek.jpg [type] => image/jpeg [tmp_name] => /home/henk/tmp/phpqdBN5y [error] => 0 [size] => 264409 )

What could be the problem?
 
If the problem was related to PHP-CGI I suggest you write here how did you fix it, so that anyone having the same problem can learn from you. :)
 
I don't now that the problem was, I have rebuild it and now the problems are solved :)
 
Back
Top