简体   繁体   English

在Windows Task Scheduler中运行时oci_pconnect错误

[英]oci_pconnect error when ran in windows task scheduler

I'm trying to run a script that imports data from an Oracle table into a Mysql table. 我正在尝试运行一个脚本,该脚本将从Oracle表中导入数据到Mysql表中。 I'm using oci_pconnect to connect to Oracle. 我正在使用oci_pconnect连接到Oracle。 Everything is running fine when the script is executed in the browser but i'm getting the following error when the script is run in cmd under Windows 在浏览器中执行脚本时,一切运行正常,但是在Windows下在cmd中运行脚本时,出现以下错误

Fatal Error: Call to undefined function oci_pconnect()

I'm calling the php script in cmd by the following code 我通过以下代码在cmd中调用php脚本

@echo off
php C:\wamp\www\somefile.php
echo Done!
pause > nul

Thanks in advance!! 提前致谢!!

To avoid having this error, just go to php.ini located in your PHP folder and uncomment the line of the oci function in the extensions section: 为了避免发生此错误,只需转到PHP文件夹中的php.ini,然后在扩展部分取消注释oci函数的行:

;extension=php_oci8.dll    

problem solved! 问题解决了!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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