Jump to content

Connection


speedking47

Recommended Posts

Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\connect\index.php on line 10

Hallo I am beginner  and starting to learn php I got this message when I want to connect with server. Can I get some suggestion what to do? Thanks

Link to comment
https://forums.phpfreaks.com/topic/212024-connection/
Share on other sites

Make sure the mysql extensions are installed and enabled.

 

Create a script with the following in it, then load it in your browser. It should display all the information you need to figure out what's going on.

 

<?php
php_info();
?>

Link to comment
https://forums.phpfreaks.com/topic/212024-connection/#findComment-1104955
Share on other sites

1. Load the page as Pik suggested. Then follow these instructions.

 

Open this page and see if there is a section named MySQL.

 

2. IF IT DOESN"T, re-compile the installation with MySQL support.

 

3. IF IT DOES.

 

Open up the file php.ini and make sure the line to enable MySQL support is un-commented.

In Linux that line is:

extension=mysql.so

In Windows that line is:

extension=php_mysql.dll

 

Ensure that the files php_mysql.dll and libmysql.dll can be reached by php by modifying and uncommenting the line:

 

extension_dir = "C:\php\ext\"

 

Link to comment
https://forums.phpfreaks.com/topic/212024-connection/#findComment-1104966
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.