Hi, I've got a big a problem, hope someone can help.

Suddenly my site doesn't work for admin user. Whenever I log in, it shows a blank screen so I can't access any administration page (so I can´t see the error log). It looks like anonymous and registered (non-admin) navigation is unaffected.

It happened after I automatically installed updates to Devel and Metatag modules and ran update

Any suggestion, please?

Comments

Jaypan’s picture

Look at your apache and php error logs. They should give you an indication as to the problem.

Also, when you get it back up and running, you should disable the devel module. This module shouldn't be enabled on production sites.

sprnknwn’s picture

Thanks, but I would really appreciate more detail where to look.

The error_log in the ftp shows nothing at all.
In Cpanel "Error log", I just see errors like this, I don't know if the problem is there. Could be a memory thing? I have 128M which I think is fairly high (it's a really simple site, I don't think it needs so much but I have a bigger website in the same hosting) and I don't think I'm allowed to more.

[Fri Feb 07 08:58:30 2014] [error] [client XXX.XX.XX.XX] PHP: Error parsing /home/.../public_html/php.ini on line 1

Jaypan’s picture

That's your problem. There is an error in/with your php.ini. Rename the file and try again.

sprnknwn’s picture

Sorry, but I don't get what you mean.

Why renaming and renaming to what? It's called "php.ini" , it's what it should be called, isn't it?

Anyway I've, just renamed it randomly and then back to the previous state and has no effect.

Thanks again

Jaypan’s picture

The file php.ini is automatically picked up by php at runtime, before Drupal is loaded. You have an error in your php.ini file, as the error is telling you:

PHP: Error parsing /home/.../public_html/php.ini on line 1

Because of this error, PHP won't be able to load properly. Renaming it to something else, such as php.ini.bak will mean it is not picked up by the system, which should solve your problem.

If it doesn't, it means that you have another error somewhere else (or the php.ini error is old - look at the date on the error). Look in the database at the last line of the watchdog table to see if it is a Drupal error.

sprnknwn’s picture

Ok, I understand. It does nothing. :( But the php.ini error is happening now and constantly, 3-6 times each minute more or less (I don't know if it happened before as this log only shows 300 records).

By the way, the problem happens just with the admin user.
Anonymous users can navigate and a register user with no admin permissions, too.

I login, url goes to www.xxx.com/user/1 and I get blank page. And while I'm logged that way, I can't access any page, all appear blank. Really frustrating.

I don't know, is there anything that I can try from the database or something? Although there's this php.ini error, that php.ini file has been there for months. I mean, there must be something corrupt within these updates that makes the php.ini look wrong but it's unlikely the file has a problem per se.

Jaypan’s picture

It sounds like the php.ini issue is a separate issue.

Can you get to /admin/reports/dblog?

sprnknwn’s picture

No, that's the whole problem, nor the dblog nor anything under admin.

Jaypan’s picture

Then you need to open your database, go to the watchdog table, and look at the last row in the table to find out what the error is.

sprnknwn’s picture

Sorry for not being really smart at this, but I can't see anything relevant, don't know if looking in the right spot.

Just me (user 1) making login and then doing nothing (of course). I've cleared my browsers cache so to replicate the proccess of login and it's the same, it registers that movement but no error apears in the table when I try to reach any page and I get a blank one.

19996 1 user Session opened for %name. [BLOB - 33B] 5 http://www.xxxxx.com/user

Thanks a lot, one more time.

sprnknwn’s picture

Nobody has any other suggestions, please?
I refuse to think that the only solution is deleting everything and starting over...

Chi’s picture

White screen is often caused by php fatal errors. You cannot see this kind of errors until you enable this feature in your php configuration.
See http://php.net/manual/en/errorfunc.configuration.php#ini.display-errors for further information.

________________________
Override, don't change!

Jaypan’s picture

I just looked back and realized you only looked at the cpanel error log - this is incomplete. You need to look at the apache (or whatever server you are using) and php error logs directly on the server. If you are on shared hosting you may not have access to these, but your host will tell you what is in them.

sprnknwn’s picture

Thanks to both.

I will look for it, I'm on shared hosting. I'll let you know if I get to fix it.

letsbuild’s picture

Hi sprnkwn, I'm having the exact same problem.
I haven't been able to fix the problem but noticed that I can login to the site fine on a windows machine but not on my mac.

def0021’s picture

i have the exact same problem... did you find a way to fix this?
+ never mind, found this https://drupal.org/node/2190211

amh5514’s picture

Check your settings.php file. I've ran across this problem a few times and I've either had space preceding <?php on line 1 or something else which I couldn't figure out. Removing the space, if applicable, should help. If not, copy a clean settings file from a drupal 7.x download and change the db information to match your site's current setup.

canardesign’s picture

Same problem after migrating to remote server (OVH shared hosting), can login as normal user but user1 login is causing :
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in .../includes/database/database.inc:2171 Stack trace: #0 /.../includes/database/database.inc(2171): PDOStatement->execute(Array) #1 .../includes/database/database.inc(683): DatabaseStatementBase->execute(Array, Array) #2 ...includes/database/database.inc(2350): DatabaseConnection->query('SELECT expire, ...', Array, Array) #3 .../includes/lock.inc(169): db_query('SELECT expire, ...', Array) #4 .../includes/lock.inc(147): lock_may_be_available('theme_registry:...') #5 .../includes/theme.inc(449): lock_acquire('theme_registry:...') #6.../includes/bootstrap.inc(455): ThemeRegistry->set(Array) #7 [internal function]: DrupalCacheArray->__destruct() #8 {main} thrown in .../includes/database/database.inc on line 2171
If I delete the entry in session table or clear the browser's cookies I get my site back. It's a relatively small drupal commerce site. On my local machine it works fine... Tried to ask the hosting company with no luck :/

naiduharish’s picture

Enable error_log by adding below code to settings.php usng,
$conf['error_level'] = 2;

If there is any error related to syntax or database, it would be visible on your screen when you login.
Hope this will help you to debug the issue.

canardesign’s picture

Thank you for your reply, I did what you told and I get indeed more details but I don't know what to do with it :

Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT r.filename AS filename FROM {registry} r WHERE (r.name LIKE :db_condition_placeholder_0 ESCAPE &#039;\\&#039;) AND (r.type = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] =&gt; ctools\_export\_ui [:db_condition_placeholder_1] =&gt; interface ) in _registry_check_code() (line 3175 of /home/tapdancejt/www/dev/includes/bootstrap.inc).

Additional

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] =&gt; 1 [:db_insert_placeholder_1] =&gt; php [:db_insert_placeholder_2] =&gt; %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] =&gt; a:6:{s:5:&quot;%type&quot;;s:12:&quot;PDOException&quot;;s:8:&quot;!message&quot;;s:349:&quot;SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT r.filename AS filename FROM {registry} r WHERE (r.name LIKE :db_condition_placeholder_0 ESCAPE &amp;#039;\\&amp;#039;) AND (r.type = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] =&amp;gt; ctools\_export\_ui [:db_condition_placeholder_1] =&amp;gt; interface ) &quot;;s:9:&quot;%function&quot;;s:22:&quot;_registry_check_code()&quot;;s:5:&quot;%file&quot;;s:47:&quot;/home/tapdancejt/www/dev/includes/bootstrap.inc&quot;;s:5:&quot;%line&quot;;i:3175;s:14:&quot;severity_level&quot;;i:3;} [:db_insert_placeholder_4] =&gt; 3 [:db_insert_placeholder_5] =&gt; [:db_insert_placeholder_6] =&gt; http://www.tapdanceworld.com/dev/users/duck [:db_insert_placeholder_7] =&gt; http://www.tapdanceworld.com/dev/user [:db_insert_placeholder_8] =&gt; 78.123.181.115 [:db_insert_placeholder_9] =&gt; 1438947502 ) in dblog_watchdog() (line 160 of /home/tapdancejt/www/dev/modules/dblog/dblog.module).


Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /home/tapdancejt/www/dev/includes/database/database.inc:2171 Stack trace: #0 /home/tapdancejt/www/dev/includes/database/database.inc(2171): PDOStatement->execute(Array) #1 /home/tapdancejt/www/dev/includes/database/database.inc(683): DatabaseStatementBase->execute(Array, Array) #2 /home/tapdancejt/www/dev/includes/database/database.inc(2350): DatabaseConnection->query('SELECT expire, ...', Array, Array) #3 /home/tapdancejt/www/dev/includes/lock.inc(169): db_query('SELECT expire, ...', Array) #4 /home/tapdancejt/www/dev/includes/lock.inc(147): lock_may_be_available('schema:runtime:...') #5 /home/tapdancejt/www/dev/includes/bootstrap.inc(433): lock_acquire('schema:runtime:...') #6 /home/tapdancejt/www/dev/includes/bootstrap.inc(455): DrupalCacheArray->set(Array) #7 [internal function]: DrupalCacheArray->__destruct() #8 {main} thrown in /home/tapdancejt/www/dev/includes/database/database.inc on line 2171

I'm trying to get my hosting provider increase mysql max_allowed_packets, not sure it will help...

ragavendra_bn’s picture

I am in the same situation as you are, below are the urls showing wsod to me.

/node/1
/user/1

I almost tried everything as in this post. May be it is the permissions, not sure though.

ragavendra_bn’s picture

I guess I had a bad .htaccess file , once I replaced it from another installation, all seems well, thanks.

prairiedog’s picture

We are posting this here in the event it might help others in the future. We had a project that, after moving to an upgraded server, the site appeared to work fine until logging in... then WSOD or HTTP Error 500. We could - however - manually navigate to "/admin", which worked, and we could also manually logout with "/user/logout" in the URL. Trying to invoke update.php also provided a fatal HTTP error. Turns out the fix was simple - increasing memory in cPanel for the hosting account for both "Home Directory" and the site URL. (In our case, we set memory at 256M... site is large and complex.) Everything then worked as it should.