php error

Discussion in 'ISPConfig 3 Priority Support' started by Tom John, Aug 17, 2019.

  1. Tom John

    Tom John Member HowtoForge Supporter

    Hello guys,

    i use ISPConfig 3 and php-fpm and ubuntu 18.04
    I moved a script from cpanel server to ISPConfig server and i get the following error only on the ISPConfig server:
    Code:
    Message: file_exists(): open_basedir restriction in effect. File(/var/www/clients/client1/web9/web/assets/9502570.jpg/9502570.jpg.theme) is not within the allowed path(s): (/var/www/clients/client1/web9/web:/var/www/clients/client1/web9/private:/var/www/clients/client1/web9/tmp:/var/www/invoice.free-invoice.net/web:/srv/www/invoice.free-invoice.net/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom)
    
    Filename: models/Mdl_settings.php
    
    Line Number: 83
    
    Backtrace:
    
    File: /var/www/clients/client1/web9/web/application/modules/settings/models/Mdl_settings.php
    Line: 83
    Function: file_exists
    
    File: /var/www/clients/client1/web9/web/application/modules/settings/controllers/Settings.php
    Line: 82
    Function: get_themes
    
    File: /var/www/clients/client1/web9/web/index.php
    Line: 325
    Function: require_once
    
    is this caused because Cpanel is diferent from ISPConfig or what could be the reason i get this error here?

    thanks a lot for your kind opinion
     
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Please check if this file
    /var/www/clients/client1/web9/web/assets/9502570.jpg/9502570.jpg.theme
    is a symlink to somewhere outside the base dir of the web.
     
  3. Tom John

    Tom John Member HowtoForge Supporter

    thanks for your answer.
    ls of the dir assets get the following result:
    Code:
    [email protected]:~# ls /var/www/clients/client1/web9/web/assets/
    9502570.jpg  custom        gettyimages-507958777-170667a.jpg  logo.png
    ckeditor     datatables    invoiceplane                       template
    core         download.svg  invoiceplane_blue
    
    there is only a file 9502570.jpg but not such a dir.
    how to check symlink?
    thanks a lot for your kind help
     
  4. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    A symlink would have shown there. Please check your htaccess files, maybe there is a rewrite rule to some file outside.
    /var/www/clients/client1/web9/web/.htacess or
    /var/www/clients/client1/web9/web/assets/.htaccess
    Then check each file for a matching rewrite rule.
     
  5. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    To make sure that the file is not a symlink, you should also try
    ls -l /var/www/clients/client1/web9/web/assets/9502570.jpg
     
  6. Tom John

    Tom John Member HowtoForge Supporter

    thanks so much for your answer.
    the problem was that there were some missing files so it could not work.
    i did upload all again and now it is working. Thanks so much for your kind help
     

Share This Page