Upgrade fail | Cannot regenerate session id etc.

Having trouble installing serendipity?
david@mediacopy
Regular
Posts: 56
Joined: Sun May 18, 2008 5:50 pm

Upgrade fail | Cannot regenerate session id etc.

Post by david@mediacopy »

Hi all,

I've just upgraded to the latest version v1.7.

Download \ Upload seemed to go ok and the installation screen when I loaded the blog did not report any errors. The front side of the blog appears to work OK.

However, when trying to access the admin side I'm getting:

Code: Select all

 == SERENDIPITY ERROR ==

Please correct:

session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in /home/davidtap/public_html/blog/include/functions_config.inc.php on line 363
I've flushed the cache etc but it's not going away.

We're:
Apache version 2.2.24
PHP version 5.2.17
MySQL version 5.0.96-community-log

Any suggestions to fix ?

Many thanks


David
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Upgrade fail | Cannot regenerate session id etc.

Post by Timbalu »

hmm, thats odd.

Its a PHP internal function called by Serendipity logout and authenticate. Usually it cries when the setCookie and SESSION somehow errored, or any thrown PHP notices catched up before.
You might need to check your cookie handler to work correctly, or even temporary add

Code: Select all

$serendipity['production'] = false;
in your serendipity_config_local.inc.php file, to see if any error notices were thrown before. That could give us a hint what the actual error is.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
david@mediacopy
Regular
Posts: 56
Joined: Sun May 18, 2008 5:50 pm

Re: Upgrade fail | Cannot regenerate session id etc.

Post by david@mediacopy »

Cheers Ian.

I'll make the amend to the serendipity_config_local.inc.php tomorrow and see how it gets on.

When you say "You might need to check your cookie handler to work correctly" how do you mean ? This would be a php server setting ?

I had logged in immediately before doing the update (and back-up) to see if there was an update option on the admin panel and wondered if that may have caused the issue.

Is there a way of validating the install outside of the admin panel ? Perhaps there was an ftp error during upload (although non were reported).
kleinerChemiker
Regular
Posts: 765
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria
Contact:

Re: Upgrade fail | Cannot regenerate session id etc.

Post by kleinerChemiker »

Check if there is any character (also whitespace) before and after the php opening and closing marks, respectively
david@mediacopy
Regular
Posts: 56
Joined: Sun May 18, 2008 5:50 pm

Re: Upgrade fail | Cannot regenerate session id etc.

Post by david@mediacopy »

Adding "$serendipity['production'] = false;" gives the following error when clicking to "Open Login Screen"

Code: Select all

Fatal error:  Uncaught exception 'ErrorException' with message 'session_regenerate_id() [<a href='function.session-regenerate-id'>function.session-regenerate-id</a>]: Cannot regenerate session id - headers already sent' in /home/davidtap/public_html/blog/include/compat.inc.php:130
Stack trace:
#0 /home/davidtap/public_html/blog/include/functions_config.inc.php(365): errorToExceptionHandler()
#1 /home/davidtap/public_html/blog/serendipity_admin.php(33): serendipity_session_destroy()
#2 {main}
  thrown in /home/davidtap/public_html/blog/include/compat.inc.php on line 130
I had a look for any odd characters on the opening "<?php" and dropped the comment to a second line with no change. There does not seem to be any closing marks "?>" code on this file (and some others).
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Upgrade fail | Cannot regenerate session id etc.

Post by Timbalu »

Ok, that is the same as before. Deactivate that again. (And you did really not have any other errors before the session regenerate error?). This is strange. Check your servers error.log file (or access.log).

Not closing "?>" do not harm, normally, but maybe this does (...?...) - try

Code: Select all

	// End of Serendipity configuration file
	// You can place your own special variables after here:

?>
For cookies and sessions
http://php.net/manual/en/session.configuration.php
http://php.net/manual/en/features.cookies.php
http://www.bogotobogo.com/php/php14_coo ... ssions.php
The last one also offers test scenarious.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
david@mediacopy
Regular
Posts: 56
Joined: Sun May 18, 2008 5:50 pm

Re: Upgrade fail | Cannot regenerate session id etc.

Post by david@mediacopy »

The serendipity_config_local.inc.php is closed of OK. It's the other file noted in the error that's not, but then neither are some of the others in the include directory.

I'll have a look at the links. I'm not that technical so I may been to restore back to the old version.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Upgrade fail | Cannot regenerate session id etc.

Post by Timbalu »

I don't think its a question of version. Serendipity 1.7 is running fine everywhere.
Ask your ISP about Server changes that might have caused this issue and see my notes about the logs.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
david@mediacopy
Regular
Posts: 56
Joined: Sun May 18, 2008 5:50 pm

Re: Upgrade fail | Cannot regenerate session id etc.

Post by david@mediacopy »

Timbalu wrote:I don't think its a question of version. Serendipity 1.7 is running fine everywhere.
Ask your ISP about Server changes that might have caused this issue and see my notes about the logs.
Well, the 'old' version worked immediately prior to the upgrade which hints to me that it's perhaps something to do with the upgrade process.

We have suffered indifferent ftp connections to the server so it may be a possibility that there was an issue with uploading the file set.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Upgrade fail | Cannot regenerate session id etc.

Post by Timbalu »

Yeah try to upload again, or use the autoupdate (which would need you to downgrade the version number before, in serendipity_confiig.inc.php and the local one).
What is the URL?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
david@mediacopy
Regular
Posts: 56
Joined: Sun May 18, 2008 5:50 pm

Re: Upgrade fail | Cannot regenerate session id etc.

Post by david@mediacopy »

I'm just trying to recover the old setup using the cpanel restore functions (!) and that's uploading now, fingers crossed.

I looked for an auto update function but could not find it - how\where does that work ?
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Upgrade fail | Cannot regenerate session id etc.

Post by Timbalu »

How to use the Serendipity Autoupdate:
  • Set configuration → path → autodetect host name to yes,
    (due to a bug, with upgrade to 1.7 only)
  • install the Spartacus event plugin, if not already have
  • install the Dashboard event plugin,
  • then the Serendipity Autoupdate plugin,
  • update all plugins, if any, via plugin management upper slight rose button links,
  • purge the browsercompatibility plugin
  • and point yourself to the backends startpage to start the automatic upgrade.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
david@mediacopy
Regular
Posts: 56
Joined: Sun May 18, 2008 5:50 pm

Re: Upgrade fail | Cannot regenerate session id etc.

Post by david@mediacopy »

Timbalu wrote:How to use the Serendipity Autoupdate:
  • Set configuration → path → autodetect host name to yes,
    (due to a bug, with upgrade to 1.7 only)
  • install the Spartacus event plugin, if not already have
  • install the Dashboard event plugin,
  • then the Serendipity Autoupdate plugin,
  • update all plugins, if any, via plugin management upper slight rose button links,
  • purge the browsercompatibility plugin
  • and point yourself to the backends startpage to start the automatic upgrade.
ah, perfect. I'll get that installed once the restore finishes.

Thanks for your help :)
david@mediacopy
Regular
Posts: 56
Joined: Sun May 18, 2008 5:50 pm

Re: Upgrade fail | Cannot regenerate session id etc.

Post by david@mediacopy »

Good news - the restore worked out OK and I'm back into the admin side :D
david@mediacopy
Regular
Posts: 56
Joined: Sun May 18, 2008 5:50 pm

Re: Upgrade fail | Cannot regenerate session id etc.

Post by david@mediacopy »

I'm not sure what's going on. I set up the auto update and it seemed to go well, as before, but the result is the same.

I did get a screen talking about specific things it needed to do as I'm upgrading from 1.5(?) to 1.7 but no errors returned that I could see.
Post Reply