Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 7th February 2012, 12:33
Skyflash Skyflash is offline
Member
 
Join Date: Sep 2011
Posts: 55
Thanks: 4
Thanked 2 Times in 2 Posts
Send a message via Skype™ to Skyflash
Default ISPConfig 3 don't set open_basedir directive in websites

After an upgrade (currently, ISPConfig 3.0.4.2) i have a strange problem:

if i edit a website (that has FastCGI enabled), or a create e NEW website with FastCGI enabled, ISPConfig don't set the open_basedir directive in .php-fcgi-starter or, if present, deletes it

Example: I edit this site (not important what item i edit; important thai i click on Save):

Options tab, PHP open_basedir directive is:
Code:
/var/www/clients/client2/web14/web:/var/www/clients/client2/web14/tmp:/var/www/acmitest.biz/web:/srv/www/acmitest.biz/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin
The .php-fcgi-starter changes to:

Code:
#!/bin/sh
PHPRC="/etc/php5/cgi/"
export PHPRC
PHP_DOCUMENT_ROOT="/var/www/clients/client2/web14"
export PHP_DOCUMENT_ROOT
# The variable PHP_FCGI_CHILDREN is onyl useful for lighty or nginx as apache
# mod_fcgi will control the number of childs themself and never use the additional processes.
# PHP_FCGI_CHILDREN=1
# export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=1000
export PHP_FCGI_MAX_REQUESTS
exec /usr/bin/php-cgi \
 $1
~
So i manually edit the file, and i add this directives:
Code:
open_basedir="/var/www/clients/client2/web14/web:/var/www/clients/client2/web14/tmp:/var/www/acmitest.biz/web:/srv/www/acmitest.biz/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin" \
-d upload_tmp_dir=/var/www/clients/client2/web14/tmp \
-d session.save_path=/var/www/clients/client2/web14/tmp \
Starter file now appears like this:
Code:
#!/bin/sh
PHPRC="/etc/php5/cgi/"
export PHPRC
PHP_DOCUMENT_ROOT="/var/www/clients/client2/web14"
export PHP_DOCUMENT_ROOT
# The variable PHP_FCGI_CHILDREN is onyl useful for lighty or nginx as apache
# mod_fcgi will control the number of childs themself and never use the additional processes.
# PHP_FCGI_CHILDREN=1
# export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=1000
export PHP_FCGI_MAX_REQUESTS
exec /usr/bin/php-cgi \
open_basedir="/var/www/clients/client2/web14/web:/var/www/clients/client2/web14/tmp:/var/www/acmitest.biz/web:/srv/www/acmitest.biz/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin" \
-d upload_tmp_dir=/var/www/clients/client2/web14/tmp \
-d session.save_path=/var/www/clients/client2/web14/tmp \
 $1
If a make any change to the configuration document (or i click Save) (first image), the open_basedir "resets" to the initial code i wrote in this post and every open_basedir directive is lost

I don't know if may be helpful, but in Monitor tab, System logs section of ISPconfig, i found this:
Code:
Feb 7 12:37:35 server01 kernel: [66835.543600] php-cgi[28180]: segfault at 7fe1d9b74809 ip 00000000006b7a29 sp 00007fffaf81a4c0 error 4 in php5-cgi[400000+74c000]
Feb 7 12:37:47 server01 kernel: [66847.472671] php-cgi[28191]: segfault at 7fe8867d4009 ip 00000000006b7a29 sp 00007fff69dcc770 error 4 in php5-cgi[400000+74c000]
Feb 7 12:37:59 server01 kernel: [66860.196892] php-cgi[28197]: segfault at 7f44eafbfa09 ip 00000000006b7a29 sp 00007fffa2d901a0 error 4 in php5-cgi[400000+74c000]
Someone can help me, please?

Last edited by Skyflash; 7th February 2012 at 12:49.
Reply With Quote
Sponsored Links
  #2  
Old 7th February 2012, 14:36
Skyflash Skyflash is offline
Member
 
Join Date: Sep 2011
Posts: 55
Thanks: 4
Thanked 2 Times in 2 Posts
Send a message via Skype™ to Skyflash
 
Default

The creation issue is solved. In System -> Server Config -> Web i had Security Level set to "Medium".

I've found the fcgi master template in /usr/local/ispconfig/server/conf/php-fcgi-starter.master and i saw an IF condition:

Code:
<tmpl_if name="security_level" op="==" value="20"> -d open_basedir="<tmpl_var name='open_basedir'>" \
-d upload_tmp_dir=<tmpl_var name='document_root'>/tmp \
-d session.save_path=<tmpl_var name='document_root'>/tmp \
Set Security Level to High and now the fcgi starter file is correct
Reply With Quote
The Following User Says Thank You to Skyflash For This Useful Post:
pititis (7th February 2012)
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
setup-swraid1-on-a-running-lvm-system-ubuntu-10.04 - SDB dont boot but SDA yes lucho115 HOWTO-Related Questions 11 20th June 2011 17:22
PHP warnings after upgrade to ISP config 3.03 stevegjacobs Installation/Configuration 5 30th October 2010 14:31
ISPCONFIG 3 - Issue creating websites after assigning an IP Address michael2010 Installation/Configuration 3 8th October 2010 08:07
Ftp problems timeout reny2000 General 6 23rd December 2009 11:09
ISPConfig 2.3.2-dev released till General 9 4th June 2007 10:46


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


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