Php or python

Hi, I want to be able to send/receive from the web. I also want to store data to a database. Since I am new to programming, I deciced to go with the most documented method: Apache, mySQL and Python. I had problem connecting the Arduino with the php (I use the php_serial.class.php) so I tried with Python and It works right away. I was finally able to work with the Php code, but Python seems more fitted for serial communication .

Here is an example of what I want to accomplish:

Temperature sensor connected to the Arduino that send data to a database, which I can display on a web page.

First scenario: Arduino to Php to mySQL to Php to Webpage.

Second scenario:Arduino to Python to mySQL to Php to Webpage.

Os: Linux Pc: Raspberry Pi

Should I do it another way? Bypassing python is probably a good idea ? I know a lot of people use lightpd as the web server(lightweight) but will it make that much of a difference?

To start up , I want to go with a easy method in order to learn the main thinking.

So far, I am able to light on and off an led from my localhost using Python, Apache2, php_serial_class.php and html .

Thank you

The first scenario uses less different technologies and that is always considered good design. During the lifetime of a project you need to track less updates. Furthermore the footprint of the installed SW is probably smaller.

There are many people that have made a working PHP-serial-Arduino connection. If you search the forum (upper right) you should be able to find some code. (I have no code sorry)

I like your remark calling the Raspberry PI a PC ;)