[英]How to run a PHP file in an Azure WebJob from a bat file with your .user.ini and custom extensions?
如果尝试使用Azure提供的WebJobs功能使用第三方软件(例如Piwik),则可能会遇到PHP 无法加载自定义.user.ini或您在Azure门户中启用的用户扩展的问题。
由于您可能还使用了第三方软件,因此还需要使用CLI中的PHP(.bat文件),并且不能上载自定义PHP文件以在正确的环境中执行。
我通过重新定义PHP_INI_SCAN_DIR并将扩展名指定为php.exe的参数来解决此问题。
set PHP_INI_SCAN_DIR=D:\home\site\wwwroot\
php.exe -dextension=D:\home\site\path_to_your_extension.dll -f "D:\home\site\wwwroot\your_php_file.php"
对于Piwik,它可能如下所示:
set PHP_INI_SCAN_DIR=D:\home\site\wwwroot\
php.exe -dextension=D:\home\site\bin\php71\php_igbinary.dll -dextension=D:\home\site\bin\php71\php_redis.dll -dextension=D:\home\site\bin\php71\php_geoip.dll -f "D:\home\site\wwwroot\console" core:archive --url=https://your.url.com/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.