1
votes

I started using facebook php sdk with codeigniter but since then the urls on my website all have a 'PHPSESSID' added to the end.

I created a config file containing the app id and secret and used the following code to load the library.

$this->load->library('facebook');

Does anybody know of a workaround to this problem??

3
were you able to find a solution to this? - roopunk
@roopunk - see my answer stackoverflow.com/a/7643454/206613 - vikmalhotra
a foolproof solution is what i meant :) plus the PHPSESSID is not there in my url but rather present as a cookie. dont wanna fiddle with the fb library actually. thanks anyway! - roopunk

3 Answers

1
votes

The Facebook script uses PHP native sessions. You can change this in your php.ini file:

# set
session.use_cookies = 1
# to
session.use_cookies = 0

http://www.webune.com/forums/disable-phpsessid-phpini.html

0
votes

Instead of changing php.ini setting I went ahead and replaced the $_SESSION usages in facebook.php with Codeigniter sessions $this->session->set_userdata(). Works for me till now. Not very foolproof I guess.

0
votes

Just figured it out:

php.ini
session.use_trans_sid = 0

This will hide (make intransparent / invisible) all the PHPSESSID from your URLs.