#1  
Old 22nd March 2007, 11:17
gilas gilas is offline
Member
 
Join Date: Jun 2006
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default apache directives fails...

Hi Falko and Folks,
great program ISPConfig, but another little problem:

when I define a new site I add the following apache directives:

php_admin_value open_basedir '/var/www/prova2 mysite.it/web:/tmp:/var/www/typo3_src'

all is OK, but when I switch to PHP_SAFE to ON, the file:

/etc/apache2/vhosts/Vhosts_ispconfig.conf

ignore my directives because the order is wrong, my directives are BEFORE the directives inserted automatically through the option PHP_SAVE setted.

This is the output:

<VirtualHost XXX.XXX.XXX.XXX:80>
php_admin_value open_basedir '/var/www/prova2.mysite.it/web:/tmp:/var/www/typo3_src'

(... skipped...)

php_admin_flag safe_mode On
php_admin_value open_basedir /var/www/web1/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /var/www/web1/phptmp/
php_admin_value session.save_path /var/www/web1/phptmp/


this is very *annoying* because safe_mode On option is set AFTER my directives, so that:

1. if I configure php.ini adding in it :
php_admin_value open_basedir '/var/www/prova2.mysite.it/web:/tmp:/var/www/typo3_src'
doesn't work because Vhosts file config override it

2. if I put my directives these will be overriden and has not effect

The only way is to change manually the Vhosts config file but this is a mad idea.....

My suggestion is to add an option so that I can decide the order (after or before the other directives automatically inserted) or this is a bug?!?

Thanx
Reply With Quote
Sponsored Links
  #2  
Old 22nd March 2007, 11:18
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,507
Thanks: 813
Thanked 5,266 Times in 4,129 Posts
Default

Just add these lines to the apche directives field too and leave safemode disabled:

php_admin_flag safe_mode On
php_admin_value open_basedir /var/www/web1/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /var/www/web1/phptmp/
php_admin_value session.save_path /var/www/web1/phptmp/
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 22nd March 2007, 11:45
gilas gilas is offline
Member
 
Join Date: Jun 2006
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default doesn't work...

(!) now the problem is inverse...

these are the lines... inserted BEFORE

php_admin_flag safe_mode On
php_admin_value open_basedir '/var/www/web1/web:/tmp:/var/www/typo3_src'
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /var/www/web1/phptmp/
php_admin_value session.save_path /var/www/web1/phptmp/
<skip lines...>

but AFTER ISPconfig puts:

php_admin_flag safe_mode Off

.........................................

in this way happens that the LAST command (after my lines) disable
safe_mode setting it to OFF!!!

PATCH: may be the solution stays in: edit the config.lib.php and remove the directive safe_mod Off, so that ISPConfig doesn't do anything and the settings referrs to /etc/php4/apache2/php.ini settings?!?

thank you...


***** I GOT NO ANSWER SO I PATCHED AS FOLLOWS ***

1. edit /root/ispconfig/scripts/lib/config.lib.php
2. look for this lines and comment the last:

if($web["web_php_safe_mode"]){
$php .= "\nphp_admin_flag safe_mode On
php_admin_value open_basedir ".$mod->system->server_conf["server_path_httpd_root
"]."/"."web".$web["doc_id"]."/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir ".$mod->system->server_conf["server_path_httpd_ro
ot"]."/"."web".$web["doc_id"]."/phptmp/
php_admin_value session.save_path ".$mod->system->server_conf["server_path_httpd
_root"]."/"."web".$web["doc_id"]."/phptmp/";
} else {
//$php .= "\nphp_admin_flag safe_mode Off";
}

so that you disable the writing 'php_amin_flage safe_mode Off' into the file:
/etc/apache2/vhosts/Vhosts_ispconfig.conf

then edit your php.ini file:

/etc/php4/apache2/php.ini

ed leave the flag

safe_mode = off

In this way, when you turn off via web the conf for your site php will use the default options read from php.ini.

Don't forget to put in safe_mode On your site and for the others disable safe_mode via web and add the directives you need as described above.

Bye

Last edited by gilas; 23rd March 2007 at 13:36.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
Apache Directives vs PHP Safe Mode heri Installation/Configuration 1 11th May 2006 18:07
New way to handle co-domain rewrite + bugfix of apache directives Norman Feature Requests 4 11th May 2006 00:25
Problem with the installation of Dokeos (LMS) in ISPConfig jofranco General 4 28th April 2006 00:45
from http to https after installation? Mahir Installation/Configuration 25 7th December 2005 20:40


All times are GMT +2. The time now is 18:12.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.