简体   繁体   中英

WAMP - running php file through localhost working fine giving FATAL error while running through batch

I have WAMP installed on my PC, I have my project placed inside C:/WAMP/WWW/MY_PROJECT_NAME/

I have placed PHP file sendmail.php in C:/WAMP/WWW/MY_PROJECT_NAME/ directory When i am running these file through browser http://localhost/MY_PROJECT_NAME/sendmail.php it working fine, Mails are sending as expected.

I have created batch file to run same php file sendmail.php , code of my batch file is as below

C:\wamp\bin\php\php5.5.12\php.exe" -f "C:\wamp\www\MY_PROJECT_NAME\sendmail.php 

My problem is when I am executing same php file with batch, it is giving me fatal error

call to undefined function oci_connect()

Can any one help why fatal error is showing while executing php script through batch ?

The php.ini file used by PHP CLI is in

C:\wamp\bin\php\php5.5.12\php.ini

the php.ini file used by Apache is

C:\wamp\bin\apache\apache{versionnumber}\php.ini

make sure you have added/uncommented the oci extension to the PHP CLI `php.ini file as well as the Apache version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM