different behaviour with CLI and Apache PHP with database connection

different behaviour with CLI and Apache PHP with database connection

am 26.08.2007 14:31:11 von Jason Cartledge

Hello, I have a problem connecting to an Oracle XE database. Here is my cod=
e and the output.


jason@home:/var/www/test cat testoci.php
getMessage();
}
?>
jason@home:/var/www/test
jason@home:/var/www/test php testoci.php

Logon OK


When I navigate to http://localhost/test/testoci.php however I see "DB Erro=
r: connect failed"

My /etc/php5/cli/php.ini and my /etc/php5/apache2/php.ini have the extensio=
n=3Doci8.so line in them.

When I view the information from phpinfo() for the cli and apache2 executio=
n, it says (this one printed from the cli version)

oci8

OCI8 Support =3D> enabled
Version =3D> 1.2.3
Revision =3D> $Revision: 1.269.2.16.2.29 $
Active Persistent Connections =3D> 0
Active Connections =3D> 1
Oracle Version =3D>
Compile-time ORACLE_HOME =3D>
Libraries Used =3D>
Temporary Lob support =3D> enabled
Collections support =3D> enabled

Directive =3D> Local Value =3D> Master Value
oci8.default_prefetch =3D> 10 =3D> 10
oci8.max_persistent =3D> -1 =3D> -1
oci8.old_oci_close_semantics =3D> 0 =3D> 0
oci8.persistent_timeout =3D> -1 =3D> -1
oci8.ping_interval =3D> 60 =3D> 60
oci8.privileged_connect =3D> Off =3D> Off
oci8.statement_cache_size =3D> 20 =3D> 20


Does anyone have any ideas about how to resolve this problem?

Thank you
Jason




____________________________________________________________ _____
Feel like a local wherever you go with BackOfMyHand.com
http://www.backofmyhand.com=

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: different behaviour with CLI and Apache PHP with databaseconnection

am 27.08.2007 03:28:27 von dmagick

Jason Cartledge wrote:
> Hello, I have a problem connecting to an Oracle XE database. Here is my code and the output.
>
>
> jason@home:/var/www/test cat testoci.php
> getMessage();
> }
> ?>
> jason@home:/var/www/test
> jason@home:/var/www/test php testoci.php
>
> Logon OK
>
>
> When I navigate to http://localhost/test/testoci.php however I see "DB Error: connect failed"
>
> My /etc/php5/cli/php.ini and my /etc/php5/apache2/php.ini have the extension=oci8.so line in them.
>
> When I view the information from phpinfo() for the cli and apache2 execution, it says (this one printed from the cli version)

text emails don't have a right/left column (please don't send us html
emails either) - but there would be something different between the two.

Or - are you running the same file?

Add:

echo 'I am here ' . dirname(__FILE__) . '
';

to the top of your script and make sure it's exactly the same file - if
you see it in one version and not the other, that will be your problem..

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php