I installed Drupal on a VPS (apache) server, and everything was going well. I began copying and enabling modules, and attempted to get the FlashVideo module working, along with making a few other changes all at once, so I'm not even sure where to pinpoint the beginning of my problem. Bottom line, all I can see when I access my site is the following error:

----
Warning: require_once(./includes/bootstrap.inc) [function.require-once]: failed to open stream: Permission denied in /home/jason/public_html/index.php on line 12

Fatal error: require_once() [function.require]: Failed opening required './includes/bootstrap.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/jason/public_html/index.php on line 12

----

I was also having difficulty uploading flash files after installing the flashvideo module, and so I changed file permissions in the files folder, but changed them back after the error to no avail.

The error is being thrown on line 12 of index.php which reads: require_once './includes/bootstrap.inc';

I started looking around bootstrap.inc but I'm already in way over my head, and I'd like to not have to completely reinstall Drupal.

One of the configuration changes I made prior to the error was changing the upload parameters in the php.ini file in the directory: usr/local/lib but I was really careful not to make any stupid changes.
Another configuration change I made prior to the error was setting up a cron job, but I don't think that would cause a problem
And still another configuration change I made prior to the error was installing the contemplate module

Please help!

Comments

cog.rusty’s picture

A check list, from things that I have seen happening here:

- Does the 'includes' subdirectory exist? Is it located directly under public_html? (and not in a drupal/includes subdirectoy or anywhere else)

- Is the 'includes' subdirectory readable by the web server? (permissions at least 755, and not 700).

- Does the 'includes' subdirectory contain a 'bootstrap.inc' file? Does that file look undamaged (not zero length).

- Is the 'bootstrap.inc' file readable by the web server? (permissions at least 644, and not 600).

- Have you added any custom RewriteRules in Drupal's .htaccesss file?

jasonjason’s picture

Thank you so much for your help! When I changed the "includes" subdirectory permissions to "read, write, execute" I was able to log in and navigate the site mostly as normal, but there is still a hangover error that keeps popping up on most of my pages:

warning: fopen(files/.htaccess) [function.fopen]: failed to open stream: Permission denied in /home/jason/public_html/includes/file.inc on line 117.

I went through the rest of your checks, and everything looks ok. In regards to the last check, I haven't added any custom RewriteRules in Drupal's .htaccess file (although I have to the php.ini file)

The error refers to line 117, which contains this line of code:

if (($fp = fopen("$directory/.htaccess", 'w')) && fputs($fp, $htaccess_lines)) {

cog.rusty’s picture

This is about the 'files' directory which you have under drupal for storing your uploaded files. You need to make this 'files' directory writable by the web server (usually 777).

In the previous error, the ' includes' directory did not need to be writable, just readable by everyone would be enough. But here, the 'files' directory needs to be writable too.

jasonjason’s picture

It worked great - thank you for your help!

implementor’s picture

Hello there,

I had forgotten to copy over the Includes folder over to my site, and I figured it out because of what you wrote a year and a half ago. Thanks.

ciao, m a r t i n

deluxcanuck’s picture

I hope this reactivates the query.

I have the same problem jasonjason had. I have gone to the bootstrap page on Drupal and copied their code and pasted it into my copy of bootstap.inc and uploaded it. No change. I downloaded 6.14 again and took their bootstrap.inc and uploaded into my Includes file and still no change.

Going through your checklist I do indeed have a subdirectory and it is in it's proper place. BUT, I do not know what you mean by making it readable. How do I find and check the permissions?

BTW, I did not change my .htaccess file.

Cheers.

TechMosaic’s picture

I am sure this has been solved for the user above, but for troubleshooting purposes for the next person who needs it...here are two more things to check...

Check that if you are installing in a folder other than your root (www or public_html)
make sure your have edited both htaccess files (both the root, and the one in your working subfolder) to uncomment the Rewrite Base line (ie RewriteBase /home). I am sure a more experienced drupaler would tell you only one or the other of those two htaccess files are relevant, but until someone clarifies, just do it in both to be sure.

If you are running in a subdirectory, like I do (public_html/home) be sure to go into Cpanel and do a redirect so that your subdir becomes the default home directory for web visitors.
This is done by going to the Domains section of the cpanel home page, and selecting the globe and www icon labeled "redirects"

If all else fails, and you have a custom theme, try temporarily renaming any added theme folders that are in your ..sites/all/themes folder, so that your install will default back to a drupal-safe theme. A poorly written php file in a theme could mess you up.

steve@ultimateitss.com’s picture

I just updated a required security file and now recive this error and can not access the web site at all.

Warning: require_once(/homepages/31/d375557009/htdocs/1and1drup/includes/bootstrap.inc) [function.require-once]: failed to open stream: No such file or directory in /homepages/31/d375557009/htdocs/1and1drup/index.php on line 19

Fatal error: require_once() [function.require]: Failed opening required '/homepages/31/d375557009/htdocs/1and1drup/includes/bootstrap.inc' (include_path='.:/usr/lib/php5') in /homepages/31/d375557009/htdocs/1and1drup/index.php on line 19

steve@ultimateitss.com’s picture

I blasted the core and started over.. Much easier.. Trying to control which users see what documents...

pierredvumali’s picture

thanks for the check list. I had other files that were missing from my includes folder but I got the idea and copy the other files until it worked.