Database Connection PHP

Hi,
As per this post:

I am getting the same error here. I have installed the extensions within wamp but I am still getting this error.
Any help would be apprciated…

Thanks

Steve

Hello @stevenmcgough,
Probably it is not properly installed/configured in your local WAMP server if you still see the error.
I suggest you to test with a real server, which your hosting company know how to configure properly.

Hi,
Thank you for your reply - do you mean wappler is not installed correctly within wamp? Is there any documentaion as to how to do this as we self host on our internal servers -
I need it for test/build - prior to migrating to an ISS environment.

Thanks

No, you do not install Wappler within the server.

What i mean is you probably have not properly installed, enabled or configured the driver (on your server) required for connecting from a PHP server to a MSSQL db.

I don’t suppose anybody has some basic instructions or download link for getting MSSQL drivers properly into a PHP 7.2 setup?

Hello,
What server are you using?

Centos 7

If this is a server which you are managing, please check the microsoft docs:

https://docs.microsoft.com/en-us/sql/connect/php/microsoft-php-driver-for-sql-server?view=sql-server-2017
https://docs.microsoft.com/en-us/sql/connect/php/installation-tutorial-linux-mac?view=sql-server-2017

If that’s some hosting provider, they probably know how to do this :slight_smile:

Thanks Teodor.

It is my own google instance. I actually ended up on those instructions, so thank you for confirming.

I’m at the point where the test php page works, but wappler editor can’t yet get the test connection to work. Errors with can’t find driver… That’s where I will start again this morning.

@Teodor I’ve hit a wall. :slight_smile:

Here is the error I receive:

I’m able to connect to mysql within the same app with no issues…just trying to get a MS SQL 2016 connection up and running.

I’ve performed the installation using those tutorials and more, and because their test.php file connects, I think I have done it correctly. I was initially getting errors here, but those were related to permission issues, so now I can see the actual connected results:

Is there something I can look for using phpinfo() ?

Here is a snippet:

Disregard…had to use SQL Server Native. Now connected.

1 Like

After downloading and dropping the right .dll file in your PHP/ext map… you have to uncomment the extension file in your php.ini file, [https://learn.microsoft.com/en-us/iis/application-frameworks/install-and-configure-php-on-iis/install-the-sql-server-driver-for-php](http://Drivers - SQL Server - PHP - Download - Install - Easy) when its all set and done all you have to do is create a new DB connection in Wappler… BUT… when the connection is fine and you still get the error message that it cant find the driver you have to go to the GLOBAL in Wappler and change the SQL Server to NATIVE ! see example :slight_smile: Thank me later

2023-10-12 09_46_41-p-qs-dev01 - Remote Desktop Connection