Search code examples
localhostosx-mountain-lionphpsessionid

PHP Session ID in URL on localhost


For some reason, my local install of a project I'm working on is adding the PHP session ID to the URLs. This doesn't happen on any other servers. Is there a setting I can change on my end to alter this? I'm using PHP 5.4 on Mac OS 10.8.2

Sample URL: http://localhost/project/subfolder/index.php/admin/game?PHPSESSID=mhnpc0g2c8rijqpkf8lhpfshh7

Should be: http://localhost/project/subfolder/index.php/admin/game

Update: I've checked my PHP.ini file and I have the following settings correct, but I'm still getting the session ID in the URL.

session.use_cookies = 1
session.use_only_cookies = 1
session.use_trans_sid = 0

Oh, and for good measure I'm restarting Apache after each change to PHP.ini :-)

2nd Update: Where else on my mac could an ini file be hiding? Is PEAR messing with this maybe? Thanks all!


Solution

  • session.use_cookies = 1 session.use_only_cookies = 0 session.use_trans_sid = 1