[kwlug-disc] Drupal 7 question

Ronald Barnes ron at ronaldbarnes.ca
Sun Jan 21 12:37:10 EST 2018


Khalid Baheyeldin wrote on 2018-01-21 08:07 AM:

> First a side point: Why PHP 7.1? The 16.04 LTS version is 7.0 and it
>  runs Drupal 7 successfully.

I've had so many issues setting up this little server that I'd switched
to PHP 5.6 to see if that helped.

It didn't, but I recall from an answer you gave on a previous question
that Drupal 7 and PHP 7 worked together fine.


So, since everything was mostly working save this one issue, I switched
back to PHP 7, but saw 7.0, 7.1, and 7.2 available.

I chose the safest looking (middle) option.


> Second, check the settings.php for each site, and make sure that you
>  have values for the following:
> 
> ini_set('session.gc_maxlifetime', 200000); 
> ini_set('session.cookie_lifetime', 200000);

That was the problem!

For reasons beyond comprehension, some dumbass (*cough*) had set those
values to 10 in the distant past.



> $cookie_domain = '.example.com <http://example.com>'; // Set a unique
>  FQDN for each site.

This is now set too.



> Third, are you sharing tables across sites? If so, then this is not 
> something you should do for various reasons, among which the most 
> important is the inability to decouple the sites to various servers
> in the future. It can also cause this log out issues.

No, sounds like a disaster in the making for exactly the reasons you
outline, and it's just easier to create new db users and grant them all
privileges on newdb.* for best security.


> Fourth, check your users table and make sure there is an entry for 
> anonymous users, with uid 0.

Got that.


Thanks Khalid!

r b




More information about the kwlug-disc mailing list