Ticket #414 (closed defect: fixed)

Opened 6 months ago

Last modified 2 weeks ago

open_basedir restriction. In Unknown on line 0 - Again...

Reported by: Focus Owned by: somebody
Priority: major Milestone:
Component: eAccelerator Version: 0.9.6
Keywords: Cc:

Description

Hi,

I have a webserver with ISPConfig 3 installed and running smoothly but it is very slow. So I decided to install eAccelerator, seemingly without any hazzle. When I create a phpinfo.php file in the web root, it confirms the presence of a running eAccelerator caching 1 file.

Now, when I hit a page, that is created by ISPConfig, I get this error:

Fatal error: Can't load /var/www/mywebsite.com/web/index.php, open_basedir restriction. in Unknown on line 0

Can you give me a hint about what could possibly be the problem?

php5 version:

PHP 5.2.10-2ubuntu6.4 with Suhosin-Patch 0.9.7 (cli) (built: Jan  6 2010 22:56:44)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
    with eAccelerator v0.9.6, Copyright (c) 2004-2010 eAccelerator, by eAccelerator

And my eaccelerator.ini file:

zend_extension                  = "/usr/lib/php5/20060613/eaccelerator.so"
eaccelerator.shm_size           = "0"
eaccelerator.cache_dir          = "/var/cache/eaccelerator"
eaccelerator.enable             = "1"
eaccelerator.optimizer          = "1"
eaccelerator.check_mtime        = "1"
eaccelerator.debug              = "0"
eaccelerator.filter             = ""
eaccelerator.shm_max            = "0"
eaccelerator.shm_ttl            = "0"
eaccelerator.shm_prune_period   = "0"
eaccelerator.shm_only           = "0"
eaccelerator.compress           = "1"
eaccelerator.compress_level     = "7"
eaccelerator.allowed_admin_path = "/var/www/eaccelerator"

Kind regards Focus

Change History

comment:1 Changed 6 months ago by Focus

  • Status changed from new to closed
  • Resolution set to fixed

SOLVED!

Necessity is the mother of invention ;-)

After a lot of trial and error I took at look inside the /etc/apache2/sites-enabled folder, where ISPConfig saves the individual site configuration in files like this one:

somewebsite.com.vhost

Here I simply uncommented the line beginning with:

# php_admin_value open_basedir /var/www/clients/client2/web9/web:/var/www/clients/client2/web9/tmp...blablabla...  

And eAccelerator started immediately the caching mechanism. Works like a charm and what a performance boost!

So there is maybe one question left now.

Can I live without php_admin_value open_basedir ...blablabla..?

comment:2 Changed 5 months ago by Kenjiro

  • Status changed from closed to reopened
  • Resolution fixed deleted

Confirmed, php-eaccelerator 0.9.6 do not work with PHP 5.3.2 on Fedora 12 with open_basedir restriction set. In logs:

[Fri Apr 02 12:08:49 2010] [error] [client 1.2.3.4] PHP Warning:  Unknown: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/mysite/:/home/mysite/phptmp/:/usr/share/pear/) in Unknown on line 0, referer: http://mysite/
[Fri Apr 02 12:08:49 2010] [error] [client 1.2.3.4] PHP Fatal error:  Can't load /home/mysite/htdocs/index.php, open_basedir restriction. in Unknown on line 0, referer: http://mysite/

Previous version (0.9.5) on Fedora 11 (PHP 5.2) works flawless.

comment:3 Changed 4 months ago by AaronDM

Confirmed as well, I get the exact same error. Running PHP 5.3.2 and installed eAccelerator using FreeBSD ports,  http://www.freebsd.org/cgi/cvsweb.cgi/ports/www/eaccelerator/.

Does not work with open_basedir enabled.

comment:4 Changed 4 months ago by hans

  • Status changed from reopened to closed
  • Resolution set to fixed

Compile eAccelerator with --without-eaccelerator-use-inode, that should fix it (this will be the default in the next release)

See also ticket #104

Note: See TracTickets for help on using tickets.