User avatar
simonthepiman
Posts: 43
Joined: Mon Jun 04, 2012 11:42 am
Location: Battle - Sussex
Contact: Website

Running a light web server with php on the Pi

Mon Jun 04, 2012 2:03 pm

I develop in LAMP(Linux Apache Mysql and PHP) for my sins - and i thought it would be nice to setup a test environment on my Raspberry Pi so click here for simple instructions http://www.simonthepiman.com/how_to_set ... upport.php I will be adding a mysql instructions later this week if i can get it going successfully :geek:
Simon

http://www.simonthepiman.com (Beginners guides)

HansH
Posts: 214
Joined: Mon Sep 05, 2011 7:49 am

Re: Running a light web server with php on the Pi

Mon Jun 04, 2012 4:28 pm

I was more thinking of thttpd and sqlite (both very light)
It should not make any difference for development what is behind it...
But I usually use perl instead of php with html::templates and dbi as database abstraction..

Nice website !

User avatar
simonthepiman
Posts: 43
Joined: Mon Jun 04, 2012 11:42 am
Location: Battle - Sussex
Contact: Website

Re: Running a light web server with php on the Pi

Mon Jun 04, 2012 5:15 pm

Thanks for the suggestions i will take a look at them as well, I use perl but am happier with php even from the command line
Simon

http://www.simonthepiman.com (Beginners guides)

trn
Posts: 46
Joined: Wed May 09, 2012 11:30 am

Re: Running a light web server with php on the Pi

Tue Jun 05, 2012 7:16 pm

raspbian

by default, apt-get install mysql-server (nothing change, work ok)

apt-get install php5-cli php5-common php5-fpm php5-cgi php5 php-pear php5-mcrypt php5-mysql php5-gd php-apc

apt-get install nginx (default)

all configure by default

now configure nginx to use php5-fpm to serve php file

this will use aroung 70M ram,

HansH
Posts: 214
Joined: Mon Sep 05, 2011 7:49 am

Re: Running a light web server with php on the Pi

Tue Jun 05, 2012 8:16 pm

trn wrote:raspbian
by default, apt-get install mysql-server (nothing change, work ok)
apt-get install nginx (default)
all configure by default
now configure nginx to use php5-fpm to serve php file
this will use aroung 70M ram,
That is why I said thttpd + sqlite < 1 M ( very light ) ;)
It just depends what you expect for load or response times....but perfect for development
so far I know nginx has also in his docs that you can use thttpd for the cgi processing.

yeah raspbian ...... great distro for the RPi
thank you mpthompson !

User avatar
simonthepiman
Posts: 43
Joined: Mon Jun 04, 2012 11:42 am
Location: Battle - Sussex
Contact: Website

Re: Running a light web server with php on the Pi

Tue Jun 05, 2012 8:20 pm

Nice options thanks guys
Simon

http://www.simonthepiman.com (Beginners guides)

HansH
Posts: 214
Joined: Mon Sep 05, 2011 7:49 am

Re: Running a light web server with php on the Pi

Tue Jun 05, 2012 8:27 pm

np, just have fun with your RPi !

kuantum
Posts: 6
Joined: Wed Jun 06, 2012 11:00 pm
Contact: Website

Re: Running a light web server with php on the Pi

Wed Jun 06, 2012 11:02 pm

There is my raspberry nginx + php server :) http://pi.erdur.org

Return to “Beginners”