iThaos Posted March 9, 2009 Posted March 9, 2009 Is there a problem with PHP sessions on this host? I get this when trying to use sessions: Warning: session_start() [function.session-start]: Cannot send session cache limiter
Byron Posted March 9, 2009 Posted March 9, 2009 PHP Sessions seems to be working fine for me. Check your script for errors. http://byrondallas.heliohost.org/php/tools...annotator-s.php http://byrondallas.heliohost.org/php/tools...annotator-s.txt Try this simple piece of code and see if it returns a sessions number for you: <?php session_start(); echo session_id(); ?>
iThaos Posted March 10, 2009 Author Posted March 10, 2009 My script definitely works. It works fine on localhost and on other hosts. Now that I removed the sessions, it's still like this. Compare => http://cardthrower.heliohost.org/index.php ===> Heliohost =======> http://www.examshared.com ============> Proper They both use the same scripts. Thanks
software advisor henry Posted March 10, 2009 Posted March 10, 2009 1. heliohost uses php5 so register_globals is disabled. Declare all your globals in functions if you need to use them. [global $variablename;] 2. The header is already sent because a mysql_error has been issued and so the session cannot start. You must fix mysql before you can use sessions. 3. mysql_numrows is an old function. Use mysql_num_rows instead. For better performance if you just want the row no.s and not the actual query result, use [ $query=mysql_query("Select count(*) from tablename where field = 'condition'") echo mysql_fetch_array($query); ]
iThaos Posted March 11, 2009 Author Posted March 11, 2009 1. heliohost uses php5 so register_globals is disabled. Declare all your globals in functions if you need to use them. [global $variablename;] 2. The header is already sent because a mysql_error has been issued and so the session cannot start. You must fix mysql before you can use sessions. 3. mysql_numrows is an old function. Use mysql_num_rows instead. For better performance if you just want the row no.s and not the actual query result, use [ $query=mysql_query("Select count(*) from tablename where field = 'condition'") echo mysql_fetch_array($query); ] Ok Thanks! I'll make those changes soon. Thanks for your help!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now