#45294 [NEW]: phpcli and ms sql

From: Date: Tue, 17 Jun 2008 11:13:31 +0000
Subject: #45294 [NEW]: phpcli and ms sql
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-125827@lists.php.net to get a copy of this message
From: lowee at lowee dot net Operating system: windows 2003 PHP version: 5.2.6 PHP Bug Type: CGI related Bug description: phpcli and ms sql Description: ------------ php cli with pdo and ms sql it is working on any web browser but on php cli it is not working Reproduce code: --------------- define('DB_HOST','192.168.1.20'); # mtc_awdb # mtc_hds define('DB_NAME','db1'); define('DB_USER','user'); define('DB_PASS','pass'); $dbhandle = mssql_connect(DB_HOST, DB_USER, DB_PASS) or die("Couldn't connect to SQL Server on"); try { $pdo = new PDO('mssql:host='.DB_HOST.';dbname='.DB_NAME,DB_USER,DB_PASS); }catch (PDOException $e) { print $e->getMessage(); } Expected result: ---------------- to show me that it is connected Actual result: -------------- 1 - SQLSTATE[01002] Unable to connect: SQL Server is unavailable or does not exist. (severity 9) 2 - SERVER not available -- Edit bug report at http://bugs.php.net/?id=45294&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45294&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45294&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45294&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45294&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45294&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45294&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45294&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45294&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45294&r=support Expected behavior: http://bugs.php.net/fix.php?id=45294&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45294&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45294&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45294&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45294&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45294&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45294&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45294&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45294&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45294&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45294&r=mysqlcfg

« previous php.bugs (#125827) next »