Xampp无法加载动态库php_sqlsrv


Hi all

I'm using xampp v3.2.1 php version 5.5.11

in my php.ini config code

extension=php_sqlsrv_55_ts.dll
extension=php_pdo_sqlsrv_55_ts.dll

Extensions in my folder 'D:xampp\php\ext'

enter image description here

And error

enter image description here

I had same issue with php_apcu.dll

After many struggles I came up with this solution:

  1. Get php_apcu.dll
  2. Copy php_apcu.dll to 'C:\xampp\php\ext'
  3. in my php.ini:
    extension=php_apcu.dll

Problems that occurs on after restarts xampp apache:

and I get following PHP error

So PHP tells us that API PHP version and API php_apcu.dll version is not compatible.

So we have to find out compatible, to do this i go in 'C:\xamppeadme_en.txt' and there it is written:

    ###### ApacheFriends XAMPP Version 5.6.28 ######

    Important! PHP in this package needs the Microsoft Visual C++ 2008 Redistributable package from
    http://www.microsoft.com/en-us/download/details.aspx?id=5582. Please ensure that the VC++ 2008 runtime
    libraries are installed on your system.    

      + Apache 2.4.23
      + MariaDB 10.1.19
      + PHP 5.6.28 (VC11 X86 32bit thread safe) + PEAR
      + phpMyAdmin 4.5.1
      + OpenSSL 1.0.2d
      + ADOdb 518a
      + Mercury Mail Transport System v4.63 (not included in the portable version)
      + FileZilla FTP Server 0.9.41 (not included in the portable version)
      + Webalizer 2.23-04 (not included in the portable version) 
      + Strawberry Perl 5.16.1.1 Portable
      + Tomcat 7.0.56
      + XAMPP Control Panel Version 3.2.2 by hackattack142 (Great Thanks!!))
        See: http://www.apachefriends.org/f/viewtopic.php?f=16&t=46743
      + XAMPP mailToDisk 1.0 (write emails via PHP on local disk in <xampp>\mailoutput. Activated in the php.ini as mail default.)

    --------------------------------------------------------------- 

So i've install Microsoft Visual C++ 2008 Redistributable package from http://www.microsoft.com/en-us/download/details.aspx?id=5582`

And noticed row:

+ PHP 5.6.28 (VC11 X86 32bit thread safe) + PEAR

So we need to find php_apcu.dll with this parameters VC11 X86 32bit thread safe

And i have found http://windows.php.net/downloads/pecl/releases/apcu/4.0.8/ and downloaded php_apcu-4.0.8-5.6-ts-vc11-x86.zip

And everything worked without errors!

try to use : extension="D:xampp\php\ext\php_sqlsrv_55_ts.dll" extension="D:xampp\php\ext\php_pdo_sqlsrv_55_ts.dll"

then restart you webserver?