maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   lighttpd question (PHP) (https://talk.maemo.org/showthread.php?t=47001)

Z0ck3rOO7 2010-03-10 12:50

lighttpd question (PHP)
 
Hey there, i just wanted to set on a small html/php webserver on my n900, so i can edit/watch php/hmtl files everywhere.
I installed lighttpd and it works great for html files, but if i put a index.php file in wwwPHP, i just get a "500 - Internal Server Error" in my browser..i heard that i need a php-cgi, but i never found it (google and this forum..)
What do i need to "run" php files and where can i find it?
I hope someone can help me :/

naabi 2010-03-10 12:55

Re: lighttpd question (PHP)
 
You need e.g. mod_fastcgi.

http://redmine.lighttpd.net/wiki/1/T...LighttpdAndPHP

No idea whether any one has tried to compile it for Maemo5.

Z0ck3rOO7 2010-03-10 13:48

Re: lighttpd question (PHP)
 
so nobody have installed a php webserver on his n900 yet? :/
could any "bored" programmer port the fastcgi module please? :x

Z0ck3rOO7 2010-03-15 07:21

Re: lighttpd question (PHP)
 
lets try a push :/

Simply_Texan 2010-06-27 20:15

Re: lighttpd question (PHP)
 
I have successfully installed php, apache and mysql in easy debian. I would prefer to use lighttpd and sqlite and php directly from maemo. Hopefully, we can get php installed outside of easy debian. Any updates?

S.Korean 2012-05-17 09:01

Re: lighttpd question (PHP)
 
1 Attachment(s)
I installed PHP (cgi/cli/sqlite/libcURL) with lighthttpd and also received the same issues. I fixed them with a few changes.

I uninstalled the broken(?) sqlite and libcURL modules. I'll mess with them later.

Create a directory with the proper permissions:

$mkdir /home/user/public_html
$chmod 644 /home/user/public_html

I had to edit /etc/lighttpd.conf as root:

Change this line to your newly created directory:

server.document-root = "/home/user/public_html/"

Change the CGI line to:

cgi.assign = ( ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl", ".php" => "/usr/bin/php" )

Then stop/start the daemon:

#/etc/init.d/lighttpd stop
#/etc/init.d/lighttpd start

Then I uninstalled the PHP modules throwing errors (sqlite and libcURL) and deleted the .ini files inside of /etc/php5/conf.d

I then created a simple Hello World sorta PHP file in my public_html/ and it worked.


All times are GMT. The time now is 20:59.

vBulletin® Version 3.8.8