MAC OS X, Linux, Windows and other IT Tips and Tricks

21 Dec 12 PHP problem of ‘basedir-open’

After having upgraded Apache, PHP and other PHP modules I found out that we had problems with errors regarding restrictions of opening files within the set htdocs directory. I found that out by enabling error messages to be shown in the php.ini file. After researches on Internet I found those sites where they also had the same problem … and had solved it.
Same here:

So based on these sites(thanks to both authors) I wrote this short how-to.
Note: In the comments of ‘//….’ someone wrote that the solution didn’t work and as an alternative proposed to make a small change in the code of the file eaccelerator.c.
Well first, the special configure option DOES resolve the problem (at least in version,
second, his solution of changing the code produces a compilation error, so that doesn’t work.

The problem doesn’t always occur. The reason is that as soon as a php file has been changed the eAccelerator notices it and doesn’t fetch the result from the cache but get it fresh from Apache which this time doesn’t create this error. But the second time and all other times after, which makes eAccelerator fetch the content from cache, the error occurs.
Solution: Recompile eAccelerator with the special configure option: –without-eaccelerator-use-inode
tar xvjf eaccelerator-
cd eaccelerator-
./configure --enable-eaccelerator=shared --without-eaccelerator-use-inode
make install

– clear the eAccelerator cache and restart Apache

The rest of the details you can get from the installation instructions of eAccelerator in this site (//

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: