Hi Team,

Please hekp me with the OCILogon error. Im using WampServer Version 2.2.
I have a script which connects to 10g and 11g database and it works perfect from the browser.

Now i want to automate the php script via batch file which will be windows 7 schedule task.

I have set the classpath to C:\wamp\bin\php\php5.4.3 for php. While executing script it gives "Call to undefined function OCILogon() in c:\wamp\www\cps_auto\testauto.php on line 6. PHP Stack trace: php 1.(main) c:\c:\wamp\www\cps_auto\testauto.php:0

Please help need it urgently.

Recommended Answers

All 2 Replies


from the command line check if the oci8 module is loaded:

php -r 'echo extension_loaded("oci8") ? "true":"false";';

You can also list all the modules loaded by using:

php -m

The PHP version used in command line is known as CLI version and the configuration of this is usually different from the Apache version. They use different php.ini files. So if in the Apache version you see extension=oci8.dll or something similar, copy this to the php.ini of the CLI version and it should work.

Also by using oci_connect() do you get the same error? Ocilogon is an alias of oci_connect and the alias is deprecated since PHP 5.4.0.

More information about the installation process:

Hi cereal,
You are right, we need to decomment in php.INI file in phpx.x.x folder also. Bit confusing the need to have 2 files for config..

It worked finally.. Thanks a lot


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.