maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   lighttpd + php on N900 for a dummie [Solved] (https://talk.maemo.org/showthread.php?t=62575)

bblue 2010-09-19 21:33

lighttpd + php on N900 for a dummie [Solved]
 
Hi,
can someone write a little how to config lighttpd + php on N900
many thanks.

Ok,
I found myself that solution:
After installed lighttpd and php5 from repositories I edited /etc/lighttpd.conf as below:

"mod_fastcgi", //activate this option in server.modules

add:

fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket",
"max-procs" => 1,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "8",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
),
"broken-scriptfilename" => "enable"
)))

change:

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

also I have added to /etc/php5/cgi/php.ini:
cgi.fix_pathinfo = 1

after that to start all I use as root the command:
lighttpd start -f /etc/lighttpd.conf

to check if all run well put a file info.php (in it just write: <?php phpinfo(); ?>) in wwwPHP fold and from browser type http://localhost/info.php

If it's ok, you can see a page with: PHP Verison 5.2.6-6maemo5
and all the configuration list for PHP.

As I asked to paai help about this problem, he replys me as below:

Quote:

Originally Posted by paai
Quote:

Originally Posted by bblue
Hi,
I'm trying to install lighttpd + php on my n900 but php isn't used by lighttpd, somethings is wrong; please can you tell me about or post/send me your configs so I can start all services and well connect to the server http:\\localhost

Many thanks in advance.
Luigi

The installaition mistakenly names some files , but I forgot which. I have made dynamic links as follows:

/usr/bin:
php-cgi5 -> php5-cgi

/etc/alternatives:
php -> /usr/bin/php5
lphp-cgi -> /usr/bin/php5-cgi

/usr/lib/cgi-bin:
php -> /etc/alternatives/php-cgi-bin

Let me know what happens,

Paai

Quote:

Originally Posted by paai
Hi, Luigi, glad you got it working. Strange, that we had to follow different paths.

why not post this complete conversation on the maemo-forum?

Paai

Hope all that can help someone :)

Luigi

bblue 2010-09-21 16:20

Re: lighttpd + php on N900 for a dummie [Solved]
 
I found these solutions.


All times are GMT. The time now is 03:22.

vBulletin® Version 3.8.8