Cannot load sqlsrv - php

I don't know if this is the right place to ask this question, if not, please tell me where. I need to connect a php script running on wamp with an MSSQL server. I downloaded and installed the Microsoft Drivers for PHP and added the following lines in php.ini:
extension=php_sqlsrv_55_ts.dll
extension=php_pdo_sqlsrv_55_ts.dll
The weird part is that the extension is shown as loaded when I look for it in the wamp menu, and not found in phpinfo();
(thread safety is enabled, hence I use the ts version)
EDIT
I solved it, wrote the solution below. But, I still cannot get it to work on Windows Server 2008 R2 SP1. Same problem, extension is loaded in the menu, but not on the wamp homepage and phpinfo();

Success, finally.
First, I downloaded an unofficial x64 version of sqlsrv (good job Microsoft on not labeling and leaving only 32bit versions -_-)
Second, I downloaded and installed the SQL Native Client x64.
Hope this helps if anyone else has the same problem.
Đ•DIT
I still have the same problem on the same wamp installation on Windows Server 2008 R2 SP1

Do you have Visual C++ Redistributable for Visual Studio? I remember that solved one of my problems. Unfortunately I still have other ones, which I have just posted a question for. I will be trying the x64 version and see if things work. Looks like it is version 3.0, so I suppose ODBC 11 won't work with it and one would need to use native client

Related

Sqlsrv for PHP 5.6 on WAMP server

After looking so many posts about this problem, I don't understand why it don't work because it should be working. I will post all the information I have so far:
Windows 10 64-bit
WampServer 3 64-bit (http://www.wampserver.com/)
PHP 5.6.16
Apache 2.4.17
Microsoft SQL Server 2016
I downloaded SQLSRV32.exe from microsoft. I extracted the dll files to C:\wamp\bin\php\php5.6.16\ext.
In my php.ini given by wampserver:
extension_dir = "c:/wamp/bin/php/php5.6.16/ext/"
extension=php_sqlsrv_56_ts.dll
extension=php_pdo_sqlsrv_56_ts.dll
I have php5ts.dll in my php5.6.16 folder, so I think I have thread safe which is why I am using ts.dll ones.
If I'm in phpinfo() I should see a 'sqlsrv' section in there, but I don't see one, so I guess I did something wrong here somewhere?
I even did restart on wampserver many times and run as an administrator. It still don't show up on phpinfo()... But I can see this in php extension at the Wampserver:
Any ideas to what I did wrong or why it don't show up in phpinfo()?
I have found what was the problem.
It seems that I was using microsoft 32-bit sqlsrv driver, which don't work with wampserver 3 64-bit.
Official Microsoft SQL Server Driver for PHP: Here 32 bit - use this if you have a 32bit wampserver.
Unofficial Microsoft SQL Server Driver for PHP: Here 64 bit - use this if you have a 64bit server.
After using the unofficial version, it showed up on phpinfo()!
Anyway, I hope this answer is useful to people who have spend looking around for an answer in hours... or whatever, I hope it was useful.

Wamp Server 2.5 (PHP5.5) Cant activate sqlsrv module

I just updated my Wamp Server and got a problem now.
My SQLSRV extension wont get loaded correctly.
I dont know where the problem is exactly because i dont get any errors on startup. Also the error log is clean. There is just a little red triangle instead of a check in the php extension list:
Some Information:
Windows Server 2012 x64
Wamp 2.5 32BIT
PHP5.5
The Warning Icon means one of 2 things :-
Either the extension= line is in your php.ini but the dll it points to is not in your \ext folder
Or the dll exists in the ext folder but not in your php.ini
Which one is it in your case. If you updated WAMPServer the SQLServer dll does not come with any PHP install by default, so you will have to download it from the microsoft site.
hmm, i still cant understand this error. sure i know that i have to download the SQL driver manually. And i know only the "SQLSRV31.EXE" driver is working with Win Server 2K12. I downloaded this one and copied all php5.5 drivers into the /ext folder. Then i copied the name of the dll`s and added them to the php.ini:
http://fs1.directupload.net/images/141206/pkij993j.png
I will tryout installing the older wamp version with php5.4 included. May this will work =)
I also experienced the same thing happened to you. I tried many things but didn't work at all. I installed all the things required for Wamp like Microsoft visual basics 2012 but it still didn't worked.
This is the most important thing, for me this problem happened because i download wamp server 2.5 from the official wamp server site. http://www.wampserver.com/Mk
DON'T DO IT. it's totally a shit. then i download wamp server 2.4(old version) from this site called FIRE HORSE. this is the link http://www.filehorse.com/download-wampserver-32/
I downloaded and installed wamp server 2.4 from this site and it worked perfectly fine. and i also installed the latest Joomla version 3.4.5 in wamp server. Now i'm using it 100% fine. Many thanks for FIRE HORSE site.
I hope you all will find this useful and don't forget to tell me if i'm wrong because i'm still in learning progress i just shared my experience with you all. thank you.

How to load php_pdo_sqlsrv_54.dll?

I'm using WAMP 2.2 (PHP 5.4.3) on Windows 7 64bit and I like to use PHP to connect to MS SQL Server 2005 Express Edition.
I downloaded Microsoft Drivers 3.0 for PHP for SQL Server and unzip the file php_pdo_sqlsrv_54_ts.dll to the php's extension directory.
I appended php.ini with additional "extension=php_pdo_sqlsrv_54_ts.dll".
After restarting WAMP, I got an error message dialog.
How to fix it?
One more thing, why php keep putting pdo_mssql on it's php.ini, is it available anyway?
Thanks.
You use 64-bit while the DLL library you try to use is 32-bit. Read somewhere that WAMP, XAMPP and so on doesn't like that. Try to find a 64-bit version of that DLL.

Installed imagick on Windows Server 2008 R2

So, I've been at it all day and about to give up, but thought posting my question would be a good last chance. I know this is difficult, but not impossible, since I've read the stories from many on the same topic and they all seem to get there eventually.
I'm trying to install Imagick (the PHP DLL for Imagemagick) on Windows Server 2008 R2 64-bit. I am using the thread-safe version of PHP and had the server running perfectly fine before trying the install. Here are the steps I've already taken:
I installed the GPL GhostsScript package (gs905w64.exe) since ImageMagick asked for it to be installed prior to ImageMagick itself. Ok, next...
Downloaded "ImageMagick-6.6.2-10-Q16-windows-x64-dll.exe" and installed it to path C:\imagemagick. According to the internets, this seems to be the version of choice for this server/DLL mix. I tried 4 other installs, including the latest version, and this so far seemed the best fit. After install, the command line steps it says to take with "logo.miff" worked fine. After the install and test, I confirmed that the installation path showed up in my Environment Variables correctly. Great... next.
Downloaded "php_imagick_ts.dll" from here, saved it to my extensions folder (yes, the correct one) and added it to my php.ini file (also the correct one). Since that didn't work, I tried all 3 versions of the thread-safe DLLs on that same download page. None of those worked either, so I tried the non-thread-safe versions as well with no luck. I also tried the php_imagick_dyn-Q16.dll available from here, as well as the static version too. The static version finally worked after everything.
I installed Microsoft Visual C++ 2008 Redistributals (both the main and SP1 versions). This seemed to have no effect on anything.
Final result after all of this: "imagick" shows up in my phpinfo(), but doesn't work and extension_loaded('magickwand') returns false. I'm assuming my installation failed here. Can you let me know what I'm doing wrong?

PHP can't connect with Oracle Database

I have installed Vertrigo Server with [Apache 2.0] & [PHP 5.2.14] on Windows XP X32 but Vertrigo server doesn't includes OCI8.DLL extension for Oracle Database. When I tried to copy this DLL file from another version of PHP I got Apache error:
[v_apache.exe]: The application cannot start because php5.dll is
missing.
Without this DLL file everything is wokrking OK, but I need to connect with oracle Database. Have you any solutions how to add OCI8.DLL extension in that version of PHP and Apache?
Thanks.
Simpliest way is to use Zend Server CE.
It has latest stable apache with latest stable PHP stack, also with oci libraries (and much more).
Download for free (registration required).
After long time searching over the internet finaly I found soltion for it. Strange is that Apache doesn't alert error about real problem, it just says that problem is with 80 port, even when 80 port is free.
Solution is very simle: I just installed Microsoft Visual C++ 2010 Redistributable Package and after averithing was running correctly.

Categories