× Warning! This forum is in archival status. New contributions may not work.
$DOCUMENT_ROOT is empty?
  • Hello,



    Allright, at least now I have Campsite's install script running successfully... however, when accessing the pages, I get



    Warning: main(/db_connect.php): failed to open stream: No such file or directory in /var/www/priv/index.php on line 10



    Fatal error: main(): Failed opening required '/db_connect.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/priv/index.php on line 10



    Now... in the code the path is constructed as $DOCUMENT_ROOT/db_connect.php. It would seem to me that the variable is an empty string instead of "/var/www/" as it should be. Any ideas why this is so? (This is on Debian 3.1)



    Another question... where does campsite store the information about installations on a system? So far I have not managed to completely kill off an installation -- the install script always seems to know that there has been an installation of a certain name. I have removed



    - stuff in html, cgi-bin, scripts

    - removed database

    - deleted /usr/local/campsite, /etc/campsite.d/, /etc/init.d/campsite.





    Thanks in advance Smile

  • 1 Comment sorted by
  • Please read the technical FAQ in documentation directory:

    1.6. Fatal error: Failed opening required '/db_connect.php'

    a). The whole error message is like:
    Fatal error: Failed opening required '/db_connect.php'
    (include_path='.:/usr/share/pear') in /var/www/html/index.php on line 10

    The "include_path" and "index.php" may differ, depending on the local
    configuration. This error message is printed when the path to the
    "db_connect.php" file is non in the php module include path.

    Fix: edit the "php.ini" file (usually in /etc directory), add the document root
    directory to the include path and restart the apache server. In this example
    the document root directory is "/var/www/html" and the final "include_path"
    directive should look like: "include_path='.:/usr/share/pear:/var/www/html'".

    b). The whole error message is like:
    Fatal error: Failed opening required '/db_connect.php'
    (include_path='.:/usr/share/pear:/var/www/html/index.php') in
    /var/www/html/index.php on line 10

    In this case the document root directory ("/var/www/html") is in the php
    include path but the "register_globals" directive was set to "Off".

    Fix: edit the "php.ini" file, set the "register_globals" directive to "On" and
    restart the apache server.

    Hope this helps,
    Mugur

    --- campsite-support@eserver2.mdlf.org wrote:

    > This message was sent from: Campsite Support.
    >
    > ----------------------------------------------------------------
    >
    > Hello,
    >
    >
    >
    > Allright, at least now I have Campsite's install script running
    > successfully... however, when accessing the pages, I get
    >
    >
    >
    > Warning: main(/db_connect.php): failed to open stream: No such file or
    > directory in /var/www/priv/index.php on line 10
    >
    >
    >
    > Fatal error: main(): Failed opening required '/db_connect.php'
    > (include_path='.:/usr/share/php:/usr/share/pear') in
    > /var/www/priv/index.php on line 10
    >
    >
    >
    > Now... in the code the path is constructed as
    > $DOCUMENT_ROOT/db_connect.php. It would seem to me that the variable is an
    > empty string instead of "/var/www/" as it should be. Any ideas why this is
    > so? (This is on Debian 3.1)
    >
    >
    >
    > Another question... where does campsite store the information about
    > installations on a system? So far I have not managed to completely kill
    > off an installation -- the install script always seems to know that there
    > has been an installation of a certain name. I have removed
    >
    >
    >
    > - stuff in html, cgi-bin, scripts
    >
    > - removed database
    >
    > - deleted /usr/local/campsite, /etc/campsite.d/, /etc/init.d/campsite.
    >
    >
    >
    >
    >
    > Thanks in advance Smile
    >
    > ----------------------------------------------------------------
    > Sent using Phorum software version 3.4.3a
    >




    __________________________________
    Do you Yahoo!?
    The all-new My Yahoo! - What will yours do?
    http://my.yahoo.com

    ------------------------------------------
    Posted to Phorum via PhorumMail