PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB » Bug #3078

DB problem with CLI php

Details

Submitted2005-01-03 04:28 UTC
Fromutrodia at yahoo dot ie
Assigneddanielc
StatusBogus
PackageDB
PHP Version5.0.3
OSFedora Core 3
Roadmaps(Not assigned)

Comments

[2005-01-03 04:28 UTC] utrodia at yahoo dot ie

Description:
------------
I have a simple DB connection
code that works well as an apache module
but dont work via CLI.

with the CLI , i get an error object
" DB Error: connect failed"

the reason is , as the detailed message suggests:
[nativecode=I/O error for file "var/db/fdb/uno.fdb" Error while trying to open file No such file or directory]

* as u can c in the Reproduce code ,
the database location is hard-coded in the script
, when run through web-server. connects fine
but failes when run as 'php test_db.php'.

the db-engine if Firebird SQL 1.5 (latest)

PEAR Version is 1.33

php config line is:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --disable-cgi --with-ncurses --with-interbase=/opt/firebird/ --with-zlib

* it happens the same with or without apache running.
(apache 2)

thanks in advance

Asaf

Reproduce code:
---------------
<?php
require_once 'DB.php';

echo 'Testing Db Connection...
';

$dsn = 'ibase://sysdba:swelta@localhost/var/db/fdb/uno.fdb';
print_r(DB::connect($dsn));

?>

Expected result:
----------------
to run the same as CLI script
and as apache-module script.

(success on both ,or fail on both)

Actual result:
--------------
the script runs succesfully as apache-module script
but failes to connect db as CLI php script.

[2005-01-03 12:54 UTC] utrodia at yahoo dot ie

if the problem is with
the server (you mean Db ?)

then y its working fine with apache
and not with CLI ?

i tried running the script
as root also and results the same