I'm receiving the following errors when I try to visit my Drupal-powered site:

Warning: main(sites/default/settings.php): failed to open stream: No such file or directory in /home/httpd/vhosts/warrantyshack.com/httpdocs/includes/bootstrap.inc on line 636

Warning: main(): Failed opening 'sites/default/settings.php' for inclusion (include_path='\') in /home/httpd/vhosts/warrantyshack.com/httpdocs/includes/bootstrap.inc on line 636

Warning: main(includes/database.inc): failed to open stream: No such file or directory in /home/httpd/vhosts/warrantyshack.com/httpdocs/includes/bootstrap.inc on line 637

Warning: main(): Failed opening 'includes/database.inc' for inclusion (include_path='\') in /home/httpd/vhosts/warrantyshack.com/httpdocs/includes/bootstrap.inc on line 637

Warning: main(includes/session.inc): failed to open stream: No such file or directory in /home/httpd/vhosts/warrantyshack.com/httpdocs/includes/bootstrap.inc on line 638

Warning: main(): Failed opening 'includes/session.inc' for inclusion (include_path='\') in /home/httpd/vhosts/warrantyshack.com/httpdocs/includes/bootstrap.inc on line 638

Warning: main(includes/module.inc): failed to open stream: No such file or directory in /home/httpd/vhosts/warrantyshack.com/httpdocs/includes/bootstrap.inc on line 639

Warning: main(): Failed opening 'includes/module.inc' for inclusion (include_path='\') in /home/httpd/vhosts/warrantyshack.com/httpdocs/includes/bootstrap.inc on line 639

Fatal error: Call to undefined function: db_fetch_object() in /home/httpd/vhosts/warrantyshack.com/httpdocs/includes/bootstrap.inc on line 199

I believe this issue started after the server that the site resides on was upgraded to Plesk 8.0.0. Here is other pertinent information:

mysql 4.1.15-1.rhfc2.art
php 4.4.1-1.rhfc2.art

I've done a search here on drupal.org and on google but wasn't able to find anything dealing with my particular problem. I did check to make sure all of the files exist, so that is not the problem. Thanks!

Comments

heine’s picture

Modify your include_path (see php.ini) to include the current directory: . -- e.g. include_path=".:/other_directory"
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

Coop1979’s picture

Ok, so my server's php.ini file currently says:

include_path = "\".:\""

Should I create a php.ini file for just the domain I'm using drupal on, or should I edit that above line to be something else?

phollan1’s picture

I am having the same problem my error says

Warning: include_once(sites/default/settings.php) [function.include-once]: failed to open stream: No such file or directory in d:\Inetpub\wwwroot\includes\bootstrap.inc on line 636

Warning: include_once() [function.include]: Failed opening 'sites/default/settings.php' for inclusion (include_path='d:\php') in d:\Inetpub\wwwroot\includes\bootstrap.inc on line 636

Warning: include_once(includes/database.inc) [function.include-once]: failed to open stream: No such file or directory in d:\Inetpub\wwwroot\includes\bootstrap.inc on line 637

Warning: include_once() [function.include]: Failed opening 'includes/database.inc' for inclusion (include_path='d:\php') in d:\Inetpub\wwwroot\includes\bootstrap.inc on line 637

Warning: include_once(includes/session.inc) [function.include-once]: failed to open stream: No such file or directory in d:\Inetpub\wwwroot\includes\bootstrap.inc on line 638

Warning: include_once() [function.include]: Failed opening 'includes/session.inc' for inclusion (include_path='d:\php') in d:\Inetpub\wwwroot\includes\bootstrap.inc on line 638

Warning: include_once(includes/module.inc) [function.include-once]: failed to open stream: No such file or directory in d:\Inetpub\wwwroot\includes\bootstrap.inc on line 639

Warning: include_once() [function.include]: Failed opening 'includes/module.inc' for inclusion (include_path='d:\php') in d:\Inetpub\wwwroot\includes\bootstrap.inc on line 639

Fatal error: Call to undefined function db_fetch_object() in d:\Inetpub\wwwroot\includes\bootstrap.inc on line 199

my include_path says

; Windows: "\path1;\path2"
include_path = "d:\php"

what have I done wrong here?

heine’s picture

Add the current directory to the include_path. Eg

include_path = ".;d:\php"

(note the dot)

Restart the webserver, try again.
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

Coop1979’s picture

Just wanted to update this thread to let everyone know I put this fix into place and it worked great:

"To fix it globally, edit as root the appropriate php.ini file (/etc/php.ini, /etc/php5/apache2/php.ini, or similar), find any existing include_path directive (or create it if it does not exist) and add ".:" to that directive. To fix Drupal only, edit as root /includes/bootstrap.inc, and add the line "ini_set("include_path",".");" around line 639 of that file, before the "unset($conf);" line and the subsequent four "include_once..." directives. Once done, restart apache. Either one worked (for me) to get Drupal to display its main page."

ukiserve’s picture

Why you don't fix this BUGG????

It is not good programming if peaple have to change there mashines settings even if you go on in programming!
Just for hint!

heine’s picture

Welcome to the community.

This is arguably a configuration issue, not a Drupal bug. Submit a proper bugreport or feature request if you feel that strong about it (but search the bug list first).
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

adavidow’s picture

Thanks for posting this. In my case, my site is hosted, so I couldn't edit php.ini. But once I knew where to look, I was able to find a typo in a setup I installed ages ago to overwrite the ISP's php.ini - it was in my root .htaccess file (note - this could be your drupal .htaccess file - in my case, I have both the root .htaccess file that covers all php work on my various sites, and the drupal .htaccess file, used only by drupal. Because I had altered include_path in my root .htaccess file, that is where I made the correction:

php_value include_path ./usr/home/...

became

php_value include_path .:/usr/home/...

(I had forgotten to insert a colon between the "dot" that means "current directory" and the first absolute address in the include_path statement.)

Hope this helps the next person in this situation. And, if your problem is that you simply need to add the ".:" to php.ini, you can do it in a similar fashion - although make sure that you haven't closed off other paths that the original php.ini included or else you'll lose access to the isp-hosted php tools. The best way to do this would be to use something like:

php_value include_path .:/another new path:$path

where $path is the variable that appends the existing include_path to your addition(s).

adavidow’s picture

Double-checking my last statement, I note that $path could be a variable name in a php statement, but it does NOT perform the function of appending whatever the existing include_paths were. I cannot find such a function in php (although it would be common in shell configuration files), so, instead, be careful that your revised, local include_path contains the paths defined in your ISPs php.ini file (for that, you can just use phpinfo()), and then includes any local paths that are relevant.

Most ISPs will have included ".:" in their generic php.ini include_path setups.

rallyant’s picture

oops, wrong spot

rallyant’s picture

I have had this problem a couple of times. Today been one of them.
Doing a database update seems to fix it.