|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-10-01 06:22 UTC] marcink86 at interia dot eu
Description:
------------
I created a file test.php:
<?php
$pdo = new PDO("firebird:host=localhost;dbname=TESTDB", "sysdba", "masterkey");
var_dump($pdo);
?>
Note that there exists an alias TESTDB to *FDB file in Firebird configuration.
When I 'run' this file in a web browser i get:
object(PDO)#1 (0) { }
which I think is correct since after var_dump($pdo) I can retrieve records from this database without any problem.
However, in command line ("php test.php" in cmd) var_dump($pdo) returns NULL. Is it correct?
It causes many problems espacially in a Symfony framework (>=1.2) where you build sql files and execute them through command line.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
The DSN in the test.php above is incorrect: <?php $pdo = new PDO("firebird:host=localhost;dbname=TESTDB", "sysdba", "masterkey"); var_dump($pdo); ?> it should be: <?php $pdo = new PDO("firebird:dbname=localhost:TESTDB", "sysdba", "masterkey"); var_dump($pdo); ?>