I have completed all the file setup for both the root folder and the database. The database and the settings.php have been connected. When I point my browser to my site, I get the following error (haven't found this one in the archives):

-----------------------

Warning: main(sites/default/settings.php): failed to open stream: No such file or directory in c:\hosting\webhost4life\member\cmsaub\includes\bootstrap.inc on line 642

Warning: main(): Failed opening 'sites/default/settings.php' for inclusion (include_path='.;c:\php4\pear') in c:\hosting\webhost4life\member\cmsaub\includes\bootstrap.inc on line 642

Warning: main(includes/database.inc): failed to open stream: No such file or directory in c:\hosting\webhost4life\member\cmsaub\includes\bootstrap.inc on line 643

Warning: main(): Failed opening 'includes/database.inc' for inclusion (include_path='.;c:\php4\pear') in c:\hosting\webhost4life\member\cmsaub\includes\bootstrap.inc on line 643

Warning: main(includes/session.inc): failed to open stream: No such file or directory in c:\hosting\webhost4life\member\cmsaub\includes\bootstrap.inc on line 644

Warning: main(): Failed opening 'includes/session.inc' for inclusion (include_path='.;c:\php4\pear') in c:\hosting\webhost4life\member\cmsaub\includes\bootstrap.inc on line 644

Warning: main(includes/module.inc): failed to open stream: No such file or directory in c:\hosting\webhost4life\member\cmsaub\includes\bootstrap.inc on line 645

Warning: main(): Failed opening 'includes/module.inc' for inclusion (include_path='.;c:\php4\pear') in c:\hosting\webhost4life\member\cmsaub\includes\bootstrap.inc on line 645

Fatal error: Call to undefined function: db_fetch_object() in c:\hosting\webhost4life\member\cmsaub\includes\bootstrap.inc on line 199

---------------------------------

After expanding the drupal.tar.gz file into a drupal folder, I moved all of the drupal folder contents into my root directory. My file structure seems to be correct.

You can see the error at: http://site295.webhost4life.com/cmsaub/

Has anyone encountered this before? Any ideas?

I have contacted my server host about the php version running on my server. I was told to expect "the most recent", but they are double checking.

Thanks.

Comments

velkr0’s picture

i'm having the exact same issue.. but i'm on a freebsd box.. any ideas?

velkr0’s picture

hmm... changing the permissions didn't work..

Uwe Hermann’s picture

Do all files have 644 permission and all directories 755? Do other PHP/MySQL applications work with your setup?

Uwe.
--
hermann-uwe.de | crazy-hacks.org | unmaintained-free-software.org

velkr0’s picture

Yeah... i tried.. i even tried the famous... chmod -R 777 * and no dice.. same errors... and yeah.. other php/sql stuff works fine.. like wordpress, mambo, etc..

hmmmm...

Uwe Hermann’s picture

Hm. Please post the exact versions of everything you are using (PHP, Apache, Drupal, ...).

Uwe.
--
hermann-uwe.de | crazy-hacks.org | unmaintained-free-software.org

velkr0’s picture

- FreeBSD 5.4-STABLE
- php4-4.3.11_1
- apache-worker-2.0.54
- mysql-server-4.0.24
- drupal-4.6.3

Uwe Hermann’s picture

Those versions look fine to me, i.e., it should work. What are the exact error messages you get?

Here's what I get if the permissions of settings.php are incorrect:

Warning: _drupal_bootstrap(sites/default/settings.php): failed to open stream: No such file or directory in /var/www/drupalcvs/includes/bootstrap.inc on line 834

Fatal error: _drupal_bootstrap(): Failed opening required 'sites/default/settings.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/drupalcvs/includes/bootstrap.inc on line 834

That's why I think it might be a permissions problem.

Uwe.
--
hermann-uwe.de | crazy-hacks.org | unmaintained-free-software.org

velkr0’s picture

PHP Fatal error: Call to undefined function: db_fetch_object() in /usr/home/joe/public_html/mydomain.com/drupal/includes/bootstrap.inc on line 199

PHP Warning: main(sites/default/settings.php): failed to open stream: No such file or directory in /usr/home/joe/public_html/mydomain.com/drupal/includes/bootstrap.inc on line 642

PHP Warning: main(): Failed opening 'sites/default/settings.php' for inclusion (include_path='/usr/local/share/pear') in /usr/home/joe/public_html/mydomain.com/drupal/includes/bootstrap.inc on line 642

PHP Warning: main(includes/database.inc): failed to open stream: No such file or directory in /usr/home/joe/public_html/mydomain.com/drupal/includes/bootstrap.inc on line 643

PHP Warning: main(): Failed opening 'includes/database.inc' for inclusion (include_path='/usr/local/share/pear') in /usr/home/joe/public_html/mydomain.com/drupal/includes/bootstrap.inc on line 643

PHP Warning: main(includes/session.inc): failed to open stream: No such file or directory in /usr/home/joe/public_html/mydomain.com/drupal/includes/bootstrap.inc on line 644

PHP Warning: main(): Failed opening 'includes/session.inc' for inclusion (include_path='/usr/local/share/pear') in /usr/home/joe/public_html/mydomain.com/drupal/includes/bootstrap.inc on line 644

PHP Warning: main(includes/module.inc): failed to open stream: No such file or directory in /usr/home/joe/public_html/mydomain.com/drupal/includes/bootstrap.inc on line 645

PHP Warning: main(): Failed opening 'includes/module.inc' for inclusion (include_path='/usr/local/share/pear') in /usr/home/joe/public_html/mydomain.com/drupal/includes/bootstrap.inc on line 645

PHP Fatal error: Call to undefined function: db_fetch_object() in /usr/home/joe/public_html/mydomain.com/drupal/includes/bootstrap.inc on line 199

----

any ideas? the paths are getting messed up.. maybe an apache, php, freebsd thing? thanks for you help!

tomy’s picture

I installed drupal on my localy without problem but on internet server I am having the same problems. I really dont kwon what is happening.

Any Ideas.

thanks

Tomy

furiousrcj’s picture

I'm having the same issue with subdomains!

bwayson’s picture

velkr0:
I've been struggling with errors similar to yours for days, and I found a solution (it may be a hack) at the http://drupal.org/node/34949 topic discussion:

"...
My final solution was to put into bootstrap.inc just above the includes an ini_set command.

....

ini_set("include_path",".");

unset($conf);
$config = conf_init();

include_once 'sites/default/settings.php';
include_once 'includes/database.inc';
include_once 'includes/session.inc';
include_once 'includes/module.inc';
..."

I put the "ini_set(..." line into my bootstrap.inc (around line 639), restarted apache (rcapache2 restart, in SuSE), and my main page has finally appeared after installation. Maybe it will help. I believe I will post a bug report.

By the way, the system is retail SuSE Linux 10.0, apache 2.0, php 4.4.0 (both from SuSE rpms) and drupal 4.6.3. Hope this helps.

Bill W

A followup:
If this works for you, you can effect the same change globally within your php.ini. Mine is at /etc/php.ini. While editing as root, look for a directive "include_path". In my original file it read:
include_path = "/usr/share/php"

I changed it to:
include_path = ".:/usr/share/php"

I commented out the line I added to includes/bootstrap.inc, restarted apache, and Drupal still worked. I was able to create the admin account (account #1).
Since Drupal did work "out of the box" when installed under Fedora Core 3, I am going to check its php.ini file. My guess is that its include_path directive includes the ".:" in it. If it is, then is this a SuSE problem with its php rpms, or is it a problem with Drupal assuming a particular include_path entry?

velkr0’s picture

here is a snippet from my IM history that may be useful...

11:08:28 AM: i discovered when webmail stopped working, that the php.ini-dist didn't include PEAR (normal), and everything else that was sans pear worked fine.
11:08:43 AM: when I re-enabled it, the problems reappeared
11:08:50 AM: which got me thinking
11:08:57 AM: so I looked at the include path
11:09:15 AM: include_path = "/usr/local/share/pear"
11:09:30 AM: which, googling around, I have discovered is wrong
11:09:35 AM: it should be:
11:09:38 AM: include_path = ".:/usr/local/share/pear"
11:09:58 AM: ie, include the current directory, and /usr/local/share/pear