Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6734837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:56:11+00:00 2026-05-26T10:56:11+00:00

I’m getting inconsistent session serialization on my development and production environments. Code is identical,

  • 0

I’m getting inconsistent session serialization on my development and production environments.

Code is identical, synced with SVN. Apache and PHP configuration is basically identical, only the domain name is different. Both are running Debian Squeeze, the server is 64 bit and development is 32 bit.

On the server, the data being saved looks like base64 encoded, though I am not sure it is :

vvZKW5WEbvvRCs0-M0R8zTDAuTsKZSADKORDemOWOXqPJs0J42l7nZIewsHp8JjGFQw64Xq2x5dB_7187W4HPdJ1Yo5yK6oHvB8ofx7GL82WJCaPrzP8pR1xm02f9HenDaShvy1WTHuMuCSJ3zWGUnjRpOuJtZ49v4Dh2L5U0M4.

The development session data is the normal PHP style :

foo|s:3:"bar";baz|s:6:"wombat";promoter|O:8:"stdClass":0:{}475b17e28b25580bb92430bb286637ddlanguage|s:5:"en_us";

On the server, session management doesn’t work properly, for example going to a subdomain on the site causes the session to be reinitialized for all subdomains.

I’m using the Yii framework though I’ve eliminated that as the source of the problem by copy pasting the code found here in my index.php file before any processing is done by the framework.

So my questions are : why is this happening, and how can I make the server save session data like the development environment ?

BTW, I would much rather not have to resort to some nasty hack like :

function writeSession($id,$data)
{
     $data = serialize($_SESSION);
     ....
}

TIA.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:56:11+00:00Added an answer on May 26, 2026 at 10:56 am

    Got some help on this, the difference between the two servers was that one had the suhosin patch installed and set to encrypt session data, while the other did not.

    I installed the suhosin patch on the server that didn’t have it, but it was creating some problems for me, so I disabled the session encrypt feature on both servers. Everything is now working as expected.

    In the settings file, in my case /etc/php5/conf.d/suhosin.ini

    suhosin.session.encrypt = Off
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm trying to create an if statement in PHP that prevents a single post
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.