md3v
Nov 3 2004, 08:57 AM
All,
Does anyone know how to disable PHP Safe Mode in PHP 4.3.9.
I am playing with the phpSysInfo 2.3 script which requires that safe_mode be turned off and that the include_path contain "."
I would like to do this for one domain and under PHP 4.2.2 this info added to a vhost.conf file within the /conf directory of a client site worked:
==
CREATE: vhost.conf
php_admin_value safe_mode 0
php_admin_flag engine off
php_admin_value open_basedir "/home/httpd/vhosts/domain.net/httpdocs:/"
php_admin_value safe_mode 0
php_admin_flag engine off
php_admin_value open_basedir "/home/httpd/vhosts/domain.net//httspdocs:/"
==
If anyone has input on this I would greatly appreciate it. As usual, SW-Soft is not replying to my emails.
Squire
Nov 3 2004, 01:49 PM
The same method should work with 4.3.9 md3v. Have you rebuilt the domain configuration with /usr/local/psa/admin/sbin/websrvmng -a -v
Also, for the https version you include that part of your directive in a different file. vhost_ssl.conf to be exact, in the same location as you created your vhost.conf file.
md3v
Nov 3 2004, 07:57 PM
Hi,
This does not work, the php file attempts to download rather than execute.
This is purely and issue with PHP 4.3.9 -- this does not occur on PHP 4.3.3 or PHP 4.2.2.
Any other idea's?
If you want to try get the script to run your self download it at
http://phpsysinfo.sourceforge.net/. I anyone can get it working under PHP 4.3.9 ... i'd be surprised.
Squire
Nov 3 2004, 09:18 PM
All that I can tell you is that the vhost.conf method to disable Safe Mode works perfectly for several RHEL servers I run that have 4.3.9 installed on.
I would be checking the PHP install since you indicated in another post that your php.ini file was corrupted. It it was, it's a good bet that something else didn't install correctly also.
md3v
Nov 3 2004, 09:48 PM
Hi,
Did you have to make any modifications to your httpd.conf file/s after installing 4.3.9?
m.
Squire
Nov 4 2004, 06:53 AM
No. I'd made some previous tweaks to httpd.conf (commented out AddDefaultCharset and tweaked the DirectoryIndex a bit) but that should have little to do with PHP. Unless you have multiple index files or something like that.
Personally, for default installs I tend to use the
ART rpms via Yum. It's just easier and Scott really knows his stuff with Plesk systems.
md3v
Nov 4 2004, 07:00 AM
Hi,
I installed PHP 4.3.9 via yum. I've tired everything possible... out of idea's.
Hum, maybe its 4PSA time :-)
md3v
Nov 4 2004, 09:28 AM
Still no luck... 'Pink' on the Plesk forums suggested:
QUOTE
Hi,
if I am not mistaken,
quote:
--------------------------------------------------------------------------------
php_admin_value safe_mode 0
--------------------------------------------------------------------------------
it should be:
php_admin_flag safe_mode Off
Also why do you want to disable PHP:
quote:
--------------------------------------------------------------------------------
php_admin_flag engine off
--------------------------------------------------------------------------------
Pink
The problem is - the script I listed at the beginning of this thread worked under PHP 4.2.2.
Any other thoughts?
md3v
Nov 6 2004, 09:19 AM
I spent ~4 hours working on this and have given up.
The same script works fine under PHP 4.2.2 and PHP 4.3.3 but does not work under PHP 4.3.9.
I would uninstall PHP 4.3.9 to return to the old version but have been warned this could break Plesk.
In case anyone else runs into this issue and finds a solution ... please let me know.
Thanks for your help Mr. Pink (
http://forum.plesk.com/showthread.php?s=&p...85995#post85995)
md3v
Nov 8 2004, 11:14 AM
Hi...
It works...
I disabled safe_mode in /etc/php.ini
Then added a vhost.conf file with:
==
php_admin_flag safe_mode off
php_admin_value open_basedir none
==
Then /usr/local/psa/admin/bin/websrvmng -v.
It works ... thanks much Pink!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.