2

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:

  1. Downloaded the Windows VC9 (Non-TS) (x86) loader from the ionCube loader download page.
  2. Created a directory at /site/wwwroot/bin
  3. FTP'd ioncube_loader_win_5.3.dll to that directory.
  4. Under "app settings" in the Azure portal for the web site I added PHP_EXTENSIONS with value bin/ioncube_loader_win_5.3.dll.
  5. 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 contains APPSETTING_PHP_EXTENSIONS = bin/ioncube_loader_win_5.3.dll.
  6. 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.

Mike
  • 7,500
  • 8
  • 44
  • 62
  • 1
    I recently posted an answer around [ZendGuard on Windows Azure Web Sites](http://stackoverflow.com/questions/15193837/how-can-i-enable-zend-guard-loader-extension-zendloader-dll-on-azure/17870774#17870774) – cory-fowler Aug 08 '13 at 18:20
  • 1
    @SyntaxC4 Awesome ... if you create an answer to this question linking to your blog post I'll accept it as the answer to this question. – Mike Aug 09 '13 at 20:17

3 Answers3

2

I posted an article explaining How to configure ZendGuard on Windows Azure Web Sites

cory-fowler
  • 4,020
  • 2
  • 18
  • 29
1

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.

astaykov
  • 30,768
  • 3
  • 70
  • 86
  • 1
    I tried placing the file in all three locations, and only when I put it where you suggested (site/wwwroot/bit) did Azure seem to notice it at all. So I think you're correct about that. Unfortunately I had the same result as you ... the website won't even start now. Still looking for a solution. – Mike Nov 09 '12 at 15:53
  • 1
    the website starts, however the PHP is generating errors, which are most probably caused by the ionCube module, untraceable unfortunately. – astaykov Nov 09 '12 at 19:33
1

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.

Max13
  • 919
  • 2
  • 9
  • 27
  • 1
    While this may answer the question, it is better to provide the relevant portions of the answer here. Links break, and simply linking to off-site content does not make this site more valuable to users. – elixenide Mar 08 '14 at 01:22