safe_mode

expream

Verified User
Joined
Sep 17, 2005
Messages
52
Hello all!

So what about safe_mode in php? Who use safe_mode? And who dont? why? When I switch safe_mode to 'on' I have the following problems:

1. I can not use uebimail.
2. I can not use squirrelmail
3. I can not use PEAR...

any solution?

Max.
 
Just turn on safe_mode for all user accounts while leaving the master install with safe_mode off.
 
Yes.. I know.. but I think here to write about it, is better... so the next problem: PEAR does not work with safe_mode = on!!! Users can not use pear :( any ideas? or no one make safe_mode on? and what is with webmails? still no solutions?
 
To get the webmails working with safe mode enabled just add this to a custom virtual_host.conf:

<Directory /var/www/html>
php_admin_value safe_mode 0
</Directory>

This switches off safe mode for phpmyadmin and the webmails but everything else is still in safe mode if it is enabled.

I have also attached a custom virtual_host.conf that enables open_basedir and safe_mode (if the da setting is enabled for safe mode) for everything except /var/www/html

Just place this file in the following directory and restart apache:

/usr/local/directadmin/data/templates/custom/
 

Attachments

HH-Steve

Thank you! It is a great and simple solution! :) :) :)
Maybe you can also help with PEAR? users can not include("PEAR.php")...
 
I don't know about the pear solution as I have never come across it. Just an idea, you could try to make the location of pear excempt from safe_mode and open_basedir.

Give it a try and see if it works.
 
Back
Top