Re: DB Package with Oracle and SELECT * FROM
| From: | Justin Patrin | Date: | Mon, 12 Dec 2005 18:48:16 +0000 |
| Subject: | Re: DB Package with Oracle and SELECT * FROM | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22212@lists.php.net to get a copy of this message | ||
On 12/12/05, Franck Collins <franck@collins.fr> wrote:
> Hello,
>
> I want to use Pear DB on a Oracle Database but I've a problem. When I execute my
> script, I've the error:
>
> SELECT * FROM test_table [nativecode=ORA-01029: internal two task error]
>
> Whereas if I don't use Pear DB, if I use PHP functions for Oracle, there is not
> problem...
>
> If somebody can help me ?
>
> Thanks
>
> Franck
>
>
> Script:
>
> <?php
> require_once 'DB.php';
>
> Putenv("ORACLE_HOME=/opt/Oracle/product/9.2.0.4/OraHome1/");
>
> $dsn = 'oci8://user:pass@TSP';
>
> $options = array(
> 'debug' => 2,
> 'portability' => DB_PORTABILITY_ALL,
> );
What happens if you remove these options?
>
> $db =& DB::connect($dsn);
>
> if (PEAR::isError($db)) {
> die($db->getDebugInfo());
> }
>
> $res =& $db->query('SELECT * FROM test_table');
>
> if (DB::isError($res)) {
> die($res->getDebugInfo());
> }
>
> while ($row =& $res->fetchRow()) {
> echo "Val -> " . $row[0] . "<br />";
> }
> ?>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Justin Patrin