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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 28th March 2010, 23:44
zetnsh zetnsh is offline
Senior Member
 
Join Date: Aug 2007
Posts: 111
Thanks: 8
Thanked 5 Times in 5 Posts
Default ISPConfig 2 open_basedir problem, PHP 5.2.10/ISPConfig 2.2.35

Hi there,

Trying to deploy a new ISPConfig 2 install as a replacement for an older server. I'm running ISPConfig 2.2.35 on Ubuntu 9.10, with suPHP.

One website I'm trying to get running uses PHP's curl functions, and in particular I'm getting this error:

Code:
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /var/www/web8/....... on line xxx
(details removed for security reasons!

Now, PHPs safe mode is definately NOT turned on for this site, but testing phpinfo() on that server reveals that open_basedir is set to /var/www/web8

That's certainly NOT set anywhere in a php.ini, and it's not set anywhere in Vhosts_ispconfig.conf, so I'm struggling to find where that is being turned on, and it's not anywhere from the website code. On the old server it's migrating from, open_basedir doesn't appear to have a value.

More information: PHP is at version 5.2.10 on the newer ubuntu server, and at 5.1.6 on the older fedora server I'm trying to decommission. On the new server ISPConfig is at version 2.2.35 and the old server at version 2.2.19.

I've also noticed that the newer PHP seems to contain the Suhosin patch (hardened PHP) whilst the old one doesn't. Could that be it?

Any help gratefully received,

Neil

Last edited by zetnsh; 28th March 2010 at 23:48. Reason: Information about Suhosin patch
Reply With Quote
Sponsored Links
  #2  
Old 29th March 2010, 15:42
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Please post the vhost configuration of web8.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 29th March 2010, 17:13
zetnsh zetnsh is offline
Senior Member
 
Join Date: Aug 2007
Posts: 111
Thanks: 8
Thanked 5 Times in 5 Posts
Default

Hope you don't mind, I've changed the domain name and IP for privacy reasons

Code:
<VirtualHost xxx.xxx.xxx.xxx:80>
<Directory /var/www/web8>
    AllowOverride All
ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000
ExpiresByType application/x-javascript A2592000
ExpiresByType text/css A2592000
</Directory>
ServerName www.sampledomain.co.uk:80
ServerAdmin webmaster@sampledomain.co.uk
DocumentRoot /var/www/web8/web
ServerAlias www.sampledomain.eu sampledomain.eu sampledomain.co.uk
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias  /cgi-bin/ /var/www/web8/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web8/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
suPHP_Engine on
suPHP_UserGroup web8_webmaster web8
AddHandler x-httpd-php .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-php
Alias /error/ "/var/www/web8/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web8/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web8/user/$1/web/$3
</VirtualHost>
Also not convinced suPHP is working properly, but can't prove it yet...
Reply With Quote
  #4  
Old 30th March 2010, 10:46
zetnsh zetnsh is offline
Senior Member
 
Join Date: Aug 2007
Posts: 111
Thanks: 8
Thanked 5 Times in 5 Posts
Default

Further to this information, I'm not convinced there isn't a problem with the ISPConfig install. Bear in mind this is an installation transferred from a previous install as per this post:

http://www.howtoforge.com/forums/sho...88&postcount=2

When I make a change via the ISPConfig admin interface, it doesn't actually seem to be happening on the server. The apache config seems to be syntactically correct (apache2ctl configtest reports no problems) but Vhosts_ispconfig.conf is never changed no matter what I do.

I have found the latest config file here:

/home/admispconfig/ispconfig/web/multidoc/edit/vhosts/Vhosts_ispconfig.conf

But that's not being updated at all, however it seems that /home/admispconfig/ispconfig/web/multidoc/edit/vhosts/Vhosts_ispconfig.conf is being updated

Finally, I tested an identical server config (but without ISPConfig) also running Ubuntu Karmic, to see if open_basedir was being forced, and it wasn't, so it's definately something with my setup.

A few issues here, I really really hope someone can help!

Thanks once again, Neil
Reply With Quote
  #5  
Old 30th March 2010, 14:51
zetnsh zetnsh is offline
Senior Member
 
Join Date: Aug 2007
Posts: 111
Thanks: 8
Thanked 5 Times in 5 Posts
Default

I have solved the first part of this at least, I edited /home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper and removed " -d open_basedir=${BASEDIR}", which immediately solved the problem. Not sure this would survive any upgrade though.

Still need to get the rest of the control panel working though...
Reply With Quote
  #6  
Old 30th March 2010, 15:02
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Quote:
Originally Posted by zetnsh View Post
I have found the latest config file here:

/home/admispconfig/ispconfig/web/multidoc/edit/vhosts/Vhosts_ispconfig.conf
That path seems to be totally wrong. On Ubuntu and Debian, the file should be in /etc/apache2/vhosts. What's the output of
Code:
ls -la /etc/apache2/vhosts/
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 30th March 2010, 15:29
zetnsh zetnsh is offline
Senior Member
 
Join Date: Aug 2007
Posts: 111
Thanks: 8
Thanked 5 Times in 5 Posts
Default

I know! It's really wierd. I have set the correct path in the ISPConfig settings by the way...

ls -la /etc/apache2/vhosts/ gives the following output:

Code:
total 20
drwxr-xr-x 2 root root 4096 2010-03-28 22:16 .
drwxr-xr-x 8 root root 4096 2010-03-30 09:17 ..
-rw-r--r-- 1 root root 9944 2010-03-28 22:16 Vhosts_ispconfig.conf
BUT - the file date is wrong on that. Odd!

Thanks once again, Neil
Reply With Quote
  #8  
Old 31st March 2010, 14:02
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

What's the value of the server_path_httpd_conf field in the isp_server table in the ISPConfig database? It should be /etc/apache2
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 31st March 2010, 14:31
zetnsh zetnsh is offline
Senior Member
 
Join Date: Aug 2007
Posts: 111
Thanks: 8
Thanked 5 Times in 5 Posts
Default

Interesting! It's

Code:
/home/admispconfig/ispconfig/web/multidoc/edit
Which anyone can see is not quite right... can you tell me what it should be for my system? Ubuntu 9.10 Karmic...
Reply With Quote
  #10  
Old 31st March 2010, 14:40
zetnsh zetnsh is offline
Senior Member
 
Join Date: Aug 2007
Posts: 111
Thanks: 8
Thanked 5 Times in 5 Posts
 
Default

Incidentally, I've tried changing this to /etc/apache2 and it's no better
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
Hosting multiple websites and webmail dmwcool Installation/Configuration 8 30th March 2010 03:15
Loads of mysql connections to dbispconfig StrikerNL General 2 5th March 2009 14:31
Strange problem with Firefox and PHP after update of ISPconfig heinerlamprecht Installation/Configuration 3 10th October 2008 14:23
php eating cpu shajazzi Server Operation 15 15th August 2007 01:19
fastcgi and php with ispconfig tosser Tips/Tricks/Mods 3 25th June 2006 21:01


All times are GMT +2. The time now is 14:28.


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