Zend & # 8594; Warning: is_readable () [function.is-readable]: action open_basedir

I get the following warning in my code:

Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/php/./views/helpers/Doctype.php) is not within the allowed path(s): (/var/www/virtual/example.com/:/usr/share/pear/) in /var/www/virtual/example.com/htdocs/rockhopper-v2/library/Zend/Loader.php on line 198 or Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/php//var/www/virtual/example.com/htdocs/rockhopper-v2/application/modules/default/views/helpers/Layout.php) is not within the allowed path(s): (/var/www/virtual/example.com/:/usr/share/pear/) in /var/www/virtual/example.com/htdocs/rockhopper-v2/library/Zend/Loader.php on line 198 

What is the problem and will it cause problems during the deployment and production phase of my application?

thanks

+4
source share
2 answers

This message appears because, because the Zend FW 1.10.1 autoloader creates a path to these files in different ways. You can find more information here: Zend FW Bug Report

To get rid of this message, you can edit the index.php file and change set_include_path to this:

 set_include_path( APPLICATION_PATH.'/../library'.PATH_SEPARATOR. APPLICATION_PATH.'/../library/Zend' ); 
+16
source

open_basedir is installed. php is running in safe mode. It restricts you to the folders listed. This may help: http://blog.php-security.org/archives/72-Open_basedir-confusion.html

And yes, you will need to change it on any server if you want to access files outside the default folder.

0
source

Source: https://habr.com/ru/post/1343812/


All Articles