General discussion


oci8 not displayed on php info page

By lordrainsf ·
Hi there
I have sucesfully installed Oracle 10g aka 10.2.0g on Win Vista Home Edition.
SqlPlus works fine.

I then installed php 5.0.7 and Apache 2.0
Both php and Apache working fine.

However I can NOT connect to the oracle database with PhP.

I checked the php info page and oci8 is NOT displayed.

Then I downloaded Oracle Instant Client. I got oci8 etc ( about 90 Megs ) for the files download.

I copyied to C:\Instant_Client_10.2
Then I copied to the php.ini file to see if it would display. Included my tnsnames.ora file etc
Still no display.

It is frustrating,as when I try to use a connect.php file NOTHING is displayed NOT even an error message.

I also went to the Environment Variables
Start / Control Panel / Edit sys environment variables / Environment Variables

I created a TNS_Admin Path in 'User Variables' to C:\Instant_Client_10_2

My Attempt here is as follows
Also to get Sql working I edited the 'System Variables to
( I find if i edit this at all, sql will NOT work - keeping this as it is works )

For instance when I was switching TNS_Admin Path from 'User Variables' to 'System Variables' causes a similar error.

Can anyone help?

php and apache working fine. Sql working fine.
Just can not create a connect.php to the oracle database. NOTHING is displayed.

Lastly I found his sql code which DID
displayed something

Code -
$descriptorspec = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
2 => array("pipe", "w")
$process = proc_open("sqlplus test/test@dev92lnx", $descriptorspec, $pipes);
if (is_resource($process)) {
fwrite($pipes[0], "select sysdate from dual;\n");

while(!feof($pipes[1])) {
echo fgets($pipes[1], 1024);
$return_value = proc_close($process);

echo "command returned $return_value\n";

The Output
SQL*Plus: Release - Production on Tue Oct 14 23:23:26 2008

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

ORA-12154: TNS:could not resolve the connect identifier specified

Enter user-name: SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where ::= [/][@] | /
Enter user-name: command returned 0


Can anyone help. Hope this all makes some sense
Kind Regards

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Related Discussions

Related Forums