open_basedir problem after upgrade to PHP 5.2.15

@SMtalk: I'm sorry, I guess I'm just feeling a bit... dull or bored (how do you call that in English, I'm not sure) today. So I will stop making a fool of myself now here.:)

@John: Why did you downgrade while SMtalk has a fix now?
 
We have only some DA boxed affected by this. Other are still running fine, even all accounts set openbase_dir ON. Not sure why?
 
After I upgraded a Centos 64bit with custombuild, I ran into the open_basedir restriction errors. So I executed the commands of SMTalk and recompiled PHP, but that did not fix the problem...
 
Thank you, smtalk! The fix work perfectly on my CentOS 5.5 64 bit box. No problems at all!
 
After downgrading back to PHP version 5.2.14 from 5.2.15 I still have openbase errors, apparently this has something to do with eAccelerator.
 
Last edited:
if your got EA related issue - just recompile EA again for 5.2.14 version.
 
My fault: smtalk fix works on CentOs 5 (64 bit)!

My problem was caused by eAccelerator. When I got the open_basedir errors the smtalk fix was not yet available so I upgraded to the latest eAccelerator version. Turns out, that the lates version of eAccelerator also generates open_basedir errors unless you use a new compiler option (--without-eaccelerator-use-inode).

eAccelerator compilation instructions that worked for me:
cd /usr/local/src/eaccelerator/eaccelerator-0.9.6.1
export PHP_PREFIX="/usr/local"
$PHP_PREFIX/bin/phpize
make clean
./configure --without-eaccelerator-use-inode --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config
make
make test
make install
 
Last edited:
Hello,

Since I don't want us to add extra complexity for "workarounds" in custombuild, I've instead added the patch directly into the php-5.2.15.tar.gz source file. You should be able to do a:
Code:
./build update
./build php n
Note that it will be normal to see:
Code:
*** MD5 Checksum for php-5.2.15-mail-header.patch Failed.  Redownloading...***
since this is a new tar.gz file, different from the old/original one. The MD5 check will ensure you've got the patched version.

John
 
Code:
./build update
./build php n
Note that it will be normal to see:
Code:
*** MD5 Checksum for php-5.2.15-mail-header.patch Failed.  Redownloading...***

PHP:
gcc: /usr/lib/mysql/libmysqlclient_r.so: No such file or directory
So it should be? :D

PHP:
ln -s /usr/lib/libmysqlclient_r.so  /usr/lib/mysql/libmysqlclient_r.so
has resolved the problem
 
i did

Code:
./build update
./build php n

and i still have the openbasedir problem on Centos 5.5 / 64

Code:
Warning: file_exists(): open_basedir restriction in effect. File(/root/.pearrc) is not within the allowed path(s): (/home/admin/:/tmp:/usr/local/lib/php:/var/www/html/squirrelmail/:/var/www/html/squirrelmail/:/var/www/html/phpMyAdmin/:/var/www/html/webmail:/usr/local/directadmin/:/var/www/html/roundcube:/usr/local/directadmin/:/var/www/html/atmail:/usr/local/directadmin/:/var/www/html/atmail-1.03/) in phar://install-pear-nozlib.phar/PEAR/Config.php on line 621
[PEAR] Archive_Tar    - already installed: 1.3.7
[PEAR] Console_Getopt - already installed: 1.2.3
[PEAR] Structures_Graph- already installed: 1.0.3
[PEAR] XML_Util       - already installed: 1.2.1

Warning: file_exists(): open_basedir restriction in effect. File(/usr/local/bin) is not within the allowed path(s): (/home/admin/:/tmp:/usr/local/lib/php:/var/www/html/squirrelmail/:/var/www/html/squirrelmail/:/var/www/html/phpMyAdmin/:/var/www/html/webmail:/usr/local/directadmin/:/var/www/html/roundcube:/usr/local/directadmin/:/var/www/html/atmail:/usr/local/directadmin/:/var/www/html/atmail-1.03/) in phar://install-pear-nozlib.phar/PEAR/Installer.php on line 546

Warning: file_exists(): open_basedir restriction in effect. File(/usr/local/bin) is not within the allowed path(s): (/home/admin/:/tmp:/usr/local/lib/php:/var/www/html/squirrelmail/:/var/www/html/squirrelmail/:/var/www/html/phpMyAdmin/:/var/www/html/webmail:/usr/local/directadmin/:/var/www/html/roundcube:/usr/local/directadmin/:/var/www/html/atmail:/usr/local/directadmin/:/var/www/html/atmail-1.03/) in phar://install-pear-nozlib.phar/System.php on line 265

Warning: file_exists(): open_basedir restriction in effect. File(/usr/local) is not within the allowed path(s): (/home/admin/:/tmp:/usr/local/lib/php:/var/www/html/squirrelmail/:/var/www/html/squirrelmail/:/var/www/html/phpMyAdmin/:/var/www/html/webmail:/usr/local/directadmin/:/var/www/html/roundcube:/usr/local/directadmin/:/var/www/html/atmail:/usr/local/directadmin/:/var/www/html/atmail-1.03/) in phar://install-pear-nozlib.phar/System.php on line 265

Warning: file_exists(): open_basedir restriction in effect. File(/usr) is not within the allowed path(s): (/home/admin/:/tmp:/usr/local/lib/php:/var/www/html/squirrelmail/:/var/www/html/squirrelmail/:/var/www/html/phpMyAdmin/:/var/www/html/webmail:/usr/local/directadmin/:/var/www/html/roundcube:/usr/local/directadmin/:/var/www/html/atmail:/usr/local/directadmin/:/var/www/html/atmail-1.03/) in phar://install-pear-nozlib.phar/System.php on line 265

Warning: file_exists(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/admin/:/tmp:/usr/local/lib/php:/var/www/html/squirrelmail/:/var/www/html/squirrelmail/:/var/www/html/phpMyAdmin/:/var/www/html/webmail:/usr/local/directadmin/:/var/www/html/roundcube:/usr/local/directadmin/:/var/www/html/atmail:/usr/local/directadmin/:/var/www/html/atmail-1.03/) in phar://install-pear-nozlib.phar/System.php on line 265

Warning: is_writeable(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/admin/:/tmp:/usr/local/lib/php:/var/www/html/squirrelmail/:/var/www/html/squirrelmail/:/var/www/html/phpMyAdmin/:/var/www/html/webmail:/usr/local/directadmin/:/var/www/html/roundcube:/usr/local/directadmin/:/var/www/html/atmail:/usr/local/directadmin/:/var/www/html/atmail-1.03/) in phar://install-pear-nozlib.phar/System.php on line 272

Warning: file_exists(): open_basedir restriction in effect. File(/usr/local/bin/pear.bak) is not within the allowed path(s): (/home/admin/:/tmp:/usr/local/lib/php:/var/www/html/squirrelmail/:/var/www/html/squirrelmail/:/var/www/html/phpMyAdmin/:/var/www/html/webmail:/usr/local/directadmin/:/var/www/html/roundcube:/usr/local/directadmin/:/var/www/html/atmail:/usr/local/directadmin/:/var/www/html/atmail-1.03/) in phar://install-pear-nozlib.phar/PEAR/Installer.php on line 956

Warning: file_exists(): open_basedir restriction in effect. File(/usr/local/bin/peardev.bak) is not within the allowed path(s): (/home/admin/:/tmp:/usr/local/lib/php:/var/www/html/squirrelmail/:/var/www/html/squirrelmail/:/var/www/html/phpMyAdmin/:/var/www/html/webmail:/usr/local/directadmin/:/var/www/html/roundcube:/usr/local/directadmin/:/var/www/html/atmail:/usr/local/directadmin/:/var/www/html/atmail-1.03/) in phar://install-pear-nozlib.phar/PEAR/Installer.php on line 956

Warning: file_exists(): open_basedir restriction in effect. File(/usr/local/bin/pecl.bak) is not within the allowed path(s): (/home/admin/:/tmp:/usr/local/lib/php:/var/www/html/squirrelmail/:/var/www/html/squirrelmail/:/var/www/html/phpMyAdmin/:/var/www/html/webmail:/usr/local/directadmin/:/var/www/html/roundcube:/usr/local/directadmin/:/var/www/html/atmail:/usr/local/directadmin/:/var/www/html/atmail-1.03/) in phar://install-pear-nozlib.phar/PEAR/Installer.php on line 956

I don't see errors on my site, but the openbasedir errors looks not good.
 
Hello,

That's a open_basedir setting in your php.ini.

We don't specify any global open_basedir settings in the php.ini.
It's blank by default. Your's is likely not blank.

If you've manually added settings to it, you must update it to account for anything you need. In your case, the requirements seem to be all over the place, so a value of "/" would be needed, which makes the voids the whole point of the open_basedir.

If everything is still working fine, then you can probably ignore the error.. but an "shell" run php scripts will run into issues if they dont fall under the paths you've specified. The isntaller likely makes calls to php.. which falls into this category.

John
 
Ok, Thanks John
I leave it for a few days, and if everything is working fine it's ok. :)
 
Thanks for implementing the fix into the build.

I've seen that a ./build update_versions also upgraded php to 5.2.15 at one of my systems. Does it matter if you use the update_versions instead of the build php n? Because I did not see any visible differences.

And I've seen this warning near the end:
libtool: install: warning: remember to run `libtool --finish /usr/local/directadmin/custombuild/php-5.2.15/libs'
Do I need to do that command or don't I?
 
Hello,

Both should do more or less the same thing, assuming that php was the only thing in need of updating.

I'm not sure about the libtool --finish command. We've never needed to run it before. The "make install" tends to do everything for us (as far as I know)

John
 
Back
Top