Jump to content

[SOLVED] session_start() twice


iarp

Recommended Posts

Hey,

 

The other day i transfered a website to my laptop that runs mysql5 and newest php, and it was giving me a ton of errors because my web host uses mysql4 and php 4.4.8.

 

My laptop is giving me an error saying session_start is being ignored in my header file because it was called already in the main page.

 

Which is a better location for session_start() ? in the header.php which is include(''); into each page, or call session_start at the very beginning before the header or anything else.

Link to comment
https://forums.phpfreaks.com/topic/103076-solved-session_start-twice/
Share on other sites

Also, the warnings and notices you are seeing now were always present in your code, but the display_errors and/or error_reporting settings were preventing you from seeing them. This is not a php4 vs php5 problem, but code that is doing things incorrectly and was developed in an environment that hid the problems.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.