Fatalerror_mysql_connect()
 

Code

<?php
$link = mysql_connect("manas8x", "root", "Manas8", "mysql");
/* check connection */
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);

?>
 

Operating System

And note that XP-Home we have no option of adding Internet Information Service and Manager like XP-Pro and Vista Business . To get this screen you need to type

Then click on Add/Remove Snap in as shown below.

The illustration is is added to convince you, that IIS is not available in snaps-in modules of XP-Home. But this won't stop you to install Apache server, PHP, MySql, Oracle and Others.

To run

Obviously, the main interest of this document lies here, that displays an error, which is very common in windows platform; may turn very agonizing if you are ware of the facts we wanted to address in this document.

Fatal error: Call to undefined function mysql_connect() in C:\Apache2\htdocs\myphp\test_sql.php on line 2
 

Below can cause this problem in window where you drag few files from the folder (ext) where Php is installed.

Meaning, if you did not copy the "DLL" files to windows/system32 folder, please do so.

Also, make use php.ini calls this library, unmark extension_mysql.dll

Special note: In Apache server you must have php set is as

# activate
LoadModule php5_module c:/php5/php5apache2.dll
AddType application/x-httpd-php .php
PHPIniDir "c:/php5"

Your end result at the end may extend you a taste of satisfaction, it was not desired in the first place, but with the fast pace technology there will be always something to be fixed or bypassed.

 Similarly you may use aspx extensions, adding this module.

 
#---this section handles asp.net configurarion
#aspnet module installation
#asp.net
LoadModule aspdotnet_module "modules/mod_aspdotnet.so"

AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj licx rem resources resx soap vb vbproj vsdisco webinfo

<IfModule mod_aspdotnet.cpp>
# Mount the ASP.NET /asp application
AspNetMount /my_aspnet "c:/my_aspnet"
#/my_aspnet is the alias name for asp.net to execute
#"c:/my_aspnet" is the actual execution of files/folders in that location

# Map all requests for /asp to the application files
Alias /my_aspnet "c:/my_aspnet"
#maps /my_aspnet request to "c:/my_aspnet"
#now to get to the /my_aspnet type http://localhost/my_aspnet
#It'll redirect http://localhost/my_aspnet to "c:/my_aspnet"

# Allow asp.net scripts to be executed in the /my_aspnet example
<Directory "c:/my_aspnet">
Options FollowSymlinks ExecCGI
Order allow,deny
Allow from all
DirectoryIndex index.htm index.aspx
#default the index page to .htm and .aspx
</Directory>

# For all virtual ASP.NET webs, we need the aspnet_client files
# to serve the client-side helper scripts.
AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) "C:/Windows/Microsoft.NET/Framework/v$1.$2.$3.$3.5/ASP.NETClientFiles/$4"
<Directory "C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles">
Options FollowSymlinks
Order allow,deny
Allow from all
</Directory>
</IfModule>
#asp.net