SQLSRV and XAMPP 1.7.7 [SOLVED]

Problems with the Windows version of XAMPP, questions, comments, and anything related.

SQLSRV and XAMPP 1.7.7 [SOLVED]

Postby crambler » 26. January 2012 22:03

Hello!
Sorry this is a repost... I posted it in the German section before.
I am banging my head trying to get this to work.
I have ntwdblib.dll in almost every directory under the sun.
I have the threaded versions of php_sqlsrv.dll and php_pdo_sqlsrv.dll in the xampp\php\ext directory.
I have uncommented the correct lines from php.ini

Code: Select all
...
extension=php_soap.dll
extension=php_sockets.dll
extension=php_sqlite.dll
extension=php_sqlite3.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
extension=php_xmlrpc.dll
extension=php_sqlsrv.dll
extension=php_pdo_sqlsrv.dll


but once i do all this and try to start apache through the xampp console it refuses to start up. if i comment the two extension lines, then it starts up fine. uncomment, and it won't start up again.

error.log from apache says

Code: Select all
[Thu Jan 26 15:54:06 2012] [warn] pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Jan 26 15:54:06 2012] [notice] Digest: generating secret for digest authentication ...
[Thu Jan 26 15:54:06 2012] [notice] Digest: done


and that's it. it never starts.
Any suggestions?

PLEASE HELP! i have a time sensitive project and REALLY REALLY REALLY appreciate it.

Thank you again.


edit:
trying to start the service from the windows services management window gives the following error:
"Error 1607: The process terminated unexpectedly."
Last edited by crambler on 26. January 2012 22:18, edited 1 time in total.
crambler
 
Posts: 4
Joined: 26. January 2012 21:46
XAMPP Version: 5.6.3
Operating System: Windows 7 Ultimate N

Re: SQLSRV and XAMPP 1.7.7

Postby JonB » 26. January 2012 22:17

Well - other than 'doing research before taking work is always a good idea' :wink:

Are the version you have VC9 or VC6 compiles AND what minor version (to the 1st digit after the dot) of PHP were they compiled for???

You may also want to check your Windows Event Viewer.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: SQLSRV and XAMPP 1.7.7

Postby crambler » 26. January 2012 22:23

This is not a contract and I do not freelance. It is a new task my boss has requested for my full time job, but thank you for the advice.
I installed xampp 1.7.7 as it says in the topic and my profile. The php that comes with this xampp package appears to be version 5.3.8.

here is the info from phpinfo():

Code: Select all
System    Windows NT NYHQUT04 6.1 build 7600 (Windows Server 2008 R2 Enterprise Edition) i586
Build Date    Aug 23 2011 11:47:20
Compiler    MSVC9 (Visual C++ 2008)


does this mean this is for iis only?
I am confused.

Thank you again for your help.
crambler
 
Posts: 4
Joined: 26. January 2012 21:46
XAMPP Version: 5.6.3
Operating System: Windows 7 Ultimate N

Re: SQLSRV and XAMPP 1.7.7

Postby crambler » 26. January 2012 22:53

Just tried it with the nonthread safe versions of the dlls as stated here
http://us3.php.net/manual/en/sqlsrv.requirements.php
Still the same issue. :(
crambler
 
Posts: 4
Joined: 26. January 2012 21:46
XAMPP Version: 5.6.3
Operating System: Windows 7 Ultimate N

Re: SQLSRV and XAMPP 1.7.7

Postby JonB » 26. January 2012 23:21

A. I miss-read one thing earlier. My bad - Those are probably the correct versions if they came with your XAMPP installation, I had it in mind that you may have DL'ed those extensions. What the sig says is the target when compiled. Threaded VC9 compiles are what is needed with XAMPP 1.7.7, earlier versions used VC6 compiles.

B. What port does SQL Server normally use??? do you have any other tools/clients that may use the same port OR is the server software installed on the machine?
(a note: you may not be able to use Windows Authentication methods with XAMPP)

C. The warning indicates that Apache is crashing, that is why I would like you to look in the Windows Event viewer. You will likely have a appcrash event, which will likely say what is wrong.
http://answers.microsoft.com/en-us/wind ... 78b412c574

It usually names the offending DLL and exe, and tell what kind of event it is.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: SQLSRV and XAMPP 1.7.7

Postby hackattack142 » 26. January 2012 23:50

I just tried it to see if I could add them without crashing Apache and it started up fine.

1. I grabbed the PHP drivers from here: http://www.microsoft.com/download/en/de ... n&id=20098
2. I extracted that package into a folder on my desktop
3. I copied "php_pdo_sqlsrv_53_ts_vc9.dll" and "php_sqlsrv_53_ts_vc9.dll" to my "/xampp/php/ext" folder
4. Added the extension lines to my "php.ini" file
5. Updated the Microsoft SQL 2008 R2 Client on my machine (Stated as a requirement on the PHP manual page)
6. Started Apache via the Control Panel and it started up without crashing

You might want to consult this page for additional requirements/instructions: http://www.php.net/manual/en/sqlsrv.setup.php
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 703
Joined: 20. May 2011 23:29
XAMPP Version: 5.6.3
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: SQLSRV and XAMPP 1.7.7

Postby crambler » 27. January 2012 16:14

Thank you, hackattack142.
I must have been using the wrong sqlsrv dlls?
I completely uninstalled and reinstalled using your dll link and it worked fine.
The file I had downloaded was SQLSRV30.exe.
Not SQLSRV20.exe.
I had already updated the native client.

Anyways now it works.
Too many dlls out there and too much old information!


Thank you again.
Resolved! :mrgreen:
crambler
 
Posts: 4
Joined: 26. January 2012 21:46
XAMPP Version: 5.6.3
Operating System: Windows 7 Ultimate N

Re: SQLSRV and XAMPP 1.7.7

Postby hackattack142 » 27. January 2012 19:51

Great, before this thread is locked i wanted to clarify why 2.0 is better than 3.0 in this case.

The full name for 3.0 is "Microsoft Drivers 3.0 for SQL Server for PHP CTP1". The important part is the "CTP1" at the end which stands for Community Technology Preview 1. It is what it says, a preview and it not intended in any way as a final or production ready release.
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 703
Joined: 20. May 2011 23:29
XAMPP Version: 5.6.3
Operating System: Windows 7 Ultimate SP1 64-Bit


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 54 guests