Michael, I have not used Oracle from PHP but I may be able to provide some pointers/questions.
You do not say where the Oracle database is. If it is on the AIX computer then to connect you will need the "system@tnsname" form of user name to specify which connection in your tnsnames.ora file to use. (I assume you have modified the linux firewall to allow the ports used in the tnsnames.ora file to be open). I assume that you have the Oracle client code loaded onto the linux computer. If the database is local on the linux computer then maybe the firewall issue still applies. What Iwould look at first is the first error message. ORA-12546 is TNS:permission denied. This looks like the user that apache is run as cannot open the tnsnames.ora file. From the Oracle home you give, I think it should be trying to open /home/oracle/OraHome1/network/admin/tnsnames.ora but cannot do so. Is the file located here? Hope this helps. Chris Michael P. Carel wrote: >Hi, > >I've tried installing php with oracle support to my RedHat Linux server. Im >recieving this error when executing a sample Ora fucntion to connect to the >oracle database.My oracle database works fine but my script canot connect. >I've tried this sample script with my AIX server but it works fine. I >really dont know why ... >Please help. heres my sample connect script: > >PutEnv("ORACLE_SID=oracle"); >PutEnv("ORACLE_HOME=/home/oracle/OraHome1"); > >$connection = Ora_Logon("system","manager"); > > >if($connection==false){ > echo Ora_ErrorCode($connection).":". Ora_error($connection)."<BR>"; >exit; >} > > > >And heres my warning error: > >Warning: Oracle: Connection Failed: Error while trying to retrieve text for >error ORA-12546 in /home/www/htdocs/selecting.php on line 9 > >Warning: ora_errorcode(): supplied argument is not a valid >Oracle-Connection/Cursor resource in /home/www/htdocs/selecting.php on line >13 > >Warning: ora_error(): supplied argument is not a valid >Oracle-Connection/Cursor resource in /home/www/htdocs/selecting.php on line >13 >: > > > >I can connect to oracle remotely with my sqlplus using this account. Is >thereanything that i didnt know when settingup php with oracle in redhat >linux? > > > >Thanks in advance. > > > >Regards, >Mike > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php