have spent a week and rebuilt Windows 10 Pro twice.
installed mySql, Apache24, myphpAdmin, all function. created a database with table no problem.
have install database extensions.
when i click + for new recordset fill in the form and click Select for the database, i get the error.
your php server doesn't have the mysql module loaded or you can't use the mysql_(p)connect functions.
this question is all over the web with no answers.
thanks for any help,
Copy link to clipboard
Which PHP version do you have on your remote and local testing servers? If unsure, add this code to a new PHP test page and run it from your server & localhost.
<?php phpinfo() ?>
The deprecated server behaviors in DW are outdated and no longer compatible with PHP 7+.
Only have a testing server,localhost
Thanks for responding
as already told you Nancy, mysql drivers are not compatible with with PHP+
two solution migrate to mysqli (easiest coming from an already mysql developed solution)
or use PHP 5.6 max... if it's for local purpose only use xampp , unless I'm mistaken, this one should be fine
Are there any options to use php and record sets
yes as we told you... the record set that you use is only compatible until PHP 5.6.... so the only chance to run the record set that you have is to run PHP 5.6 maximum
or manually change code from mysql to mysqli
is this clear ? do you need further explanation ?
I changed to 5.6 within dreamweaver
Same error, do I need to uninstall php7 and install 5.6
I don’t understand change code to mysqli from MySQL.
Thanks for your help
you just have to be sure that apache is not running twice, it often happen...
so quit every instance of apache running, xamp map, of whatever stack you use, the launch the one that run PHP 5.6 and test again
concerning mysqli... if you open you PHP file you should see code starting by mysql_.... so that use the mysql pilot wich is not compatbile (usable) anymore when PHP 7+ is running... so you have to change that code by a one using a mysqli_ pilot... (only if you want to run your website using PHP 7+)
developer of those drivers did a look like code... I mean both instructions, the ones from mysql_ et the ones from mysqli_ seams equal, except that the second ones always refers to the connexion as a first argument
personnaly I had used this converter, which did a quite good job... well... one need anyway to manually control it... but that did the job on a very large scale web site
tomc31258978 wroteI don’t understand change code to mysqli from MySQL.
Do not use the deprecated server behaviors in DW. They were removed for a reason. The code is not fit for production sites. Old fashioned MySQL connection strings are outdated and not secure. Use the code at your own risk. And if you do, you must install a Server that supports PHP 5.6 or lower. MySQL connections don't work on Servers running PHP 7+.
MySQLi or PDO connections are the preferred way forward. See link below for details.
Just to add more confusion, here is my take on the subject.
- to use MySQL you need to run a PHP 5.6 server or lower
- support for PHP 5.6 was dropped as of 1st January 2019, hence MySQL has also been dropped
- to use MySQLi or PDO, you need to run PHP 7+
Summarising, you should be using MySQLi or PDO with PHP 7+ (always the latest version due to security risks)
Try using a MySQLi (improved) conntection string. Change code in red to your own values.