Help - Search - Members - Calendar
Full Version: Taking PHP out of safe mode - for one domain/user
The Planet Forums > Control Panels > Plesk
Mart
I need to take PHP out of safe mode for my main site, but for hosted sites I need PHP in safe mode (for obvious reasons)

How on earth do you do it?
KyleKL
Any specific reason? attaching files in vBulletin? If so you can add a vhost.conf file...

This is a known issue with plesk/php
Mart
I want to execute a perl script using the command line from PHP, when I do, I get this error:

"Warning: Cannot execute using backquotes in safe mode"
webarama
In /usr/local/psa/home/vhosts/domain.com/conf/vhost.conf put this


php_admin_value safe_mode 0


(replacing domain.com with the real domain, and replacing any paths that may be different on your server)

Then run

/usr/local/psa/admin/sbin/my_apci_rst
Mart
I can't seem to find vhost.conf in /usr/local/psa/home/vhosts/domain.com/conf/. For that matter, I can't seem to find any files on any domains in the conf folder.

Any ideas?


Do you think there's much of an issue of turning PHP Safe Mode off completely on the whole server? What security risks does this bring? A lot of software that is being installed by customers requires safe mode off (a popular request being vCard - http://www.belchiorfoundry.com/vcard/)
Ales
vhost.conf file is not there by default, since it's not needed. Just create it and add the lines you need. If it doesn't work, check the permissions of the file first.
wirematter
I am having the smae problem but the above instructions did not solve the problem. What permission must this vhost.conf file be? I created the file using my root. Do I have to chown this vhost.conf file?

Many thanks!
Ales
User root, group root works for me.

I don't use it to get the php out of safe mode, so I can't tell you if the directive should work or not... it looks ok.

Ales
WebHS
I don't have /usr/local/psa ! Is that for Plesk users only? I run Ensim. Pls help!
NightHawk
QUOTE
Originally posted by WebHS
I don't have /usr/local/[B]psa ! Is that for Plesk users only? I run Ensim. Pls help! [/B]


yes...that is for plesk users only....as psa from the path above...is plesk! (this is the plesk section of the forum btw, if you check the enism section there are instructions for doing that to an ensim)
Ronny
wirematter, try


php_admin_value safe_mode 0
php_admin_value open_basedir "/usr/local/psa/home/vhosts/domain.com/httpdocs:/tmp"


Make sure it only spans 4 lines.
Rich2k
A couple of notes for this

The PSA standard (and some rpm installations I have seen) use /usr/local/psa

However many rpm installations use /home/httpd/vhosts/

Also for vhost.conf the following config variable which can be used to give php total access (if you do that make sure your scripts are secure) to your hard disk. However this broke in php 4.3.0 and php 4.3.1 but it will be fixed again in php 4.3.2

php_admin_value open_basedir /
WebHS
Ops, wrong Board.... sorry icon_smile.gif
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.