From: Peter L. <pl...@gm...> - 2007-08-13 15:38:07
|
Hi, I editted the obvious items and commented out the lines that caused the obscure error: $HTTP["url"] =~ "\.pdf$" { server.range-requests = "disable" } This seems to disable reading of .pdf files and should be benign. Don't know why lighttpd blow up on this. I have no idea what to set to have lighttpd use cgi to invoke php processing. I uncommented the mod_cgi line but don't see where the cgi-bin directory is specified in the .conf file. Right now, .html files seem to process correctly but .php files result in "403 - Fobidden." Thanks for cluing me in. On 8/13/07, Brad House <br...@ma...> wrote: > > You need to configure the /etc/lighttpd.conf file itself. > The reason it is not starting is because you haven't edited > that file. It doesn't come with a config file which you > do not have to modify. You need to configure things like the > location of log files, your web directory location, etc. > > -Brad > > Peter Lu wrote: > > Hi, > > > > In trying to start lighttpd, the S99lighttpd script is not quite > > right. In start(), > > it has: > > > > start-stop-daemon --start --quiet --make-pidfile --pidfile > > /var/run/lighttpd.pid -b \ > > --exec /usr/sbin/lighttpd -- -f /etc/lighttpd.conf -D > > > > But lighttpd shows that these are the allowable options: > > > > # /usr/sbin/lighttpd > > --help > > /usr/sbin/lighttpd: invalid option -- > > - > > lighttpd-1.4.16 (ssl) (Aug 10 2007 17:03:01) - a light and fast > > webserver > > usage: > > > > -f <name> filename of the > > config-file > > -m <name> module directory (default: > > /usr/lib) > > -p print the parsed config-file in internal form, and > > exit > > -t test the config-file, and > > exit > > -D don't go to background (default: go to > > background) > > -v show > > version > > -V show compile-time > > features > > -h show this > > help > > > > and so lighttpd doesn't kick off. > > > > I tried manually running lighttpd, but it complains: > > > > # /usr/sbin/lighttpd -f > > /etc/lighttpd.conf > > can't handle '$HTTP[url] =~ ...' as you compiled without pcre > > support. > > (perhaps just a missing pcre-devel package > > ?) > > 1969-12-31 16:23:13: (configfile.c.853 ) source: /etc/lighttpd.conf > > line: 126 pos > > : 3 parser failed somehow near here: > > { > > > > > > which seems to indicate that the .conf file is no good. > > > > Could someone tell me what to fix? I believe I'm just using the default > > Gumstix set-up. > > > > Thanks for help. > > > > > > > > > > > > On 8/10/07, *Peter Lu* <pl...@gm... <mailto:pl...@gm...>> > wrote: > > > > The WebFileBrowser PHP code may be old but it works and does exactly > > what I need... for free. I think there's a security hole though > > with PHP > > CGI redirection. > > > > I've fixed my problem. Allowable PHP syntax (or probably > > implementation) > > has changed so that: > > > > while (list($a, $b) = each($list_a_b)) { > > ... > > } > > > > causes seg faults and must be recoded as > > > > while($c = each($list_a_b)) { > > $a = $c[0]; > > $b = $c[1]; > > ... > > } > > > > Running php in syntax check mode ("php-cgi -l file.php") doesn't > cause > > complaints, so the seg fault is a run-time bug, I believe. I > > believe PHP > > should teminate gracefully had the syntax change been intentional. > > > > Looks like BOA is still unhappy about having PHP underneath it, > issuing > > the "502 Bad Gateway... The CGI was not CGI/1.1 compliant" error, > even > > though the PHP output is legit (same as that on x86 Ubuntu PC). I'm > > assuming that the up-to-date PHP is claiming to be some CGI version > > more recent than what the outdated BOA can handle. > > > > My next step is to convert to using Lighttpd as suggested. > > > > > > > > > > On 8/9/07, *Brad House* <br...@ma... > > <mailto:br...@ma...>> wrote: > > > > > # echo "<? phpinfo(); ?>" | php | grep "Configure" > > > Configure Command => './configure' '--target=arm-linux' > > > '--host=arm-linux' '--build=i386-pc-linux-gnu' > '--prefix=/usr' > > > '--exec-prefix=/' '--bindir=/usr/bin' '--sbindir=/usr/sbin' > > > '--libexecdir=/usr/lib' '--sysconfdir=/etc' > > '--datadir=/usr/share/misc' > > > '--localstatedir=/var' '--mandir=/usr/man' > '--infodir=/usr/info' > > > '--disable-all' '--enable-spl' '--enable-session' > > '--enable-sockets' > > > '--with-pcre-regex' '--without-pear' '--disable-nls' > > > > > > '--with-openssl=/home/plu/gumstix.1491/build_arm_nofpu/staging_dir' > > > '--enable-cli' '--enable-cgi' > > > > '--with-zlib=/home/plu/gumstix.1491/build_arm_nofpu/staging_dir' > > > > > > > > > You can pick up the WebFileFolder .php from here: > > > > > > > > > http://sourceforge.net/project/showfiles.php?group_id=47688&release_id=164800 > > < > http://sourceforge.net/project/showfiles.php?group_id=47688&release_id=164800 > > > > > < > > > http://sourceforge.net/project/showfiles.php?group_id=47688&release_id=164800 > > < > http://sourceforge.net/project/showfiles.php?group_id=47688&release_id=164800 > >> > > > > > > I'm trying to compile the 5.2.2 version on PHP and its build > > scripts are > > > all messed > > > up. So, it'll take some time for me to get an alternate > set-up. > > > > > > Thanks for all the help. > > > > Wow, yeah, that's old ... > > > > I see things in there like posix_getpwuid(), you might need to > > add some more > > flags when you compile php to gain the full support needed ... > > I'll see if I can give it a test sometime... > > > > -Brad > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a > > browser. > > Download your FREE copy of Splunk now >> > http://get.splunk.com/ > > _______________________________________________ > > gumstix-users mailing list > > gum...@li... > > <mailto:gum...@li...> > > https://lists.sourceforge.net/lists/listinfo/gumstix-users > > <https://lists.sourceforge.net/lists/listinfo/gumstix-users> > > > > > > > > > > ------------------------------------------------------------------------ > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > gumstix-users mailing list > > gum...@li... > > https://lists.sourceforge.net/lists/listinfo/gumstix-users > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > |