I posted an article explaining How to configure ZendGuard on Windows Azure Web Sites
How do I install ionCube on an Azure Web Site?
-
28-11-2021 - |
문제
I am trying to follow the instructions under Using Custom PHP Extensions in Windows Azure Web Sites to enable the ionCube extension for PHP running within an Azure Web Site. Here's what I did:
- Downloaded the Windows VC9 (Non-TS) (x86) loader from the ionCube loader download page.
- Created a directory at /site/wwwroot/bin
- FTP'd
ioncube_loader_win_5.3.dll
to that directory. - Under "app settings" in the Azure portal for the web site I added
PHP_EXTENSIONS
with valuebin/ioncube_loader_win_5.3.dll
. - I loaded http://my.azure.website/info.php and verified that the Environment table included
PHP_EXTENSIONS
=bin/ioncube_loader_win_5.3.dll
. It also containsAPPSETTING_PHP_EXTENSIONS
=bin/ioncube_loader_win_5.3.dll
. - When I try to load the site I get the message "The page cannot be displayed because an internal server error has occurred" and no additional information.
Is there something I forgot or is ioncube not supported on Azure? Did I set up the directory properly?
I also tried the Zend Guard Loader extension (ZendLoader.dll) in the same manner. I don't get an error message, but the extension doesn't show up in phpinfo() either.
해결책
다른 팁
You shall not put the module in the root of the ftp site. The DLL module must reside in a folder below the APPLICATION ROOT, which is site/wwwroot/
So, you have to create either site/wwwroot/bin
or anything of your choice (i.e. site/wwwroot/phpext
), and then map PHP_EXTENSIONS again to bin/ioncube...
(or phpext/iocube...
), whatever is the name of your folder underneath site/wwwroot/
!
However I am having trouble running any php page when the mentioned module is enabled. I don't know whether this is because my files are not ionCube encrypted, or because of some issue with the ionCube itself. So if you have a ionCube encrypted file, you have the chance to test.
ionCube is a Zend Extension, so according to an answer on windows azure forums:
The correct way to do it would be to create the /site/wwwroot/bin directory and upload ioncube_loader_win_5.4.dll there then add under the portal App Settings a PHP_ZENDEXTENSIONS setting with bin\ioncube_loader_win_5.4.dll as its value.
I confirm, but my tests was done in /site/phpext
with an App Setting on ..\phpext\ioncube_loader_win_5.4.dll
.