2015年5月1日 星期五

Azure + Phalcon(php)

Microsoft Azure 是滿好玩的
不過因為他的httpd 不是 apache 而是iis
然後 php extension 要用load  所以稍微比較麻煩點

重點是 phalcon.dll 要用5.4 vc9 non-thread-safe
其他5.5/5.6版本編譯的環境對不上 所以一定讀不進去

然後IIS的關係 .htaccess 不能用 改用web.config
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Imported Rule 3" enabled="true" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> </conditions> <serverVariables /> <action type="Rewrite" url="index.php?_url=/{R:1}" appendQueryString="true" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
extensions.ini
; Enable Extensions
extension=d:\home\site\ext\php_mongo.dll


Enable extensions in the default PHP runtime
PHP_INI_SCAN_DIR : d:\home\site\ini


以上

[文獻]
http://azure.microsoft.com/en-us/documentation/articles/web-sites-php-configure/
http://stackoverflow.com/questions/25798669/phalcon-iis-7-5-and-url-rewrite-problems