Re: [PHP] oracle again!!!!
Michael, If you used to run it some time ago and it worked then but does not now then something has changed (obvious I know). Within the something that has changed is the answer, we just need to find it. Is it the same version of Oracle and same means of getting to Oracle from php (I mean the non-oci8 library)? Is it that connecting to Oracle has simply stopped working or have you done a new installation. I feel more information would help. Regards Chris Michael P. Carel wrote: Thanks Chris , but i used to run this script within the same server(localhost) where oracle/php/apache reside. That's why im wondering why this error appears. I've tried to setup oracle/php/apache with AIX and it work fine. I've also red alot of documentation in setting up with RedHat but still it doesnt work. Is there something i need to consider when installing this in RedHat? Regards, Mike - Original Message - From: Chris Hewitt [EMAIL PROTECTED] Cc: php [EMAIL PROTECTED] Sent: Thursday, June 06, 2002 5:41 PM Subject: Re: [PHP] oracle again 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] oracle again!!!!
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
Re: [PHP] oracle again!!!!
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
Re: [PHP] oracle again!!!!
Thanks Chris , but i used to run this script within the same server(localhost) where oracle/php/apache reside. That's why im wondering why this error appears. I've tried to setup oracle/php/apache with AIX and it work fine. I've also red alot of documentation in setting up with RedHat but still it doesnt work. Is there something i need to consider when installing this in RedHat? Regards, Mike - Original Message - From: Chris Hewitt [EMAIL PROTECTED] Cc: php [EMAIL PROTECTED] Sent: Thursday, June 06, 2002 5:41 PM Subject: Re: [PHP] oracle again 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php