Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.