Enabling pHp extensions on Azure Windows app service

David Fenske 101 Reputation points
2021-05-18T17:41:27.873+00:00

Hi Azure community,
Can you help me figure out what I'm missing? I've followed instructions from the Azure docs on enabling pHp extensions in order to try and add outgoing FTP to my WordPress site. I've been following directions here:
This app service was set up using the WordPress template offered by Azure.
I've completed the following:

  1. Created a new directory using Kudu - /home/site/ini
  2. Added an App Setting PHP_INI_SCAN_DIR with a value of "/usr/local/etc/php/conf.d:/home/site/ini"
  3. Verified the existence of the installed pHp extension as php_ftp.dll
  4. Add a file "extensions.ini" into the new /home/site/ini directory shown above, and entered the line extension=php_ftp.dll
  5. Restarted the app service

My phpinfo.php file still doesn't show it picking up the additional configuration file. Any ideas?

Thank you!!
David

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,935 questions
0 comments No comments
{count} votes

Accepted answer
  1. David Fenske 101 Reputation points
    2021-05-18T20:17:07.013+00:00

    OK, I finally got this to work. The combination of settings that proved effective were:

    I changed the PHP_INI_SCAN_DIR from the recommended combination of two paths as shown in my original post to simply "C:\home\site\ini". The first time I tried this, the site wouldn't reload, but this time it worked. This was confusing as some docs showed a web path with forward slashes and some a drive path with drive letter and backslashes. Perhaps some of the docs were for Linux on Azure instead of Windows.

    I also created a copy of the DLL file in a /bin directory under wwwroot, as suggested in the Azure docs. Other docs have said that since it was already included in the installed PHP libraries (which I confirmed) that wouldn't be necessary. However this did work.

    I set the extension setting to an absolute path instead of just naming the extension: extension=/home/site/wwwroot/bin/php_ftp.dll (not a drive path here, oddly)

    Anyway, it finally kicked in.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.