0

I want to develop web based control software for the Pi in PHP. I have some experience in PHP , but i have experience in using PHP, but no experience in running it on a Raspberry Pi.

  • your question appears to have nothing to do with the Raspberry Pi ... look for general programming tutorials and linux tutorials – jsotola Aug 4 at 18:19
  • @jsotola what you mean? – Goma01 Tera20 Aug 6 at 13:09
  • @jsotola I guess the actual question is "How to install a web server on the pi" and possibly something like "Can I control my Pi (e.g. GPIO) from PHP". This isn't really clear and maybe Goma01 Tera20 can add more details to the question. – allo Aug 6 at 21:08
  • 1
    @Goma01Tera20 you did not ask anything that is specific to RPi ... your question could easily apply to Linux, MacOS or Windows ... that makes it a general programming question ... you are "shooting yourself in the foot", if all you look for are RPi tutorials and RPi info on the web – jsotola Aug 6 at 23:01
2

You can start off by setting up a simple apache server you can then use PHP for something like creating a dashboard that displays data from the sensors you connect to your Pi. I made a similar project for a high school hackathon last year.

Some tutorials to help you get started:

| improve this answer | |
0

welcome.

I assume you mean to ask: what do I need to make gpios and other pi-specific stuff usable in PHP?

I would encourage in using some other tech, but if that's your choice my gut feeling would be to just have some system calls, see this example.

The performance won't be exciting but it's acceptable for watering the pots or turning on a lamp.

A quick google of PHP libraries for GPIOs resulted in multiple matches, I wouldn't feel like using any but you can take the chance to experiment with them.

| improve this answer | |

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