Connecting Tech Pros Worldwide Help | Site Map

execute php from cmd (undefined function OCILogon)

  #1  
Old July 6th, 2009, 11:02 AM
Newbie
 
Join Date: Jul 2008
Posts: 22
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
  #2  
Old July 6th, 2009, 11:51 AM
zorgi's Avatar
Member
 
Join Date: Mar 2008
Location: here
Posts: 107

re: execute php from cmd (undefined function OCILogon)


http://www.bernzilla.com/item.php?id=784
  #3  
Old July 6th, 2009, 01:32 PM
Atli's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Posts: 3,701
Provided Answers: 4

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.
  #4  
Old July 7th, 2009, 02:27 AM
Newbie
 
Join Date: Jul 2008
Posts: 22

re: execute php from cmd (undefined function OCILogon)


Hehhee, thx mod. It works
Reply