First off, this is my first post, so be kind on me if I'm in the wrong section of the forums for the problem I'm about to expose !
I'm quite new to the usage of the Raspberry Pi, Linux and Python. I want to use the device as a webserver. I first thought about the classic tools to proceed so : Apache, php and mySQL. As I want to control other devices through Python programming (like DMX512, and sensors), since it seems to be widely used for the Raspberry Pi, that's the fourth tool I should be using.
After a few research, I read some threads (on different websites) on which some users said it was a bad idea to use all those things altogether : if you have to call Python scripts through php, it will slow down the whole thing, taking much more time than it should. Could anybody confirm that statement ?
I decided to generate some html code through Python, thanks to CGI. Doing so, I can display a web page, on which a user can execute some actions (Python scripts).
To begin with, I wanted to control a LED connected to the GPIO of the Raspberry Pi, through a web page. Didn't work because you need to have root permissions to do so (from the Raspberry Pi itself, it's not complicated to do. But from a web page, that's another story). Found different solutions over the internet, but I've just found what I needed using WiringPi.
When I'm testing my code on the Raspberry Pi (using the command line : "python file.py"), it works perfectly. But on a web browser, well... I can't even access the page. The web browser keeps loading the page over and over and it's never ending. What can possibly slow down the whole thing like that ? The script isn't that big, after all.
Does anybody have an idea on how to solve it ? And talking about what I want to do, does anybody have a better suggestion than using CGI (Django maybe) ?
Anyway, thanks for reading it through and thanks for the help by advance !