Hi my fellow Drupal members, I have been struggling with a serious issue all day and was hoping that some kind soul might be able to help me.

I just moved my Drupal installation from a Shared host (Hostgator) to a VPS (WiredTree) about a week ago and had some issues at first, but after talking with my new webhost and switching PHP back to 5.3 (from 5.4) it seemed that my site was up and running properly. Until I went to work on my site this morning and found the infamous…

Error
The website encountered an unexpected error. Please try again later.

I naturally contacted my new host and after 13 hours my site still remains down with no progress at all and I am getting frustrated as I am losing revenue and frustrating my loyal readers.

Although I consider myself fairly tech savvy I am not a programmer by any means and the server side or backend of things confuses me greatly.

I have been searching on Google for hours and found MANY different people who have had the same issue (hundreds of posts online and even on Drupal.org) but feel like I am no closer to finding a resolution.

I need help.

I worked on my site 7 hours before accessing it again to find that it was not functioning properly. I did not download anything, or update anything, or anything out of the ordinary. Just replied to a lot of comments and added some articles.

I have not made any backups yet on my new server (I am retarded for that) and have put a week’s worth of work and effort into my site since the move so I would rather not try to salvage another backup that’s weeks old as I would lose so many hours of work it makes me cringe.

How can I even start trying to locate the cause of this problem and how can I start to go about fixing it. This happened at the worst time possible and I need my site working and running properly again and don’t even really know where to start.

Please, without copying and pasting pages from the first search results in google, can someone lend me a hand in plain English and give me any advice that can help me solve this problem? How can I even access an error log to see what might have caused it in the first place?

My Host has tried to force a recovery of the InnoDB data in safe mode, in an attempt to recover a corrupt InnoDB database, he tried redoing the entire database with no luck, the The MySQL database is running normally, and he says he doesn’t see any signs of database corruption…

They did find something and said that it looks like the corrupted table cache_bootstrap in my site was causing Drupal errors but they also tried to dump and re-import that table with no luck.

HERE is the error log that my new host sent to me (but it may as well be in Latin as I don’t even know what to look for):

[31-Aug-2014 04:08:58 America/Chicago] PHP Fatal error: Out of memory (allocated 1048576) (tried to allocate 7680 bytes) in /home/myuser/public_html/includes/bootstrap.inc on line 827
[31-Aug-2014 04:08:59 America/Chicago] PHP Fatal error: Out of memory (allocated 6815744) (tried to allocate 54 bytes) in /home/myuser/public_html/includes/common.inc on line 7346
[31-Aug-2014 04:08:59 America/Chicago] PHP Fatal error: Out of memory (allocated 6815744) (tried to allocate 54 bytes) in /home/myuser/public_html/includes/common.inc on line 7346
[31-Aug-2014 04:08:59 America/Chicago] PHP Fatal error: Out of memory (allocated 6815744) (tried to allocate 32 bytes) in /home/myuser/public_html/includes/common.inc on line 7346
[31-Aug-2014 04:08:59 America/Chicago] PHP Fatal error: Out of memory (allocated 6815744) (tried to allocate 54 bytes) in /home/myuser/public_html/includes/common.inc on line 7346

My Host then “ran the index.php file on the command line” and it produced the following error:
root@myserver [### ##:##:## /home/myuser/public_html]# php index.php

Notice: Undefined index: REMOTE_ADDR in /home/myuser/public_html/includes/bootstrap.inc on line 2901

Notice: Undefined index: REMOTE_ADDR in /home/myuser/public_html/includes/bootstrap.inc on line 2901

Notice: Undefined index: REMOTE_ADDR in /home/myuser/public_html/includes/bootstrap.inc on line 2901

Notice: Undefined index: REMOTE_ADDR in /home/myuser/public_html/includes/bootstrap.inc on line 2901
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'myuser_mysites.cache_bootstrap' doesn't exist: DELETE FROM {cache_bootstrap}
WHERE (cid = :db_condition_placeholder_0) ; Array
(
[:db_condition_placeholder_0] => variables
)
in cache_clear_all() (line 165 of /home/myuser/public_html/includes/cache.inc).

Oh and we tried increasing the memory_limit in the php.ini and this did not work either.

No pages load at all. Every page I try leads to the same error message. I tried running cron, and update.php, no luck.

Although after trying to run the update script I did get the following error:

Error message
PDOException: SQLSTATE[HY000]: General error: 1005 Can't create table 'user_mysite.cache_bootstrap' (errno: -1): CREATE TABLE {cache_bootstrap} ( `cid` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.', `data` LONGBLOB NULL DEFAULT NULL COMMENT 'A collection of data to cache.', `expire` INT NOT NULL DEFAULT 0 COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.', `created` INT NOT NULL DEFAULT 0 COMMENT 'A Unix timestamp indicating when the cache entry was created.', `serialized` SMALLINT NOT NULL DEFAULT 0 COMMENT 'A flag to indicate whether content is serialized (1) or not (0).', PRIMARY KEY (`cid`), INDEX `expire` (`expire`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Cache table for data required to bootstrap Drupal, may be...'; Array ( ) in db_create_table() (line 2720 of /home/useraccount/public_html/includes/database/database.inc).

I am at a loss. My host installed a server auto backup from this morning as sort of a last ditch effort and the site came up briefly but he said that the database was on the verge of failing, and when I went to create a local backup of my site using backup and migrate the screen had trouble loading and then it popped up with a bunch of text and jiberish on the screen.

I did manage to turn on error messages and got the following:

• There is a security update available for your version of Drupal. To ensure the security of your server, you should update immediately! See the available updates page for more information and to install your missing updates.
• Warning: Cannot modify header information - headers already sent by (output started at /home/username/public_html/index.php:2) in drupal_goto() (line 698 of /home/username/public_html/includes/common.inc).
• Warning: Cannot modify header information - headers already sent by (output started at /home/username/public_html/index.php:2) in drupal_send_headers() (line 1228 of /home/username/public_html/includes/bootstrap.inc).
• Warning: Cannot modify header information - headers already sent by (output started at /home/username/public_html/index.php:2) in drupal_send_headers() (line 1228 of /home/username/public_html/includes/bootstrap.inc).
• Warning: Cannot modify header information - headers already sent by (output started at /home/username/public_html/index.php:2) in drupal_send_headers() (line 1228 of /home/username/public_html/includes/bootstrap.inc).
• Warning: Cannot modify header information - headers already sent by (output started at /home/username/public_html/index.php:2) in drupal_send_headers() (line 1228 of /home/username/public_html/includes/bootstrap.inc).
• Warning: Cannot modify header information - headers already sent by (output started at /home/username/public_html/index.php:2) in drupal_send_headers() (line 1228 of /home/username/public_html/includes/bootstrap.inc).
• Warning: Cannot modify header information - headers already sent by (output started at /home/username/public_html/index.php:2) in drupal_send_headers() (line 1228 of /home/username/public_html/includes/bootstrap.inc).

I had a feeling that the backup was either around the time of the crash or after it so no help there…
ANY and ALL advice would be appreciated.

Comments

Jaypan’s picture

You've got two issues that you should work on first (which hopefully will solve the problem):

1) "PHP Fatal error: Out of memory". This means you don't have enough memory for PHP. Changing it in php.ini will not help if your host does not allow it to be changed in php.ini. Also, shared hosts will have limits to the amount of memory you can dedicate to PHP, so even if you can change it in php.ini, you may need more than your host allows. Find out how much they allow, and ask them to increase it to that amount for you. If you are still getting 'out of memory' errors, then you need to get a new host.

2) You're missing at least one table - {cache_bootstrap}. I see you tried something that would create that, and it wasn't able to be created. I don't have a solution for you, but you're going to need to create this table.

VM’s picture

This question is better served in the 'post installation' forum. Please edit the opening post and move it. Thanks.

oo7_golden_1’s picture

Moved to different Forum section as per your suggestion.

1kenthomas’s picture

Hi,

(Note messaged you separately per your Services post).

Mostly I'll repeat the above:

1)Memlimit needs to be raised in php.ini. You may be able to get away with disabling modules via system table etc to get down use, but its common enough that Drupal will sometimes need more memory than above. You may need to track down a module causing memory bloat afterwards, but getting control of php allocation is necessary. (I'm unaware of details on your particular host).

2) The fact that a table is missing does not seem to bode well after a hosting transfer. Is it the only table missing, or was the transfer not successful? The contents of a cache table are likely not so critical (as they're transient), but the contents of other tables would be. Hopefully you will have backups from the previous host; depending on the situation, it may make sense to begin from a revert to these backups.
If you're code-familiar, you can usually read the modules that created the tables in the first place to see how to replicate them; however if you need data that was in those tables, then you have to go looking for it in backups. Again, if the problem is systematic, it simply may make more sense to restore the database from a known-good backup, outright.

Hope that helps.

Jaypan’s picture

A cache table is not so critical, but others would be.

To elaborate on this, the contents of a cache table are not critical, but the table itself is.

1kenthomas’s picture

^^ thanks. Language clarified. :)

oo7_golden_1’s picture

Hi Guys, thanks for the responses so far.

Ok, here is a site update post.

On August 31st and September 1st and 2nd I had a lot of Out of memory issues. My Host was able to edit and adjusted the memory_limit in my php.ini from 64M to 128M. My host tells me I have not had a memory error message since September 2nd (but my site is still down and is not functioning properly, I still do not know why).

In the meantime I received an error in relation to Colorbox, so I disabled Colorbox and one other Colorbox dependent module. My host also said that there might be a problem with entity cache module so I was lucky enough to access the Drupal interface long enough to disable that app. Still no effect.

My new host just let me know that I forgot to save my openenterprise profile when I unsuccessfully tried to update last night as well. Opps! Uploaded a backup through FileZilla a few moments ago and tried to run update.php and got the following error.

Error message
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'username_sitename.cache_bootstrap' doesn't exist: CREATE TABLE {cache_bootstrap} ( `cid` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.', `data` LONGBLOB NULL DEFAULT NULL COMMENT 'A collection of data to cache.', `expire` INT NOT NULL DEFAULT 0 COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.', `created` INT NOT NULL DEFAULT 0 COMMENT 'A Unix timestamp indicating when the cache entry was created.', `serialized` SMALLINT NOT NULL DEFAULT 0 COMMENT 'A flag to indicate whether content is serialized (1) or not (0).', PRIMARY KEY (`cid`), INDEX `expire` (`expire`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Cache table for data required to bootstrap Drupal, may be...'; Array ( ) in db_create_table() (line 2720 of /home/username/public_html/includes/database/database.inc).

The search for the answer continues. Heck maybe I will get lucky and find the holy grail or Jimmy Hoffa along the way.

Jaypan’s picture

You are missing the table {cache_bootstrap}. You need to recreate this table. You don't have to worry about the contents of it, they are not necessary, but the table has to exist in your database.