HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Installation/Configuration (
-   -   ISPConfig 2 open_basedir problem, PHP 5.2.10/ISPConfig 2.2.35 (

zetnsh 29th March 2010 00:44

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:


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,


falko 29th March 2010 16:42

Please post the vhost configuration of web8.

zetnsh 29th March 2010 18:13

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


<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
DocumentRoot /var/www/web8/web
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi 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

Also not convinced suPHP is working properly, but can't prove it yet...

zetnsh 30th March 2010 11:46

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:

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:


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

zetnsh 30th March 2010 15:51

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...

falko 30th March 2010 16:02


Originally Posted by zetnsh (Post 223695)
I have found the latest config file here:


That path seems to be totally wrong. On Ubuntu and Debian, the file should be in /etc/apache2/vhosts. What's the output of

ls -la /etc/apache2/vhosts/

zetnsh 30th March 2010 16:29

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:


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

falko 31st March 2010 15:02

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

zetnsh 31st March 2010 15:31

Interesting! It's


Which anyone can see is not quite right... can you tell me what it should be for my system? Ubuntu 9.10 Karmic...

zetnsh 31st March 2010 15:40

Incidentally, I've tried changing this to /etc/apache2 and it's no better

All times are GMT +2. The time now is 21:35.

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