Fatal Error: Call to undefined function ocilogon ()
Hello,
when I try to connect to Oracle database from a PHP page I Get the Followinf Error message :
when I use Ora_Logon (), I have this message
Fatal error: Call to undefined function Ora_Logon ()
when I use ocilogon (), I have this message
Fatal error: Call to undefined function ocilogon ()
when I use oci_connect (), I have this message
Fatal error: Call to undefined function oci_connect ()
in short I use any function I have this message Call to undefined ....
please help me Solve this problem thank you in Advance for helping me
best regards
Re: Fatal Error: Call to undefined function ocilogon ()
For those on a UNIX/Linux system getting this error you'll need to recompile PHP with the options --with-oracle=$ORACLE_HOME --with-oci8=$ORACLE_HOME, where $ORACLE_HOME is the home directory for oracle. PHP does not ship with the oracle modules installed by default, they must be enabled manually during compile time on UNIX, or as Ivan pointed out in php.ini on windows.
Re: Fatal Error: Call to undefined function ocilogon ()
You should use --with-oci8 if you want to use the oci8 functions. In that phpinfo() output there is no oci8 enabled..
Re: Fatal Error: Call to undefined function ocilogon ()
Use the phpinfo() function to check that the same php is being used in
Apache and on the command line.Make sure LD_LIBRARY_PATH contains $ORACLE_HOME/lib Relink with --with-oci8 Another suggestion is upgrade PHP to 4.4 and manually get the new refactored oci8 drivers. After you upgrade to something like: pear install oci8-beta to get the new drivers.
Re: Fatal Error: Call to undefined function ocilogon ()
The error message is telling you that it was unable to find the function named OCILogon() that you called. Ordinarily, that would be probably be in an "include file", a separate file that must be on your server and that you must reference in this script with something like this:
Re: Fatal Error: Call to undefined function ocilogon ()
I added these two lines in my php.ini Code:
Quote:
extension = php_oci8.dll
extension = php_oracle.dll
I played this very minimalist script: Code:
Quote:
<? php
$ conn = ora_logon ( "user @ TNSNAME", "pass");
>
And it works very well, finally I got a message telling me that the connection could not be done .... So if it does not work, check whether the two dll files are present in the / ext of your php engine. and they are very busy with a phpinfo (). I had a case once where I had two engines installed php on my computer ... php.ini and who was responsible was not good.