Installation error: Failed opening required

2010-03-20
2013-04-26
  • Adam Pyschny
    Adam Pyschny
    2010-03-20

    I tried to install the latest Version from CVS following instruction in INSTALL file, but I only see a white site when trying to browse install.php after copying evrything into place.

    My setup:
    include-locations.inc:
    $include_directory = "/srv/xrms/include/";

    vars.php:
    $xrms_db_* set fine :)
    $http_site_root = "/xrms";
    $xrms_file_root = "/srv/www/vhosts/aci-aircenter.de/httpdocs/xrms";
    $tmp_upload_directory = "/srv/xrms/tmp/";
    $file_storage_directory = "/srv/xrms/storage/";

    All read/write flags are set accordingly to the instructions in the INSTALL file :)

    Apache error log:
       PHP Warning:  require_once(): open_basedir restriction in effect. File(/srv/xrms/include/protect.php) is not within the allowed path(s): (/srv/www/vhosts/aci-aircenter.de/httpdocs:/tmp) in /srv/www/vhosts/aci-aircenter.de/httpdocs/xrms/include-locations.inc on line 37
       PHP Warning:  require_once(/srv/xrms/include/protect.php): failed to open stream: Operation not permitted in /srv/www/vhosts/aci-aircenter.de/httpdocs/xrms/include-locations.inc on line 37
       PHP Fatal error:  require_once(): Failed opening required '/srv/xrms/include/protect.php' (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/vhosts/aci-aircenter.de/httpdocs/xrms/include-locations.inc on line 37

    any ideas on this?
    /srv/xrms/include/protect.php is there and readable by the webserver..

     
  • Brian Peterson
    Brian Peterson
    2010-03-20

    The 'Operation not permitted' error is your clue.

    Call or email your ISP and ask them where you can put PHP files that can include other files.  They've got the apache config locked down, probably prohibiting all file operations.

    Regards,

         - Brian

     
  • Wingthor
    Wingthor
    2010-03-20

    Think it is the open_base_dir setting in your php.ini file that caused the error. Check if your XMRS is within the path.

    Regards

     
  • Adam Pyschny
    Adam Pyschny
    2010-03-23

    Thank you both.
    open_base_dir and safe_mode were to blame, now everything works flawlessly