Re: different behaviour with CLI and Apache PHP with database connection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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__) . '<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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux