Hi guys how r u doing?
Port 80 is used by IIS.
Thus when i run php i use port 81
then it is: localhost:81/
It works fine.
But i want to connect to MySQL:
I get the following error:
Warning: mysql_connect() [function.mysql-connect]: MySQL server has gone away in C:\wamp\www\LesWebDevelopment\ic1s.php on line 17
Warning: mysql_connect() [function.mysql-connect]: Error while reading greeting packet. PID=3796 in C:\wamp\www\LesWebDevelopment\ic1s.php on line 17
Warning: mysql_connect() [function.mysql-connect]: MySQL server has gone away in C:\wamp\www\LesWebDevelopment\ic1s.php on line 17
Fatal error: Maximum execution time of 60 seconds exceeded in C:\wamp\www\LesWebDevelopment\ic1s.php on line 17
I changed the port to 81 my.ini
But i still get error timelimit 60 seconds exceeded
this is the code:
Code:
<?php
$dbhost = 'localhost:81';
$dbuser = 'root';
$dbpass = '';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$dbname = 'ic1s';
mysql_select_db($dbname);
?>
Thanks in advance