I have read many posts regarding this problem but i didn't see solution anywhere.
I have Windows XP, PHP5, IIS and ORACLE 9i installed.
I uncommented this two extensions from php.ini file, added all neccesarry permissions on oracle home dir, php dir.
When i try to logon via OCILogon i get access denied error on this two files from PHP.
Please try to solve this with me.
This could be anything. It could just be wrong credentials, or you're connecting to the wrong instance.
Show us some code, we might be able to see more.
Hint: in PHP5, use oci_connect instead of ocilogon.
I think you didn't understand correctly. PHP reports that access to php_oci8.dll is denied:
"Unable to load dynamic library D:\php\ext\php_oci8.dll - Access is denied"
in message box, and then
Fatal error: Call to undefined function OCILogon() in d:\Inetpub\wwwroot\oracle_test.php on line 15
on a webpage.
As i said, extensions in php.ini are uncommented, security for all users on ORACLE home dir, and PHP dir is granted... i don't have a clue.
Google for help. And then aid other IIS users by writing
up what you needed to do.
I've seen several mentions of ISS and OCI8 problems in
PHP bugs. Most turn out to be permission problems.
One bug on this topic is http://bugs.php.net/bug.php?id=29835
We used to get this error on both IIS 5 and IIS 6 with oracle 9i.
Its the permissions issue on oracle directory.
php_oci8.dll and php_oracle.dll call other dlls from the oracle client directory. If the IIS is allowed to use the anonymous logon it uses IUSR_<machinename> account to read the files, therefore this user needs to have read access on oracle installation directory.
after setting the permissions it worked for us.
Hi! I do not know if you still have the problem, but I had the same... Finally I found a document on google which wrote that three dll files I have to copy to the folder where TNSNAMES file is... Unfortunatelly I do not remember the name of the files, but one of them was oci.dll, and there were six or seven files in the same folder so you can copy all...
After that everything worked fine.
Thank you Monty
After much time trying various suggestions around the web, your solution was the correct one. (PHP 4.3.11, IIS 5, Oracle 9i after upgrade from Oracle 8, Windows 2000 server)
Hi could you please tell me where did you install this file? Could you give me proper location of this TNSNAMES folder? And the files you installed i think they are oracle instant client. could you please confirm this to me?
If you've set the environment variable TNS_ADMIN, this is where it'll expect to find tnsnames.ora. Otherwise the last resort is $ORACLE_HOME/network/admin. (On unix systems it also checks either /etc/oracle or /var/opt/oracle depending on the version of unix.)
However, if you're using the OCI driver and specifying hostname,port and Oracle sid (or servicename) in your connection details, then tnsnames.ora isn't used, since you've already specified explicitly everything it would need to get from that file.
Additionally, if you're using Oracle instant client, then tnsnames.ora is not used and you have to explicitly specify hostname,port,service_name/(or sid) to connect
Message was edited by: