Home > Archive > PHP Pear > December 2005 > Re: [PEAR] DB Package with Oracle and SELECT * FROM
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [PEAR] DB Package with Oracle and SELECT * FROM
|
|
| Justin Patrin 2005-12-12, 7:12 pm |
| 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 exe=
cute my
> script, I've the error:
>
> SELECT * FROM test_table [nativecode=3DORA-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=3D/opt/Oracle/product/9.2.0.4/OraHome1/");
>
> $dsn =3D 'oci8://user:pass@TSP';
>
> $options =3D array(
> 'debug' =3D> 2,
> 'portability' =3D> DB_PORTABILITY_ALL,
> );
What happens if you remove these options?
>
> $db =3D& DB::connect($dsn);
>
> if (PEAR::isError($db)) {
> die($db->getDebugInfo());
> }
>
> $res =3D& $db->query('SELECT * FROM test_table');
>
> if (DB::isError($res)) {
> die($res->getDebugInfo());
> }
>
> while ($row =3D& $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
| |
| Dustin Machi 2005-12-12, 7:12 pm |
| To be honest, we ended up hacking up our pear oracle driver to make
all this work cleanly and consistently with oracle. Some of our
changes are probably pretty specific to our needs, but I'm sure that
I could find out what all we changed if it is useful (or send someone
a copy of our oracle driver).
Dustin
On Dec 12, 2005, at 2:11 PM, Craig Constantine wrote:
> --On Monday, December 12, 2005 10:48 AM -0800 Justin Patrin
> <papercrane@gmail.com> wrote:
>
>
>
>
>
> ORA-01029, 00000, "internal two task error"
> Cause: Received a request to send the long again when there is no long
> Action: Report as a bug
>
> Not sure what that means however. If your table contains a LONG
> column, try
> explicitly selecting (select a,b,c ...) all the columns that aren't
> TYPE
> long... that would at least tell you the problem lies in retrieving
> the
> long column.
>
> -c
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
|
|
|
|
|