PDA

View Full Version : PHP safe_mode



iGoD ReLeNtLeS
07-11-10, 21:37
So currently im using a www.webfusion.co.uk VPS, only the smallest package for now.

Im looking to turn PHP safe_mode off as with is on i cant install any add-ons for IP.Board or Select Skins.

I have tried the httpd.conf this is blank.

also Apache2.conf this has no mention of safe_mode or php_admin_flag safe_mode

also edited php.ini through SSH. to safe_mode off

i have managed to turn off the global environment of safe_mode however still looking to turn the local variable off.

double top might know this one :D

thanks in advance.

PMM
07-11-10, 22:44
just add this to the end of the httpd.conf file and restart apache, obviously set directory to suit.

Example...

<Directory /var/www/html>
php_admin_flag safe_mode off
</Directory>

iGoD ReLeNtLeS
07-11-10, 23:21
where should i be pointing the directory to? the php.ini file?

Smifis
07-11-10, 23:27
Whatever public html is.

the root of your website.

DoubleTop
07-11-10, 23:44
lots of questions ... which php.ini file have you edited. Those VPS setups come with 4&5 installed iirc, so you'll need /etc/php5/apache2/php.ini

Now the more pertinent question to why safe_mode off is required? There are always ways to code round the security model of safe_mode, sendmail is normally the one, so add a -f to the command. The other *could* be execution stuff, as you have ssh, do things using it, not from php scripting. Anything else, welcome to the world of linux permissions :lol:

DT.

iGoD ReLeNtLeS
08-11-10, 22:37
lots of questions ... which php.ini file have you edited. Those VPS setups come with 4&5 installed iirc, so you'll need /etc/php5/apache2/php.ini

Now the more pertinent question to why safe_mode off is required? There are always ways to code round the security model of safe_mode, sendmail is normally the one, so add a -f to the command. The other *could* be execution stuff, as you have ssh, do things using it, not from php scripting. Anything else, welcome to the world of linux permissions :lol:

DT.

This is for Invision Power Board so we can add more skins and add-ons/plug-ins. It says safe_mode must be off before you can go any further :(

i have tried PMMs snippet in the httpd.conf and restarted apache2, however this didnt work and i have pointed it at the httpdocs folder where the root of my site is, no avail as of yet.

the master value is off, however the local value remains on.

EDIT: solved. thanks for your help guys :)