eAccelerator and the “open_basedir restriction in effect. File() is not within the allowed path(s)” problem

March 6, 2011

This blog post should guard other admins from searching for hours about following error message:


require(): open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/domains/xxxxxxxx/html/:/var/www/xxxxxxxx/include/:/var/www/domains/xxxxxxxx/tmp/)
in '/var/www/domains/xxxxxxxx/html/core/Translate.php' at the line 81


#0 Piwik_ErrorHandler(2, require(): open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/domains/xxxxxxxx/html/:/var/www/xxxxxxxx/include/:/var/www/domains/xxxxxxxx/tmp/), /var/www/domains/xxxxxxxx/html/core/Translate.php, 81, Array ([language] => en,[path] => /var/www/domains/xxxxxxxx/html/lang/en.php)) called at [/var/www/domains/xxxxxxxx/html/core/Translate.php:81]
#1 Piwik_Translate::loadTranslation() called at [/var/www/domains/xxxxxxxx/html/core/Translate.php:81]
#2 Piwik_Translate->loadTranslation(en) called at [/var/www/domains/xxxxxxxx/html/core/Translate.php:35]
#3 Piwik_Translate->loadEnglishTranslation() called at [/var/www/domains/xxxxxxxx/html/core/FrontController.php:197]
#4 Piwik_FrontController->init() called at [/var/www/domains/xxxxxxxx/html/index.php:56]

I got it when I tried to install Piwik. I tried everything including setting setting open_basedir to /. It stopped working if I activated the basedir protection and started working if I removed it. After hours searching I found it. I looked into the wrong direction – the problem was not php but eAccelerator. After I found that out it was easy to get to the solution, you need to compile it with the option --without-eaccelerator-use-inode, e.g.this way:


VERSION=0.9.6.1
URL=http://bart.eaccelerator.net/source/$VERSION/eaccelerator-$VERSION.tar.bz2


cd /tmp/
rm -rf eaccelerator-$VERSION
wget $URL
tar xvjf eaccelerator-$VERSION.tar.bz2
cd eaccelerator-$VERSION
phpize
./configure --enable-eaccelerator=shared --without-eaccelerator-use-inode
make
make install

Powered by WordPress
Entries and comments feeds. Valid XHTML and CSS. 26 queries. 0.066 seconds.