Installation error: Failed opening required

  • Adam Pyschny
    Adam Pyschny

    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_directory = "/srv/xrms/include/";

    $xrms_db_* set fine :)
    $http_site_root = "/xrms";
    $xrms_file_root = "/srv/www/vhosts/";
    $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/ in /srv/www/vhosts/ on line 37
       PHP Warning:  require_once(/srv/xrms/include/protect.php): failed to open stream: Operation not permitted in /srv/www/vhosts/ 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/ on line 37

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

  • Brian Peterson
    Brian Peterson

    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.


         - Brian

  • Wingthor

    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.


  • Adam Pyschny
    Adam Pyschny

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