Session Error
2 posts by 2 authors in: Forums > CMS Builder
Last Post: January 13 (RSS)
By pacolvin - January 12
After moving to a new hosting service, I have been receiving the error below when access pages that are secured using the SiteLok. I can load pages that are not secured. If I clear the cookies and site data for the website, the pages load fine and I can log out and in many times with no issue.
Error: Session already started, only call session_start() after loading CMS libraries so correct session handler is used. in /var/www/vhosts/sctfpa.gov/httpdocs/sctf/index.php on line 10
I'm trying to track down if this is a CMS Builder, SiteLok or server issue. If anyone could shed some light on this or point me to a possible cause or reason for the error, that would be great.
Thanks
Phil
By Tim - January 13
Hello Phil,
In this case the error is pretty explicit. Somewhere there is a session_start() call being made prior to the CMSB view_functions.php being included. In index.php, do you see session_start() at the top and before the viewer_function.php include code? If it is, try either deleting the session_start() (as that is being started in the viewer_functions.php include code) or moving it down after the viewer_functions.php code is being included.
If you don't see that happening, perhaps SiteLok is starting that session and it is conflicting with the viewer_functions.php session handling. One way to find this out is if the index.php page (which is generating the error) suddenly works after you disable SiteLok and then doesn't work again when you enable SiteLok that can give you the vital clue that it is SiteLok that is the issue.
Let us know how it goes!
Senior Web Programmer
Interactivetools.com