Not sure if this is theme development or new installs, but we have just switched servers and the Drupal message variable is completely persistent across page loads.

E.g.

1. If you login Drupal displays 'Login successful.' through our themes $messages variable
2. You navigate to another page and the message would load on the next page
3. Complete another action that Drupal gives a message for and it appends to the last message

This hasn't ever happened before but we have just moved hosts and I think it is either a setup/.htaccess/php.ini setting but I have no idea what/why/where.

Help would be very much appreciated,

Chris

Comments

chrispeat’s picture

The $message must be held in the database or held in cache somewhere as it is persistent across multiple pages (1 shows, 2 doesnt show then p3 shows again). Very frustrating and strange.

chrispeat’s picture

The problem happens even if I switch themes, its super strange! Definitely not a theme issue.

I've also compared builds of PHP and Apache and unless its a PHP version problem with 5.38 im stuck. All the settings are completely the same between new and old hosts. Tracking this down is an odd afternoon, anyone have anything similar?

chrispeat’s picture

Thought I would share my experiences.

This problem came immediately after moving host and it has transpired that the problem came from not having the max allowed packet set high enough in MySQL. After fixing this, the problem was fixed.

It is entirely bizarre and I would really like to know why this would be the problem?

When caching was turned on I could see that $messages would be sent to the DB and a fault could cause issue, but I had turned caching off and still had the problem so it doesn't make a whole host of sense to me... maybe I need to study the Drupal architecture a little more!

Anyway the fix is to up max_allowed_packet in my.conf on your server (Linux).

Hope this helps someone else...

Chris

WorldFallz’s picture

Please don't post duplicate threads, I've deleted the dupe. Thanks.

chrispeat’s picture

Didn't know where to post as I wasn't sure if it was a theme or Drupal issue - but also appreciate about the dupe. Consider myself told.

WorldFallz’s picture

no worries-- we were all new at one time or another ;-)