Skip to main content
Participant
December 18, 2019
Question

error your php server doesn't have mysql module loaded or you cant use the mysql_(p)connect function

  • December 18, 2019
  • 3 replies
  • 1060 views

Hello, I have weeks of not being able to solve this problem, and I need help, I can't connect to mysql, using dreamweaver and Wamp gives me the following error
"your php server doesn't have mysql module loaded or you cant use the mysql_ (p) connect functions"

this error from what I see, on the network, is very frequent but everything I find nothing works

I already followed this recommendation from this link but it still didn't work and I'm going crazy

https://www.eukhost.com/forums/forum/technical-support/tutorials-how-tos/17862-you-can%C2%92t-use-mysql_-p-connect-function-dreamweaver-error

I need help please, thank you very much in advance

This topic has been closed for replies.

3 replies

Nancy OShea
Community Expert
Community Expert
December 18, 2019

Which PHP version is installed locally and on your remote server?  Ideally, the remote and local servers should be identical to avoid problems later.

 

Deprecated MySQL connections require a server running PHP 5x.  Most modern servers are using PHP 7x or higher which poses a big problem for older websites.  

 

Nancy O'Shea— Product User & Community Expert
Legend
December 18, 2019

What version of PHP are you using? The MySQL extension was removed in PHP7

 

If you have an existing website using the MySQL extension - try running PHP 5.6

 

Ideally you need to update the website or if creating a new one from scratch defintely do NOT use MySQL functions.

Paul-M - Community Expert
Legend
December 18, 2019

It sounds like you are trying to use the now deprecated mysql function to connect to your database when you should be using the new mysqli (improved) function. Your server is most likely configured to only use mysqli as it should be. No-one should be using mysql these days, especially if they are creating a new website.

 

However Dreamweaver has no options to use the mysqli (improved) function, it only has the option to connect using the out-dated mysql functions and ONLY if you bring the server behaviours back into Dreamweaver, they were discontinued some versions back, or hidden.

 

Your options are:

1) Write your own mysqli functions and queries

2) Buy a 3rd party extension for Dreamweaver which will replace the old Dreamweaver server behaviours.

 

Its best to check what your server is running. Create a blank Dreamweaver document and insert the following into it. Save as php_info.php - and then browse out to localhost/php_info.php in your browser. It should return a lot of useful information about what your local server is currently providing.

 

<?php
phpinfo();
?>

 

Or it could be the other way around - you might be using the mysqli (improved) function to try and connect to your database and your local Wamp server version only supports mysql, the old function.