having problem in porting php4 code to php5 in sessions
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408
Rep:
having problem in porting php4 code to php5 in sessions
Hi folks,
I had designed a website using PHP last year on my fedora core 4 machine and it was working smoothly. I have not been working on PHP since that time, therefore when I was going to make my website running on my ubuntu edgy machine which runs PHP 5, I am getting the following error:
Code:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/www/html/index.php:14) in
Okay, but...there are a couple of cases where that will not work for you:
1) When one file includes another (the session start will already have been started and causes another warning when you try and start it a second time)
2) When you add an object to the session, because the object's class must be declared (include'd) before the session has been started. So class include files must come before session start.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.