I have create register and login form using php. And i had took the source from google.
So i have added all the corresponding code, when run index.php.
It sh
For Drupal Users -
This happens generally because of max_execution time for communicating server to mysql. Increase max execution time from 60 sec to upper limit you want and try refresh the page again.
It worked for me.
didn't you say your mysql port is 3306:
$db = new PDO("mysql:host=".DBHOST.";port=8889
//------------------------------------------^
this might help:
$db = new PDO("mysql:host=".DBHOST.";port=3306
Sasi, if your running this on a local server it may be your setup for windows the local server need to be configured to send email on.
Here you can find how to configure XAMPP to send mail from localhost.
Sorry that i answer you here, but i don't have enough reputation to make comments :D
$db = new PDO("mysql:host=".DBHOST.";port=3306;dbname=".DBNAME, DBUSER, DBPASS);
you should change the port number to default: 3306! hope this helps
I suffered this error too. I did following things: 1. find out the port number used by mysql. In phpmyadmin, I ran the following sql:
show variables;
it shows a list of variables of mysql. scroll down, you will find port number.
$dsn = 'mysql:host=127.0.0.1;port=3307; dbname=learnphpfast';
it worked like a charm!
This error usually occurs when some other app like skype and IIS are using ports of Apache i.e. 80 and mysql server i.e. 3306
You can eighter uninstall these apps or change port numbers of the localhost to something else and make correct changes in settings.php