Yes it should. It works for me that way. Consult the lighttpd manual else.
Tips for others, if you do not frequently use php, consider installing it as a cgi instead of fcgi.
# /opt/bin/lighttpd/bin/lighttpd
# /opt/lib/php5/bin/php5: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory
2007-07-25 12:27:22: (mod_fastcgi.c.1048) the fastcgi-backend /opt/bin/php failed to start:
2007-07-25 12:27:22: (mod_fastcgi.c.1052) child exited with status 127 /opt/bin/php
2007-07-25 12:27:22: (mod_fastcgi.c.1055) if you try do run PHP as FastCGI backend make sure you use the FastCGI enabled version.
You can find out if it is the right one by executing 'php -v' and it should display '(cgi-fcgi)' in the output, NOT (cgi) NOR (cli)
For more information check http://www.lighttpd.net/documentation/fastcgi.html#preparing-php-as-a-fastcgi-program
2007-07-25 12:27:22: (mod_fastcgi.c.1060) If this is PHP on Gentoo add fastcgi to the USE flags
2007-07-25 12:27:22: (mod_fastcgi.c.1356) [ERROR]: spawning fcgi failed.
2007-07-25 12:27:22: (server.c.834) Configuration of plugins failed. Going down.
# cat /opt/bin/lighttpd/lighttpd.conf
server.document-root = "/opt/bin/lighttpd/var/wwwroot"
server.port = 8080
server.pid-file = "/opt/bin/lighttpd/.pid"
mimetype.assign = (
".html" => "text/html",
".txt" => "text/plain",
".jpg" => "image/jpeg",
".png" => "image/png"
)
dir-listing.activate = "enable"
static-file.exclude-extensions = ( ".php" )
index-file.names = ( "index.html", "index.php" )
server.modules = ("mod_fastcgi", )
fastcgi.server = (
".php" => ((
"bin-path" => "/opt/bin/php",
"socket" => "/opt/bin/lighttpd/php.socket",
"max-procs" => 2,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "32"
),
"bin-copy-environment" => ( "PATH", "SHELL", "USER"),
"broken-scriptfilename" => "enable"
))
)
Hans wrote:I want to run Python on the MSS. Possible?
Bartek wrote:Hello,
I was able to install lighttpd and libxml2 but everytime I try to install php5 Maxtor hangs.
Only thing I can do is to ping the box and hard reset (unplug the power).
I have atm web server running.
EDIT:
I was able to install php. I'm lame when it comes to linux and I got problem with running php:
- Code: Select all
# /opt/bin/lighttpd/bin/lighttpd
# /opt/lib/php5/bin/php5: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory
2007-07-25 12:27:22: (mod_fastcgi.c.1048) the fastcgi-backend /opt/bin/php failed to start:
2007-07-25 12:27:22: (mod_fastcgi.c.1052) child exited with status 127 /opt/bin/php
2007-07-25 12:27:22: (mod_fastcgi.c.1055) if you try do run PHP as FastCGI backend make sure you use the FastCGI enabled version.
You can find out if it is the right one by executing 'php -v' and it should display '(cgi-fcgi)' in the output, NOT (cgi) NOR (cli)
For more information check http://www.lighttpd.net/documentation/fastcgi.html#preparing-php-as-a-fastcgi-program
2007-07-25 12:27:22: (mod_fastcgi.c.1060) If this is PHP on Gentoo add fastcgi to the USE flags
2007-07-25 12:27:22: (mod_fastcgi.c.1356) [ERROR]: spawning fcgi failed.
2007-07-25 12:27:22: (server.c.834) Configuration of plugins failed. Going down.
Sometime it's starts:
html pages are working, php not.
This is my config, is it right?:
- Code: Select all
# cat /opt/bin/lighttpd/lighttpd.conf
server.document-root = "/opt/bin/lighttpd/var/wwwroot"
server.port = 8080
server.pid-file = "/opt/bin/lighttpd/.pid"
mimetype.assign = (
".html" => "text/html",
".txt" => "text/plain",
".jpg" => "image/jpeg",
".png" => "image/png"
)
dir-listing.activate = "enable"
static-file.exclude-extensions = ( ".php" )
index-file.names = ( "index.html", "index.php" )
server.modules = ("mod_fastcgi", )
fastcgi.server = (
".php" => ((
"bin-path" => "/opt/bin/php",
"socket" => "/opt/bin/lighttpd/php.socket",
"max-procs" => 2,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "32"
),
"bin-copy-environment" => ( "PATH", "SHELL", "USER"),
"broken-scriptfilename" => "enable"
))
)
Any1 could please help me, I need php badly.
Bryan wrote:Did you also install libc6 that I mentioned? And if you start /opt/bin/lighttpd/bin/lighttpd maunally? Does that work?
Iris wrote:Hi Bryan,
The phpinfo file I created reports my timezone as UTC. I created and edited a php.ini file to reflect my correct timezone but it isn't recognized. Is a reference to where the php.ini is located required or something? I created it in /opt/etc/ - that's the location reported here and by my phpinfo. Could you help?
Iris
cat >> /opt/etc/ipkg.conf
src bryan http://ipkg.openmss.org/bryan
{Press: ctrl+d}ipkg updateipkg install libc6ipkg install lighttpdserver.document-root = "/shares/mss-hdd/www"
server.port = 8080
server.pid-file = "/opt/bin/lighttpd/.pid"
mimetype.assign = (
".html" => "text/html",
".txt" => "text/plain",
".jpg" => "image/jpeg",
".png" => "image/png"
)
index-file.names = ( "index.html" ,"index.php" )
dir-listing.activate = "enable"
static-file.exclude-extensions = ( ".php" )
server.modules = (
"mod_fastcgi",
"mod_auth",
"mod_accesslog" )
fastcgi.server = (
".php" => ((
"bin-path" => "/opt/bin/php -c /opt/etc/php.ini",
"socket" => "/opt/bin/lighttpd/php.socket",
"max-procs" => 2,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "32"
),
"bin-copy-environment" => ( "PATH", "SHELL", "USER"),
"broken-scriptfilename" => "enable"
))
)
#### accesslog module
accesslog.filename = "/shares/mss-hdd/__opt/var/log/access.log"
## debugging
# 0 for off, 1 for 'auth-ok' messages, 2 for verbose debugging
auth.debug = 0
## type of backend
# plain, htpasswd, ldap or htdigest
auth.backend = "htpasswd"
## for htpasswd - user-file (user_name:hash - created by htpasswd)
auth.backend.htpasswd.userfile = "/opt/bin/lighttpd/lighttpd-htpasswd.user"
auth.require = ( "/" =>
(
# method must be either basic or digest
"method" => "basic",
"realm" => "what ever you want",
"require" => "user=xxx|user=yyy|user=yyy"
)
)
register_globals=onipkg install libxml2
ipkg install php5
ipkg install mysqlcat > /opt/bin/lighttpd/var/wwwroot/phpinfo.php
<?php phpinfo(); ?>
{Press: ctrl+d}Users browsing this forum: No registered users and 2 guests