
|
View Full Version : RH 7.2, PHP and exec()
ffeingol 05-15-2002, 07:43 AM I've got a very wierd problem going on. The box has RH 7.2x, PHP 4.2.1 (also happend with 4.1.2) and Apache 1.3.25. It's an up-to-date kernel.
Anywhere in php where you exec() (or system() or related functions) it won't. We do not get any error from the exec() call, it just to actually exec the program.
The same thing happens with the mail() function. sendmail just never gets called.
I know it's not permissions. The script/programs being exec'ed are 755.
The webserver is running as nobody.
I'm also quite certain it's not the php script. We have the script runninng on an older 6.22 box and it works fine.
HELP!! This is totally baffeling me.
Frank
RutRow 05-15-2002, 09:38 AM Have you checked your php.ini file? Maybe you are in safe mode?
ffeingol 05-15-2002, 09:47 AM Sorry,
It's a dedicated box and we have complete control over it. PHP is not in safe mode.
Frank
anantan 05-15-2002, 01:05 PM Hi,
If i am understand currectly?
after you put exec it would jsut execute and wont give any
out put?
What are you expecting after execute?
-Ananthan
ffeingol 05-15-2002, 01:14 PM Actually, it does not even apper to execute at a unix level.
The person that I'm helping has some php based image gallery software. The software allows you to upload an image, then it exec's some unix image utility software to create thumbnails.
The image utilities are all chmod'ed to 755, so anything should be able to execute them.
To test out the problem, I replaced one of the image utilities with a shell script that just did a echo "testing" >> file.txt. the file.txt was never created, so I'm 99% sure that the script/program was never even executed.
This is driving me totally crazy, as we had this exact same configuration working on an older version of RH. It just stopped working when they moved to a new box with RH 7.2.
Frank
alchiba 05-15-2002, 01:47 PM Frank,
If *you're* stumped, then it's definitely a gnarly problem. ;)
I've got people running the "Gallery" scripts on RH7.2/PHP4.1.2 without a hitch. Plus, my own code runs system() and exec() just fine.
Could still be a PHP config problem. Post/pm/email the php.ini and I'll diff the two for you if you like. Happy to help in any other way.
anantan 05-15-2002, 02:44 PM Frank,
Not sure tey this
Try passthru() and lets see otherwise most probably
with php.ini
-anahtan
ffeingol 05-15-2002, 03:27 PM Passthru gets the exact same results. Nothing.
Frank
(SH)Saeed 05-15-2002, 03:43 PM Why don't you reinstall PHP from the source, maybe that will help?
ffeingol 05-15-2002, 04:01 PM Been there, done that ;)
I'm just about to the point where I'll be hacking up the "c" code to put some of my own debugging info into it.
Frank
StevenG 05-17-2002, 10:33 AM This may not be your problem, but check your config.inc.php file within phpmyadmin.... if it is blank all is looking bad - replace it with a correct version download from sourceforge and edit where necessary.
We had problems with 4.2.0 and all was solved by instaling the following modules - make absolutely 100% sure these modules are installed:-
DBD::MySQL
MIME::Tools
Common fault for perldesk not to install too.
EDIT: forgot, I also had to edit the index.php file line 12 to exclude the call to defaul font() I just commented this out - We use CPanel.
Hope that helps.
ffeingol 05-17-2002, 10:41 AM Dotcomsnz,
No offense, but what are you talking about? This is not a PHPMyAdmin problem. It's a general PHP problem. exec() does not work for anything.
Frank
StevenG 05-17-2002, 10:54 AM Maybe I mis read the question...... oops!
Sorry frank,
Regards
|