Warning: SESSION variable max_allowed_packet is read-only. Use SET GLOBAL max_allowed_packet to assign the value query: SET SESSION max_allowed_packet = 2147483648 in /usr/home/hoslo/public_html/includes/database.mysqli.inc on line 128

Fatal error: Call to undefined function user_access() in /usr/home/hoslo/public_html/sites/all/modules/drupal_tweaks/modules/db_tweaks/db_tweaks.module on line 62

Woke up to a white screen and this message. To my knowledge nothing changed on the server. Had to remove module to clear error. Subsequent reinstall resulted in same error.

CommentFileSizeAuthor
#14 071210 - 16:59:47.png22.96 KBd4rkngel

Comments

spack’s picture

I have the exact same problem on my website right now too.

Starminder’s picture

anyone?

Starminder’s picture

Tried again today, still:

Warning: SESSION variable max_allowed_packet is read-only. Use SET GLOBAL max_allowed_packet to assign the value query: SET SESSION max_allowed_packet = 2147483648 in /usr/home/hoslo/public_html/includes/database.mysqli.inc on line 128

Fatal error: Call to undefined function user_access() in /usr/home/hoslo/public_html/sites/all/modules/drupal_tweaks/modules/db_tweaks/db_tweaks.module on line 62

xaxoto’s picture

i had the same problem and i couldn't do anything, download the latest drupal tweaks and db tweaks and overwrite them on the old files , then run yoursite.com/admin/update.php (dunno what's the link if you are not using clean url's) and after the update is finished it should be ok ...

Now i have a different problem, i'm setting max_allowed_packet by db_tweaks and the answer is "
user warning: SESSION variable max_allowed_packet is read-only. Use SET GLOBAL max_allowed_packet to assign the value query: SET SESSION max_allowed_packet = 104857600 in /users1/xaxocre/public_html/astro/sites/all/modules/drupal_tweaks/modules/db_tweaks/db_tweaks.inc on line 52.
Cannot change `max_allowed_packet` in your database configuration! Probably you do not have proper privileges. "
If anyone knows what should be done, or how can i manually set the max_allowed_packet .... i'll be glad to hear it

P.S: i'm on shared hosting and i dont have access to ssh or any command prompt

Starminder’s picture

xaxoto - I get this problem using the latest dev of drupal tweaks. Reinstalling is what results in the error.

kenorb’s picture

kenorb’s picture

Status: Active » Fixed

Sorry for delayed reply.

It's fixed now.
http://drupal.org/cvs?commit=302450

Starminder’s picture

I grabbed the updated db_tweaks file, however, then I got this error:

Warning: SESSION variable max_allowed_packet is read-only. Use SET GLOBAL max_allowed_packet to assign the value query: SET SESSION max_allowed_packet = 2147483648 in /usr/home/hoslo/public_html/includes/database.mysqli.inc on line 128

Fatal error: Call to undefined function theme() in /usr/home/hoslo/public_html/includes/common.inc on line 924

kenorb’s picture

t() is not allowed in hook_boot, so I've to fix this as well.
http://drupal.org/cvs?commit=302784

Now should be ok, sorry for that.

Starminder’s picture

Thank you thank you thank you! This fixed my issue and I can use the module again, YAY!

kenorb’s picture

Done couple of improvements:
http://drupal.org/cvs?commit=303164
hopefully there will be no any regression.

Starminder’s picture

I am now using dev dec 16th, so far no issues, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

d4rkngel’s picture

Status: Closed (fixed) » Active
StatusFileSize
new22.96 KB

Sorry for reopen this, but I'm still having this problem with Drupal Tweaks and Drupal core cache enabled, I get this error at the bottom of some pages:

Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'views_access' was given in ~/public_html/includes/menu.inc on line 452

Fatal error: Call to undefined function user_access() in ~/public_html/includes/menu.inc on line 449

Sometimes are both messages and sometimes is just the second that mention user_access()

disabling Drupal Tweaks or cache fixes de problem however I'd like to use both :\

I have to mention that I have a lot of modules enabled so I don't know if some of them are causing the issue, however this just happens with Drupal Tweaks, because disabling Drupal Tweaks and enabling drupal cache doesn't give any problem.

attached a screenshot

* sorry for the bad english

kenorb’s picture

I can't reproduce it, even with Drupal cache enabled.
Can you describe, which option are you using in Drupal Tweaks?
For PHP/DB? Msg Rules, etc?
Are you using dev version?

d4rkngel’s picture

I have just Database Tweaks enabled with the following options:

Enable SQL_BIG_SELECTS value: ON
Default MAX_JOIN_SIZE value: -1
Default MAX_JOIN_SIZE value: (same as my hosting provider defaults 'cause I can't change it)
Default wait_timeout value: 60

Edit: and yes I'm using more recently dev version

kenorb’s picture

Done some improvements in hook_boot:
http://drupal.org/cvs?commit=461780
http://drupal.org/cvs?commit=461782
Please test the latest dev version.
Thank you.

d4rkngel’s picture

Yet the same and now I'm having a new error msg on user profiles:

Fatal error: Call to undefined function user_uid_optional_load() in ~/public_html/includes/menu.inc on line 410

kenorb’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.