SamDOD Posted March 20, 2008 Share Posted March 20, 2008 I downloaded a PHP/Ajax chat room script. It works great when i run it localhost and use PHP 5. I need to run it on a server now that is running PHP 4. I believe it has to do with this one line. But i could be wrong. Line 26: mysql_connect($a_base['dbhost'], $a_base['dbuser'], $a_base['dbpass']); Everything sets up correctly in the install, in that it creates its tables in the Database i create. so it does connect to that database as one point. i get one error and it wont go any further. PHP Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10061) in C:\wchat\functionz\columns.php on line 26 Can anyone help? Thank you very much Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted March 21, 2008 Share Posted March 21, 2008 That error suggests that you have not installed mysql yet or mysql is currently not running. Quote Link to comment Share on other sites More sharing options...
SamDOD Posted March 21, 2008 Author Share Posted March 21, 2008 If that is true, then how does it create the tables in the database when i run the installer. not to mention it says "localhost" when i am using an ip address to link to the database? I read about editing the php.ini file to allow the extension php_mysql.dll but i am running this on a vortech hosting server and am not sure how to accomplish this. Any suggestions? Thank you for all your help. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted March 21, 2008 Share Posted March 21, 2008 My guess would be that the configuration file that the script stores the information you entered (database server ip address...) was either not successfully saved or the code contains a logic error and it does not use the correct setting later. Check if there is a configuration file that the script creates and check what is stored in it. My guess is a logic error either caused the configuration file to be written with "localhost" instead of the ip address or $a_base['dbhost'] got overwritten by a logic error in the code. You would need to post code or a link to the script's download site so that someone could examine what it is doing. Quote Link to comment 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.