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?
 

scsi

Verified User
Joined
Aug 19, 2008
Messages
4,695
Enter the full path to the uptime command.

Example: /usr/bin/uptime
 

fmen

Verified User
Joined
Mar 14, 2009
Messages
26
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].
 

fmen

Verified User
Joined
Mar 14, 2009
Messages
26
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?
 

tillo

Verified User
Joined
Oct 28, 2007
Messages
862
Location
Switzerland
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. :)
 

fmen

Verified User
Joined
Mar 14, 2009
Messages
26
I don't now that the problem was, I have rebuild it and now the problems are solved :)
 
Top