Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Feature Requests

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th January 2012, 22:41
erosbk erosbk is offline
Senior Member
 
Join Date: Mar 2011
Posts: 337
Thanks: 49
Thanked 36 Times in 30 Posts
Default PHP open_basedir variables

As open_basedir can't follow symlinks and it uses real paths to set environment restriction, if someone like me moves /var/www to /mydata/www and creates a symlink /var/www -> /mydata/www, and an app like wordpress (or others) reads real path instead symlink path, that path will be outside open_basedir default path of ispconfig (which points to /var/www/...).

In order to fix this, and allow a "template" path more usefull to be used in "PHP open_basedir" in server config two variables must be defined:

e.g. /mydata/www/clients/client[client_id]/web[website_id]/web,....other paths

Variables to be implemented should be client_id and website_id

In ISPConfig 3.0.3.3, this was the changes I had to make (I think that in 3.0.4.2 this should work too)

File: /usr/local/ispconfig/interface/web/sites/web_domain_edit.php
At line 430, add this:
Code:
// BOC 1: Agrega placeholders client_id y website_id a php_open_basedir
                $php_open_basedir = str_replace("[client_id]",$client_id,$php_open_basedir);
                $php_open_basedir = str_replace("[website_id]",$this->id,$php_open_basedir);
// EOC 1: Agrega placeholders client_id y website_id a php_open_basedir
File: /usr/local/ispconfig/interface/web/admin/templates/server_config_web_edit.htm
At line 60, maxlength="255" should be modified to maxlength="500"

I can't remember if I had to modify something else, but the core of the feature to be implemented is posted above.

Could this be implemented?

Thanks in advance
Reply With Quote
Sponsored Links
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
Only Problems since Updating from 3.0.3.3 to 3.0.4.1 mbay General 4 17th May 2012 13:56
ubuntu and nginx delgado2061 Installation/Configuration 0 28th November 2011 00:36
Problem with services!! banzaiwebstudio.com Installation/Configuration 7 19th May 2010 22:13
Unable to install ISPConfig bdonecker Installation/Configuration 21 26th May 2009 09:20
Apache2 Freezes celtic Server Operation 31 28th May 2007 18:18


All times are GMT +2. The time now is 00:27.


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