needs_upgrade Posted June 20, 2011 Share Posted June 20, 2011 Error Message: Warning: mysql_connect() [function.mysql-connect]: Can't create a new thread (errno 12); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug in C:\sites\Single56\innoserve\webroot\lib\dai\ka\pwede\digdi\connect.php on line 8 Can't create a new thread (errno 12); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug This is the first time i've encountered this. Please give me insights. This is my code: <?php // ****** connect.php ****** $host = "localhost"; $username = "username"; $password = "password"; $database = "db"; $server = mysql_connect($host, $username, $password) or die(mysql_error()); // Select the database now $connection = mysql_select_db($database, $server) or die(mysql_error()); $sql = "SET time_zone = '+8:00'"; mysql_query($sql) or die(mysql_error()); Quote Link to comment https://forums.phpfreaks.com/topic/239880-server-crashes/ Share on other sites More sharing options...
GalaxyTramp Posted June 20, 2011 Share Posted June 20, 2011 I think I am correct in saying that $server is a GLOBAL so you cannot use it in this way. GT Quote Link to comment https://forums.phpfreaks.com/topic/239880-server-crashes/#findComment-1232179 Share on other sites More sharing options...
gristoi Posted June 20, 2011 Share Posted June 20, 2011 i thought it was $_SERVER that is the global ? Quote Link to comment https://forums.phpfreaks.com/topic/239880-server-crashes/#findComment-1232207 Share on other sites More sharing options...
trq Posted June 20, 2011 Share Posted June 20, 2011 It is, and variables *are* case sensitive in PHP. Quote Link to comment https://forums.phpfreaks.com/topic/239880-server-crashes/#findComment-1232218 Share on other sites More sharing options...
needs_upgrade Posted June 21, 2011 Author Share Posted June 21, 2011 Im sorry, my mistake... here it is: $host = "MySQL8.someserver.com"; $username = "username"; $password = "password"; $database = "mydb"; $server = mysql_connect($host, $username, $password) or die(mysql_error()); // Select the database now $connection = mysql_select_db($database, $server) or die(mysql_error()); $sql = "SET time_zone = '+8:00'"; mysql_query($sql) or die(mysql_error()); Quote Link to comment https://forums.phpfreaks.com/topic/239880-server-crashes/#findComment-1232621 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.