Help - Search - Members - Calendar
Full Version: Safe Mode
The Planet Forums > Control Panels > cPanel/WHM > Cpanel/WHM HOWTOs
Habby
How do I turn safe mode on for php?
theuruguayan
you need to edit youir php.ini file.

and enable it.

probably the php.ini is in /usr/lib/, but you can always locate it.

find this in your file:
safe_mode = Off

and change it to on.

restart apache and you will be done.
ohvhost
QUOTE
Originally posted by theuruguayan
you need to edit youir php.ini file.

and enable it.

probably the php.ini is in /usr/lib/, but you can always locate it.

find this in your file:
safe_mode               =       Off

and change it to on.

restart apache and you will be done.


that works for server-wide, but if you need domain specific, you can put the safe_mode in httpd.conf in the virtualhost section for the domain you want (specifying on or off as a value)

[PHP]

ServerAlias www.mydomain.com mydomain.com
ServerAdmin webmaster@mydomain.com
DocumentRoot /home/mydomain/public_html
BytesLog domlogs/mydomain.com-bytes_log
ServerName www.mydomain.com

php_admin_value safe_mode off

User blahblahblah
Group blahblahblah
CustomLog domlogs/mydomain.com combined
ScriptAlias /cgi-bin/ /home/mydomain/public_html/cgi-bin/
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]

[/PHP]
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.