Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: Next Major Release
-
Fix Version/s: 1.10.7
-
Component/s: Zend_Cache
-
Labels:None
Description
ZF VERSION = '1.11.0dev'
I get following errors in Zend_Cache_Backend_Static whilst implementing page caching
[09-Apr-2010 11:46:18] PHP Warning: is_dir() [<a href='function.is-dir'>function.is-dir</a>]: open_basedir restriction in effect. File
is not within the allowed path(s): (/var/www/vhosts/fairfax.org.uk/httpdocs:/var/www/vhosts/fairfax.org.uk/application:/tmp:/usr/local/ZWare/libv2:/usr/local/Zend/Core/share/pear) in /usr/local/ZWare/libv2/Zend/Cache/Backend/Static.php on line 269
[09-Apr-2010 11:46:18] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: open_basedir restriction in effect. Fileis not within the allowed path(s): (/var/www/vhosts/fairfax.org.uk/httpdocs:/var/www/vhosts/fairfax.org.uk/application:/tmp:/usr/local/ZWare/libv2:/usr/local/Zend/Core/share/pear) in /usr/local/ZWare/libv2/Zend/Cache/Backend/Static.php on line 270
[09-Apr-2010 11:46:18] PHP Warning: is_dir() [<a href='function.is-dir'>function.is-dir</a>]: open_basedir restriction in effect. File(/var) is not within the allowed path(s): (/var/www/vhosts/fairfax.org.uk/httpdocs:/var/www/vhosts/fairfax.org.uk/application:/tmp:/usr/local/ZWare/libv2:/usr/local/Zend/Core/share/pear) in /usr/local/ZWare/libv2/Zend/Cache/Backend/Static.php on line 269
[09-Apr-2010 11:46:18] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: open_basedir restriction in effect. File(/var) is not within the allowed path(s): (/var/www/vhosts/fairfax.org.uk/httpdocs:/var/www/vhosts/fairfax.org.uk/application:/tmp:/usr/local/ZWare/libv2:/usr/local/Zend/Core/share/pear) in /usr/local/ZWare/libv2/Zend/Cache/Backend/Static.php on line 270
[09-Apr-2010 11:46:18] PHP Warning: is_dir() [<a href='function.is-dir'>function.is-dir</a>]: open_basedir restriction in effect. File(/var/www) is not within the allowed path(s): (/var/www/vhosts/fairfax.org.uk/httpdocs:/var/www/vhosts/fairfax.org.uk/application:/tmp:/usr/local/ZWare/libv2:/usr/local/Zend/Core/share/pear) in /usr/local/ZWare/libv2/Zend/Cache/Backend/Static.php on line 269
[09-Apr-2010 11:46:18] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: open_basedir restriction in effect. File(/var/www) is not within the allowed path(s): (/var/www/vhosts/fairfax.org.uk/httpdocs:/var/www/vhosts/fairfax.org.uk/application:/tmp:/usr/local/ZWare/libv2:/usr/local/Zend/Core/share/pear) in /usr/local/ZWare/libv2/Zend/Cache/Backend/Static.php on line 270
[09-Apr-2010 11:46:18] PHP Warning: is_dir() [<a href='function.is-dir'>function.is-dir</a>]: open_basedir restriction in effect. File(/var/www/vhosts) is not within the allowed path(s): (/var/www/vhosts/fairfax.org.uk/httpdocs:/var/www/vhosts/fairfax.org.uk/application:/tmp:/usr/local/ZWare/libv2:/usr/local/Zend/Core/share/pear) in /usr/local/ZWare/libv2/Zend/Cache/Backend/Static.php on line 269
[09-Apr-2010 11:46:18] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: open_basedir restriction in effect. File(/var/www/vhosts) is not within the allowed path(s): (/var/www/vhosts/fairfax.org.uk/httpdocs:/var/www/vhosts/fairfax.org.uk/application:/tmp:/usr/local/ZWare/libv2:/usr/local/Zend/Core/share/pear) in /usr/local/ZWare/libv2/Zend/Cache/Backend/Static.php on line 270
[09-Apr-2010 11:46:18] PHP Warning: is_dir() [<a href='function.is-dir'>function.is-dir</a>]: open_basedir restriction in effect. File(/var/www/vhosts/fairfax.org.uk) is not within the allowed path(s): (/var/www/vhosts/fairfax.org.uk/httpdocs:/var/www/vhosts/fairfax.org.uk/application:/tmp:/usr/local/ZWare/libv2:/usr/local/Zend/Core/share/pear) in /usr/local/ZWare/libv2/Zend/Cache/Backend/Static.php on line 269
[09-Apr-2010 11:46:18] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: open_basedir restriction in effect. File(/var/www/vhosts/fairfax.org.uk) is not within the allowed path(s): (/var/www/vhosts/fairfax.org.uk/httpdocs:/var/www/vhosts/fairfax.org.uk/application:/tmp:/usr/local/ZWare/libv2:/usr/local/Zend/Core/share/pear) in /usr/local/ZWare/libv2/Zend/Cache/Backend/Static.php on line 270
i.e right up where the path is allowed
In this instance, the public_dir is set up as '/var/www/vhosts/fairfax.org.uk/httpdocs/pagecache' for 'Static' backend and open_basedir is set for '/var/www/vhosts/fairfax.org.uk/httpdocs' as you can see in the error messages.
The problem is in the _createDirectoriesFor() method which is trying to create all the way back from root even though it is unlikely that would ever be in an open basedir.
Suggestions:
quick fix: suppress errors
longer term fix:
Check if open_basedir restriction is in effect and then try a match to allowed paths, using a matched one as a starting point for directory creation if found.
Issue Links
| This issue is dependecy of: | ||||
| ZF-8993 | Zend_Cache_Backend_Static doesn't work on Windows |
|
|
|
fixed in r22644 (trunk) & r22645 (1.10 branch)
-> create directories recursive using third argument of mkdir