I decided to try the database at port 80. I was unable to transfer files to /var/www due to permission issue. So I have to give access to the folder to user “pi” as follow:
sudo chown -R pi /var/www
The database works fine when i access it from port 80, but not for port 8080. CherryPy seems to have some issues with the php files.
Anyway, I could add new entry to the database table now.
Too much things to finish up.