PHP Safe Mode Issues

Get help on web editors (Frontpage, Dreamweaver) and web languages (HTML, ASP, PHP).
Post Reply
Richard_
Registered User
Posts: 2295
Joined: 18 May 2003, 02:00
Location: Durban, South Africa

PHP Safe Mode Issues

Post by Richard_ »

I am having huge issues with PHP on a VPS I'm running. I have set safe mode to off in my php.ini file, and when I run phpinfo() in any web directory it tells me that the master value for safe mode is indeed off. However, the local value for safe mode is set to on, and this is causing me huge amounts of grief since the local value overrides the master value. I need safe mode off, but for the life of me I can't get it right.

I have root access to the server, so I have no limitations as to which config files I can edit. I've tried creating a .htaccess file containing php_flag safe_mode off but this seems to have no effect. I have also tried the route of creating a separate php.ini file in my appropriate web directory, setting safe_mode = off but this also has no effect on the local value of safe mode.

Server is a Linux box running CentOS and PHP 4.3.9

Help of any sort would be greatly appreciated. Thanks.

[edit] The only possibility I've come up with is that I have a rogue .htaccess file somewhere that is switching safe mode on, but if that were the case, then wouldn't the effects of that .htaccess file be limited to the directory in which it resides?
Richard_
Registered User
Posts: 2295
Joined: 18 May 2003, 02:00
Location: Durban, South Africa

Post by Richard_ »

Problem solved:


cd /etc/httpd/conf/siteNo
(SiteNo is the site no of the domain to turn safe mode off, eg. "site1")
Create new file called php and populate it with the following data:
php_admin_flag safe_mode "Off"

[edit] Scratch that. I just removed the files i created and it still works fine. No clue what i did to sort it out... :?
Post Reply