SQLSRV PHP for SQL Server for is not a valid Win32 application

前端 未结 4 1601
Happy的楠姐
Happy的楠姐 2021-02-02 15:12

Here is my setup

  • Windows Server 2008 R2 64 bit
  • Apache 2.4.4 64 bit
  • PHP 5.4.15 32 bit (64 bit is still experimental), thread safe, VC9 compiler
4条回答
  •  遇见更好的自我
    2021-02-02 15:30

    I don't know if it helps but i used all 32bit on my Windows 7 64bit system

    Here is what I used and i can use SQL Server

    httpd-2.4.6-win32-VC9 //apache 2.4
    php-5.4.9-Win32-VC9-x86 //php5
    

    inside if my \php\ folder i have

    • php5apache2_4.dll

    Inside \php\ext\ i have

    • php_pdo_sqlsrv_54_nts.dll
    • php_pdo_sqlsrv_54_ts.dll

    I added this to the end of php.ini

    [PHP_SQLSRV]
    extension=php_sqlsrv_54_ts.dll
    [PHP_PDO_SQLSRV]
    extension=php_pdo_sqlsrv_54_ts.dll
    

    I remember it being a right pain getting it to work but it does now. If i remember anymore i'll edit my answer

    UPDATE:

    I think this blog post looks familiar on how i got it working

    http://robsphp.blogspot.co.uk/2012/09/how-to-install-microsofts-sql-server.html

提交回复
热议问题