PHP | include_once('config/config.php') works in localhost, doesn't seem to work in production

Viewed 31

I have a config.php which basically just has session_start();

I include it in my header.php via

include_once("config/config.php");

Which works great on localhost, but for some reason the session doesn't start on my live webhost. If I add session_start(); To the top of each page(above the include_once('includes/header.php);, it then works on my live website.

All of the HTML/CSS/js from the Header.php loads just fine, but for some reason; the session doesn't seem to start. Works on local, not on production. Any suggestions?

Hope this makes sense, thanks.

0 Answers
Related