PDA

View Full Version : Disabling PHP safe mode in Fedora php.ini??


LittleBrother
2004-08-26, 22:10 PM
Hi,

Fedora

I run phpinfo.php and shows my server as SAFE MODE ENABLED and it is causing me tremendous grief with 2 of my applications. I have edited the php.ini in root and also one down in the /home/virtual/admin4/etc folder and also another down in /site4/etc/ . That is the tree my web is in. I own the whole server but I cant seem to get PHP safe mode disabled. I even rebooted my server each time.

It displays LOCALLY=ON and MASTER=OFF under phpinfo.php

SEE HERE
http://www.acousticplayermagazine.com/phpinfo.php

I am pulling what hair I have out. Any tips for a poor slob? I edited those files and found one of them with safe mode on in the /admin4/etc folder but all the others I found were already apparently disabled.

Thanks
Doug

Tino Didriksen
2004-08-26, 22:41 PM
Safe Mode can also be set by Apache's httpd.conf per vhost through php_admin_flag and php_admin_value directives.

Check your various Apache confs for those...

LittleBrother
2004-08-26, 23:01 PM
I have. Heck I cant find the setting in the file at all I even searched the file. So I am not finding the proper httpd.conf and I also have found many php.ini files from root etc and down under virtual theres several. I will keep swinging but this is highly frustrating that this is not a simple location and setting and I have visited endless discussion threads and everyone basically says the same thing. I have edited as many php.ini files as I can find and all OFF. I cant find this setting in the httpd.confs at all . Brand new Fedora server.

The site is under virtual folder as site 4. There are site4 folders where my web lives down below and then a folder thats my domain name and also one that says admin4. All have etc folders.

Anyone have a hammer ? lol,

Thanks
Doug

dogriley
2004-08-26, 23:14 PM
Even more ganular then vhost level disabling, maybe just modifying particular features....

Safe mode is there for a reason. What particularly are you trying to do that safe mode doesn't like?

Maybe a chisel can be used rather than a sledgehammer??

Is it external directory access, program access etc?

What exactly doesn't work with safe mode?

:poke:

LittleBrother
2004-08-26, 23:30 PM
Hi dogriley,

My forum and my review software both die with UID 509 not being able to read data files in my web folders with a path that starts with /home and goes down to my web folders.

It appears this is normal with safe mode on and my software vendors clearly state I must have safe mode disabled to be able to run their scripts and update their thumbnail files and other things.

I just added safemode file with recommendations from other threads and when I restart httpd it errors not liking the param
php_admin_flag safe_mode off

Dang, I am really missing it. It appears that solutions for others are not working for me. I restart apache and run phpinfo and the local setting is still on which tells me the specific site is enabled. I finally gave up and opened a support ticket but I sure would love to fix this myself.

Thanks,
Doug

LittleBrother
2004-08-26, 23:45 PM
I got it. I had to delete safemode and .safemode.swp then reduce my clients setting to 256 to get rid of error. Then I restarted and now phpinfo shows OFF and OFF

THANK GOD!

/etc/httpd/conf/site4/safemode

contains

php_admin_flag safe_mode off

Thanks for the responses!!!!

Doug