sql server - Get undefined function sqlsrv_connect() in PHP -


i trying use microsoft server in php program. downloaded microsift drivers php sql server, made sure microsoft sql server 2012 client installed, made sure extension_dir value correct in php.ini file, , added extension=php_sqlsrv_53_ts.dll in dyanmic extension section of php.ini file. yet still error 'fatal error: call undefined function sqlsrv_connect()'. running apache server on windows 7 , downloaded 3.0 version of driver.

so doing wrong? else should check for? if running under apache server, don't need iis, i? below php code.

      <?php     // phpinfo(info_modules);       require_once 'serverlogin2.php';     /* specify server , connection string attributes. */        //$connectioninfo = array ("database"=>$databasename, "uid"=>$uid, "pwd"=>$pwd);        $connectioninfo = array ("database"=>$databasename);           /* connect using sql server authentication. */          $conn = sqlsrv_connect( $servername, $connectioninfo);         if( $conn === false )        {         echo "unable connect.</br>";          die( print_r( sqlsrv_errors(), true));        }         echo "made sql connection";        return;          ?> 

sqlsrv_connect (sqlsrv extension) not available in ga branch, need svn , compile it. can use mssql_connect (mssql extension) or pdo.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -