Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 02-04-2009
Member
 
Join Date: Oct 2008
Posts: 75
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
Reply With Quote
  #2  
Old 02-04-2009
Member
 
Join Date: Jan 2008
Posts: 1,515
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.
Reply With Quote
  #3  
Old 02-04-2009
Member
 
Join Date: Feb 2008
Posts: 1,848
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..
Reply With Quote
  #4  
Old 02-04-2009
Member
 
Join Date: Oct 2005
Posts: 2,389
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.
Reply With Quote
  #5  
Old 02-04-2009
Member
 
Join Date: Nov 2005
Posts: 1,323
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:
Reply With Quote
  #6  
Old 02-04-2009
Member
 
Join Date: Oct 2008
Posts: 75
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Fatal Error: Call to undefined function ocilogon ()"
Thread Thread Starter Forum Replies Last Post
fatal error while playing call of duty: Modern Warfare 3 Pratyus Video Games 3 18-11-2011 07:25 PM
Running Call of Duty: Modern Warfare 2 results in Fatal Blue Screen error KALINDA Video Games 4 28-01-2010 09:35 PM
Fatal Error : Call to undefined function simplexml_load_file() Ananias Software Development 3 02-06-2009 05:43 PM
PLEASE HELP!!! Error DLL Function call crashed nhet Windows XP Support 2 13-10-2008 01:33 AM
Fatal error: Call to undefined function: curl_init() in Miltongomes Software Development 3 04-08-2008 01:44 PM


All times are GMT +5.5. The time now is 08:33 AM.