I have both a development PC and windows server that run PHP. I'm trying to configure them for SQL server. I've downloaded SQL Server 2014 express and it's running on both.
The Development box box: 64-bit windows 7 PC, running IIS 7.5 and PHP 7.1.3
The server is 64-bit windows server 2008 running PHP version 7.1.3
I've started with the dev box and tried downloading the drivers and modifying the php.ini to add the extension.
The drivers is not loading when I run phpinfo(). With some further research, I think I have not got the correct version of the driver for my dev box. I'm currently using php_sqlsrv_54_ts.dll as my extension, but the installation media for the driver came with several .dll files and I'm not sure I have the right one. I did notice that the installation file I downloaded was SQLSRV30.EXE. I also noticed that there was SQLSRV52.EXE, but that does not support win 7. Can someone point me to the correct driver for my dev box and server.
I'm getting so frustrated with this because it's not self explanatory.
It turns out that there are no SQL drivers for PHP 7.2 that work under windows 7. I had to downgrade to PHP 7.1 and then the drivers loaded and worked.
I am trying to connect MongoDB with my PHP, to use new MongoClient() I need configure "php_mongo.dll" in my php.ini file but after doing that MongoDB info is not showing in phpinfo.
versions I am using are:
PHP 5.5.30, MongoDB 5.2.10
DLL downloaded from "http://windows.php.net/downloads/pecl/releases/mongo/1.5.8/php_mongo-3.2.10-5.5-ts-vc11-x86.zip" and I have 32 bit machine.
I´ve had the same problem in Windows 10 with Apache 2.4 and PHP 5.6. I tried the many version of mongo driver but nothing worked. Then I tried version 1.5 and all works fine now, the error on apache log has gone and MongoDB support are showed in phpinfo(). And another point is you have to start mongodb server for connection.
For more info you can check on official website.
https://docs.mongodb.com/ecosystem/drivers/php/
Am using windows 8 pro, Wamp server (php V5.3.5, apache V2.2.17), Sql server 2005 express editon. I have downloaded the sqlsrv drivers and extracted them into the php extention folder (C:\wamp\bin\php\php5.3.5\ext), have also update the php.ini file by adding the extentions
extension=php_sqlsrv_53_ts_vc6.dll
extension=php_pdo_sqlsrv_53_ts_vc6.dll
I used this two after series of try and error on all the dll file, it was this two that come up with no error, when restarting the wamp server
This is the connection line of code;
$con = sqlsrv_connect('TAQUATECH\SQLEXPRESS') or die("cannot connect");
It came up with the following error;
Fatal error: Call to undefined function sqlsrv_connect() in
C:\wamp\www\Webs\client.php on line 7
pls, i need somebody to help me on this, i will really appreciate
Sorry if too late to answer, but I had the same error, and I found out that Wamp Server 64bit does not support SQL Server Connection, you must install a 32bit version of wamp server.
For those using 64-bit systems (OS, WAMP, MSSQL), these 64-bit drivers can serve them and fix the error:
Fatal error: Call to undefined function sqlsrv_connect() in C:\wamp\www...
Drivers SQLSRV x64:
http://robsphp.blogspot.in/2012/06/unofficial-microsoft-sql-server-driver.html
You'll need to install and enable sqlsrv on your web server. Have a look at the installation page on the official PHP website.
Installation of Microsoft Drivers 3.0 for PHP for SQL Server will fix this issue. Also try this PHP Manual.
EDIT :
The most recent version of the driver is available for download here:
» SQLSRV 3.0 download. If you need support for PHP 5.2 and/or PHP
compiled with VC6, use the 2.0 release of the driver: » SQLSRV 2.0
download.
Source
Yap, I have gotten a work-around;
The problem was, running the php script using apache server on my system, I stoped the wamp server and configure fastCGI for PHP using IIS 7, You can get a video tutorial Here
http://www.iis.net/learn/application-frameworks/running-php-applications-on-iis/set-up-fastcgi-for-php.
It simple and nice, now i can connect to both sql server 2005 and 2008
My PHP Details
Version => 5.3.5
Compiler => MSVC6 (Visual C++ 6.0)
SqlSrv Driver => php_sqlsrv_53_ts_vc6.dll
use 32 bit PHP Version.
enable below one of them in php.ini
[PHP_PDO_SQLSRV_53_NTS]
extension=php_pdo_sqlsrv_53_nts.dll
[PHP_SQLSRV_54_NTS]
extension=php_sqlsrv_54_nts.dll
[PHP_SQLSRV_53_NTS]
extension=php_sqlsrv_53_nts.dll
[PHP_PDO_SQLSRV_54_NTS]
extension=php_pdo_sqlsrv_54_nts.dll
thease dll version you can downlowd online
Goal
Connect to a MSSQL 2008 R2 server using the FreeTDS (php_dblib.dll 0.82 + 20110906 patches) Drivers for PHP 5.4.16 (VC9).
I am unable to use any alternative to FreeTDS unless the client also decides to use an alternative. This is unlikely unless they also run into this issue when upgrading their current version of PHP (currently 5.3.x) tomorrow.
Issue
PHP is unable to load the FreeTDS extension.
The Apache error log displays this on server start:
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.4.16/ext/php_dblib.dll' - The specified module could not be found.\r\n in Unknown on line 0
As far as I understand it, the extension is either unable to be found or is the wrong version?
The extension directory location in the php.ini has been checked and triple checked and is:
c:/wamp/bin/php/php5.4.16/ext/
That leads me to believe it is the wrong version of php_dblib.dll. I've also checked that multiple times and made sure to use the version for PHP 5.4.X Thread Safe.
Steps Taken
Clean install of WAMP 2.4 with PHP 5.4.16 and Apache 2.4.4
Thread Safe php_dblib.dll placed in PHP extension directory
extension=php_dblib.dll added to the correct php.ini
extension=php_mssql.dll and extension=php_pdo_mssql.dll disabled in php.ini
msvcr71.dll (DotNet framework 1.1) added to PHP root directory
freetds.conf added to server root directory (c:)
System Details
WAMP Server 2.4
Apache 2.4.4
PHP 5.4.16 (VC9)
Thread Safety: enabled
FreeTDS Thread Safe (php_dblib.dll) 0.82 + 20110906 patches
Microsoft SQL Server 2008 R2
msvcr71.dll (DotNet framework 1.1) only included in the PHP root directory
EDIT:
WAMP 2.4 32-bit
OS: Windows 7 Pro 64-bit
EDIT 3
Last update only applied to the 64-bit version of WAMP. I've installed the 32-bit version, again, and --without-dblib is no longer in the configure command section of the phpinfo().
Questions
With the information given, is there anything else you'd need to know about to give an accurate assessment of the situation?
I am unable to find any, but are there any known issues with FreeTDS 0.82 and PHP 5.4.16?
Temporary Defeat
I've rolled back to PHP 5.3.x for now, FreeTDS works fine on that version. I'm not sure that it will make a difference with the little bit of code I am actually delivering to the client. This was intended to be a "double" check to make sure it all works perfectly, but since I'll be on site during the install I can fix any issues if they come up.
I would like to find a solution eventually since more and more of the systems I work with every day are going to be upgraded to php 5.4 and beyond.
I have installed AppServ 2.6.0 on Windows 2008 R2 but when I go to localhost/phpinfo.php I don't see mysql in there. I see "mysqlnd" I don't know what this is but it is there.
Moreover, Where i go to localhost/phpmyadmin I get an error in red
phpMyAdmin - Error
Fatal error: Call to undefined function get_magic_quotes_gpc() in C:\AppServ\www\phpMyAdmin\error.php on line 63
Please note that I have installed Innodb during the installation of AppServ 2.6.0.
What is wrong with this? why MySQL is not working? I have been working on this for couple of days so I aprechiate any help
According to this post: Using get_magic_quotes_gpc on PHP Version 5.2.14 or equivalent for PHP Version 6
get_magic_quotes_gpc has been completely removed in PHP 6.
It has been deprecated since PHP 5.4 according to this: http://php.net/manual/en/function.get-magic-quotes-gpc.php
As for MySQL, I'm not too familiar with AppServ, but do you need to enable the mysql modules in the php.ini? Also, can you connect to mysql from the command line tool?