PHP can be used as an interface in various database programs such as MySQL, PostgreSQL, and many more with the use of an extended connection interface dynamic link library. For MySQL, the connection dynamic link library file is the php_mysql.dll. This file should be installed in the PHP extension directory as defined in the PHP configuration file, php.ini. The following are the steps to configure PHP with MySQL using Windows Platform:

1. Make a PHP file that loads all the PHP configuration file variables. It can be done by writing <? phpinfo(); ?> in the PHP file.
2. Run the PHP file and find the row with “Loaded Configuration File” as shown in the figure. This will let you know the location of the php.ini file.
3 Once located, open php.ini and edit. Make sure to enable ;extension=php_mysql.dll to extension=php_mysql.dll (by removing the semicolon).
4. Obtain a copy of the php_mysql.dll and place it under the exension directory which is defined in the php.ini which looks like this: extension_dir = “c:\php\ext”

With the configuration, then the PHP script intefaced with MySQL can be executed without the error which is the “Call to undefined function mysql_pconnect()”.