4

I need my ESP8266 web server to load my website files with .php extensions. So far I managed to load .htm .css and .js files from my SD card, but when I upload PHP files on my SD card, they won't run. How can I do that?

4
  • 1
    What web server are you using? Does is it capable of running PHP? Did you check the docs?
    – user31481
    Jan 16, 2018 at 19:48
  • I am using Wemos D1 mini, documentation doesn't say anything about PHP
    – Kirill
    Jan 16, 2018 at 19:53
  • golly, that would be really really handy. too bad it's not possible.
    – dandavis
    Jan 16, 2018 at 20:54
  • 1
    You can still achieve that by getting a Raspberry PI and running Linux server on it. Then you will be able to install: PHP + MySQL + phpMyAdmin and many other features
    – Kirill
    Jan 16, 2018 at 22:07

1 Answer 1

8

It sounds like you are trying to put a PHP file on an SD card that the ESP8266 will serve itself.

This is not possible, as no one has, and probably never will, port PHP to the Espressif 8266 platform.

Your device can serve .htm .css and .js files because it's just a matter of streaming the file content to the client. But PHP requires that an application on the server run the PHP code, and then send the resulting output to the client.

1
  • 1
    Thank you for that information! Looks like I need to buy a Raspberry PI and install Linux server on it
    – Kirill
    Jan 16, 2018 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.