PHP / HTML / CSS

There are (thankfully rare) times when you need to force your system to pass PHP session values as URL query strings instead of as cookie values. In my case it was with American cell phone operators who have set their gateways to claim that they accept cookies and then ditch them silently.

In theory you can force PHP to transmit its cookie IDs as query strings in the php.ini or the htaccess files, however that’s often not available to those on shared boxes.

Yes, we’re talking about an issue that effects a small number of people here. Sadly, due to a server configuration issue, I’m one of them.

So, what’s the solution?

The following code tells PHP to use query strings instead of cookies…

ini_set('session.use_trans_sid',1);
ini_set('session.use_only_cookies',0);

Except, it doesn’t work. This, however, does work…

$_COOKIE = array();
ini_set('session.use_trans_sid',1);
ini_set('session.use_only_cookies',0);

Don’t ask me… I don’t understand it either.

Apr 2009
10
Welcome to Sodium

Every second a new blog is started1. This is the blog for this second…

Anything from this point onwards has been brought over from a different site. Unfortunately comments haven’t come over with them, so the sparkling wit my words generate isn’t here. Unless commenters are as bored as I was when I started the transfer.

For the record “Sodium Lights The Horizon” means nothing. It was a random phrase that came from a random conversation. It seems strangely lyrical but google returned zero hits on the phrase. Simple as that…

1 – I may have made that up. But you believed it, didn’t you…?