Connecting Tech Pros Worldwide Forums | Help | Site Map

execute php from cmd (undefined function OCILogon)

Newbie
 
Join Date: Jul 2008
Posts: 24
#1: Jul 6 '09
i tried to execute php file from cmd line. i'm using xampp version 1.67 with windows server 2003 as the OS. it'll also include oracle as the database,which means OCILogon() will be called in my php file and so other functions. i already configured the php.ini so that it connects to oracle. in web page, i can access the database(oracle). But the problem is, when i tried to execute the php file through cmd line with this code :

c:\xampp\php\php4\php.exe c:\test.php

it shows error, which says "call to undefined function OCILogon() bla.bla..bla...."

any suggestions??? really need help here

thx in advance

zorgi's Avatar
Member
 
Join Date: Mar 2008
Location: here
Posts: 107
#2: Jul 6 '09

re: execute php from cmd (undefined function OCILogon)


http://www.bernzilla.com/item.php?id=784
Atli's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Posts: 3,754
#3: Jul 6 '09

re: execute php from cmd (undefined function OCILogon)


Hi.

Even tho you have configured the php.ini file to enable the extension, the php.ini file that the CGI version of PHP uses isn't necessarily the same one the Apache module uses.

Try to execute this via the command line:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. phpinfo(INFO_GENERAL);
  3. ?>
Look for the Loaded Configuration File line. See if it is the right file.
Newbie
 
Join Date: Jul 2008
Posts: 24
#4: Jul 7 '09

re: execute php from cmd (undefined function OCILogon)


Hehhee, thx mod. It works
Reply