Warning: is_readable(): open_basedir restriction in effect + php 5.6.30

Discussion in 'Installation/Configuration' started by Poliman, Mar 9, 2018.

  1. Poliman

    Poliman Member

    I have a server with Ubuntu Server 16.04 LTS. There is ISP 3.1.11. I used one howtoforge tutorial to install php 5.6.30 on this Ubuntu - works nice. I moved old website (Zend1 framework) to this server and after go to it's address to browser I have:
    Warning: is_readable(): open_basedir restriction in effect. File(/opt/php-5.6.30/lib/php//var/www/clients/client4/web4/web/tuski/application/plugins/Resource/Layout.php) is not within the allowed path(s): (/var/www/clients/client4/web4/web/tuski:/var/www/clients/client4/web4/private:/var/www/clients/client4/web4/tmp:/var/www/tuski.s1.example.net/web/tuski:/srv/www/tuski.s1.example.net/web/tuski:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom) in /var/www/clients/client4/web4/web/tuski/library/Zend/Loader.php on line 186
    Warning: is_readable(): open_basedir restriction in effect. File(/opt/php-5.6.30/lib/php/ZendX/Application/Resource/Layout.php) is not within the allowed path(s): (/var/www/clients/client4/web4/web/tuski:/var/www/clients/client4/web4/private:/var/www/clients/client4/web4/tmp:/var/www/tuski.s1.example.net/web/tuski:/srv/www/tuski.s1.example.net/web/tuski:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom) in /var/www/clients/client4/web4/web/tuski/library/Zend/Loader.php on line 186
    ... and few more but this same warning related to another particular files.

    Under website settings I have:
    - PHP Fast-CGI
    - PHP Version 5.6.30 (this one installed from tutorial which works nice)
    - PHP open_basedir is default created -->
    - SuEXEC is enabled by default

    What is strange to me:
    Each first line of the above warning:
    File(/opt/php-5.6.30/lib/php//var/www/clients/client4/web4/web/tuski/application/plugins/Resource/Layout.php) --> here two slashes
    Each of above lines try find files from this old application (this is application directory /var/www/clients/client4/web4/web/tuski/) in php install directory /opt/php-5.6.30/ where is also /lib/php. Of course these files are not there. They can not be there.

    Do you know what to do with this?
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I often find a case like this is rather the website software (php code) problems and not related to ISPConfig. You may open the basedir by giving it no value but it is unsafe and not advisable

    Anyway, what software is the website using that causing the said error?
  3. Poliman

    Poliman Member

    Yea I think this same that it won't be ISP issue. I suppose there is a problem, because of php 5.6.30 implemented on the server and application use Zend1 framework (so maybe it should use php 5.3 or something older - but I don't want to implement very old software on new server). But also I think that it's possible to repair this by some edition in "PHP open_basedir" input field.
    Should I just put "none" (without quotation mark) in this input field?

    I have found two tutorials:

    Maybe it will help. I give a feedback.
    Last edited: Mar 12, 2018
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

  5. Poliman

    Poliman Member

    I have fixed this issue. I left open_basedir as it was but I changed few things in php used by application:
    short_open_tag: On //messy php code <? ?>
    host: localhost not ip address of the server
    in Website settings in ISP:
    php-fpm changed to php-fcgi

    AND of course fixed Zend php function as above posted links say.
    Maybe it will help somebody.
    ahrasis likes this.

Share This Page