[PHP-DB] different behaviour with CLI and Apache PHP with database connection

2007-08-26 Thread Jason Cartledge

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


[EMAIL PROTECTED]:/var/www/test cat testoci.php
getMessage();
   }
?
[EMAIL PROTECTED]:/var/www/test
[EMAIL PROTECTED]:/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)

oci8

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

Directive = Local Value = Master Value
oci8.default_prefetch = 10 = 10
oci8.max_persistent = -1 = -1
oci8.old_oci_close_semantics = 0 = 0
oci8.persistent_timeout = -1 = -1
oci8.ping_interval = 60 = 60
oci8.privileged_connect = Off = Off
oci8.statement_cache_size = 20 = 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: [PHP-DB] different behaviour with CLI and Apache PHP with database connection

2007-08-26 Thread Chris

Jason Cartledge wrote:

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


[EMAIL PROTECTED]:/var/www/test cat testoci.php
getMessage();
   }
?
[EMAIL PROTECTED]:/var/www/test
[EMAIL PROTECTED]:/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__) . 'br/';

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