manalnor Posted July 10, 2010 Share Posted July 10, 2010 I'm a new PHP/MySQL developer and have been working on my first site on my local machine. Today, I registered a domain and took up hosting so I could start testing in an actual web environ. Now, I'm getting a problem with session_start(). I know that it has to come before anything is printed to the browser, and it works fine on my local machine. so what should i tell me hosting support to makes session_start() works ... ! Thanks! Link to comment https://forums.phpfreaks.com/topic/207347-what-shall-i-say-to-my-hostingsession_start/ Share on other sites More sharing options...
Mchl Posted July 10, 2010 Share Posted July 10, 2010 What exactly problem do you get? Any error messages? Link to comment https://forums.phpfreaks.com/topic/207347-what-shall-i-say-to-my-hostingsession_start/#findComment-1084042 Share on other sites More sharing options...
manalnor Posted July 10, 2010 Author Share Posted July 10, 2010 What exactly problem do you get? Any error messages? i do login into my website as admin .. when i logged i will find link pointed me to admin/index.php when i click on it, it said NO_AUTHORIZE the index.php file include_once('authenticate.php'); and authenticate.php code it <?php session_start(); include_once('../common/common.php'); $isAdmin = $_SESSION['isAdmin']; $isMember = $_SESSION['isMember']; $sessionid = $_SESSION['sessionid']; if ($sessionid != session_id()) { popup(DF_NO_AUTHORIZE); openwindow(DIR_UP . FILE_INDEX, PARENT); die (DF_NO_AUTHORIZE); } else if (!$isAdmin) { popup(DF_NO_ACCESS); openwindow(DIR_UP . FILE_INDEX, PARENT); die (DF_NO_ACCESS); } ?> but for unknown reason it gives me NO_AUTHORIZE .... however it works fine on my local machine. so i guess there is something wrong wrong in hosting about session_start() !! Link to comment https://forums.phpfreaks.com/topic/207347-what-shall-i-say-to-my-hostingsession_start/#findComment-1084043 Share on other sites More sharing options...
Mchl Posted July 10, 2010 Share Posted July 10, 2010 Not necessarily. Do you have error reporting enabled and set to E_ALL? Link to comment https://forums.phpfreaks.com/topic/207347-what-shall-i-say-to-my-hostingsession_start/#findComment-1084044 Share on other sites More sharing options...
manalnor Posted July 10, 2010 Author Share Posted July 10, 2010 Not necessarily. Do you have error reporting enabled and set to E_ALL? No i don't have, what makes me sure that the error in with session_start() as it gives me error which should appears only if i'm not logged.. hence it can't call the printed to the browser Link to comment https://forums.phpfreaks.com/topic/207347-what-shall-i-say-to-my-hostingsession_start/#findComment-1084045 Share on other sites More sharing options...
Mchl Posted July 10, 2010 Share Posted July 10, 2010 Well how do you know that, if you have any useful error messages disabled? In order to debug the issue, we need this information. Link to comment https://forums.phpfreaks.com/topic/207347-what-shall-i-say-to-my-hostingsession_start/#findComment-1084046 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.