I'm using Drupal 4.7.2 and my host recently updated PHP from 5.1 to 5.2. Since then, no one is able to log in. The host found a patch called session_2.patch on the drupal site at http://drupal.org/node/93945#comment-155161 and has applied it. It made absoluetly no difference so either the patch wasn't applied properly or the problem is not related to whatever this patch fixes.
Is there a problem with logins and PHP 5.2? If so, is the patch mentioned by the host the correct patch? If not, is there a patch and where would I find it? Lastly, how does one apply a patch? I do have some access to the server, though very limited, and I know nothing about the server side software. In particular, I know nothing about unix which is the os used on the server.
Comments
The patch is the correct one
The patch is the correct one and should have fixed the PHP 5.2 problem. See: http://drupal.org/node/102114
Check this one too, just in case: http://drupal.org/node/77106
Okay, so this is the correct
Okay, so this is the correct patch. I looked up how to apply a patch and it seems that for unix I need to use the command
patch -p0 < path/file.patch. I do not know unix. Could someone please explain what each part means? I clearly need to replacefile.patchwithsession_2.patch, which is the patch name, but what about the rest of it?Any help would be most appreciated. The users haven't been able to log on for some weeks now.
You need to have 'ssh
You need to have 'ssh access' to your server using a program like putty so that you can type unix commands, or a patch program in your pc to fix it there and then upload the patched files. You also need to check the directories where your unpatched files are, according to what the patch file expects.
It is a bit dangerous to try to explain more if you haven't already understood the instructions in the handbook. Things can go wrong and it will be a very long discussion. Perhaps it is simpler to do it manually.
So, open the patch file with a text editor and look at it. Do you see a
register_shutdown_function('session_write_close');line near the bottom, with a + in front?All you have to do is add this line (without the +) at the proper place in your 'includes/session.inc' file, near line 20. If it is already there, then it is fixed. If not, you can add it with a text editor.
Thanks CogRusty. I use
Thanks CogRusty. I use CoreFTPLite to access the site. I was able to download session.inc, add the appropriate line, then upload the modified file. It worked beautifully. The site users will be very happy that they can log in once more, as I am.
Once again, thanks for that.