douwen3973 2014-10-27 21:30
浏览 59

Azure网站上的Azure WebJobs中的PHP

I've written a powershell script that basically calls php %WEBROOT%\dir\ and set it to run as as WebJob in Azure - this is on an Azure Website.

The problem I am having is it does not pickup the .user.ini file that is configured (and working) on the Website. I've been playing around with powershell in kudu and am at wits end on how to get this to work.

Is there anyway to launch php in a away that is can append a user.ini file to the standard php.ini file? Otherwise my only solution I can think of so far is to read the entire php.ini in D:\Program Files\xxx, copy it, append to it and execute php with my modified version. This isn't an ideal solution and I'm trying to get around it if possible.

Alternatively, the other way around it is to declare using ini_set() the variables I want to change at run time but the problem with this not all my vars are set - in particularly error_reporting. If someone can help me work out a way to turn off E_STRICT & E_NOTICE it would also solve my problem. I've tried error_reporting(0) and all the different way but it completely ignores them - it works fine with date.timezone, include_path, etc.

  • 写回答

1条回答 默认 最新

  • douzhe9075 2015-04-13 19:08
    关注

    Config options can be set with the -d parameter upon calling the PHP executable. I used it to include the mongo extension, which is not included by default. My job is a .bat file with the line below.

    "%ProgramFiles%\PHP\v5.6\php.exe" -dextension=D:\home\site\wwwroot\bin\php_mongo.dll D:\home\site\cli\ascript.php
    

    See the docs here

    评论

报告相同问题?

悬赏问题

  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型