我得到error_log
http://wrapper在服务器配置中被禁用allow_url_fopen=0在{my dir}/fetch.php 中
在web浏览器中运行fetch.php没有问题。
在谷歌上发现这个问题后,你需要打开fopen,这是我在php.ini中完成的
php.ini
allow_url_fopen = On
allow_url_include = On
register_globals = On
safe_mode = Off
max_input_time = 900
memory_limit = 256M
这是我的Cron工作
/usr/bin/php -q /home/{CpanelUsername}/public_html/{RootFolder}/cronjob/fetch.php
{CpanelUsername}和{RootFolder}当然是正确的路径。
首先检查php是用哪个php.ini运行的。它可以通过使用功能来完成:
phpinfo()
loaded configuration file
还要在Core
部分下检查allow_url_fopen是否为true。
如果它是您编辑的同一个文件,那么请确保在php.ini 中设置值后重新启动了apache