DMXzone Database Connector 2 Support Product Page

PHP SQL Database Connection

Reported 28 Apr 2021 12:13:33
1
has this problem
28 Apr 2021 12:13:33 User  posted:
Hi,
I am trying to create a PHP page with a connection to a MS SQL database.
I have my Remote and Local sites setup to point to the working directories as the site is going to be just on an intranet - not on web.

The site is running on a WAMP server.

So on the Server COnnect I select new Server Action - it creates "dmxConnect" and "dmxConnectLib" as well as _notes
I then go to Steps - Database Actions - Database Connection

Then Connection properties - name it and click options

Database Type : SQL Server
Fill in the rest ( address/database/username/password)
Test connection

I then get this Notification:

Error using this Database connection!
Server response : could not find driver

I have other sites running in other directories ( using code ignitor - using PHP and SQL OK)

What does this error mean and how do I fix it.

Thanks you in advance.


Replies

Replied 29 Apr 2021 14:24:17
29 Apr 2021 14:24:17 Teodor Kuduschiev replied:
Hello,
Please make sure you have PHP PDO enabled and the Mysql driver for PDO enabled and installed.
Replied 04 May 2021 20:04:52
04 May 2021 20:04:52 User  replied:
Hi,
I am using WAMP 3.2.3
I have in the extensions folder:

php_pdo_sqlsrv_73_nts_x64
php_pdo_sqlsrv_73_ts_x64
php_sqlsrv_73_nts_x64
php_sqlsrv_73_ts_x64

These are enabled in the php.ini file and they say they are enabled on the PHP tab on the wamp system tray.

I am using PHP 7.3.21

Stiil the same connection error.

I am using dreamwever on my machine - but the web files I am building are on a VM on my network. The wamp server / extentions are on the VM machine - do they need to be on the machine that dreamweaver is on?

Thanks
Replied 05 May 2021 12:40:05
05 May 2021 12:40:05 User  replied:
Hi - Update...

If I run this in a browser with the server details complete:


<?php
$serverName = "serverName\\sqlexpress, 1542"; //serverName\instanceName, portNumber (default is 1433)
$connectionInfo = array( "Database"=>"dbName", "UID"=>"userName", "PWD"=>"password";
$conn = sqlsrv_connect( $serverName, $connectionInfo);

if( $conn ) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r( sqlsrv_errors(), true));
}
?>


I get the message "Connection established."

Same details into The Database connection in the extension I get :

Error using this Database connection!
Server response : could not find driver


How is that - ?

Thanks again in advance for any reply..

Steve

Replied 06 May 2021 19:25:30
06 May 2021 19:25:30 User  replied:
Hi,
Any ideas on this? Surely there must be more people who would want to connect to SQL rather than MySQL.
I see that it must be a common problem - 1 week of trying and the extension won't connect?

Am I doing something wrong ?

Steve
Replied 07 May 2021 10:30:27
07 May 2021 10:30:27 User  replied:
SQL Native !¬!!!!
Replied 10 May 2021 06:00:02
10 May 2021 06:00:02 Teodor Kuduschiev replied:
SQL server is supported by the extension, if this error still appears something is not properly configured on the server you are testing.

Reply to this topic