macsat.com OpenWrt and ASUS WL Forum
January 08, 2009, 19:08:41 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
News: Back to macsat.com
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Trouble with lighttpd and php  (Read 2067 times)
0 Members and 1 Guest are viewing this topic.
Jonas
Newbie
*
Offline Offline

Posts: 4


View Profile
« on: February 03, 2007, 00:55:52 AM »

My router is WL-500gP.

mod_status, cgi & vhost are enabled, and the port is changed to 81.

When I access 192.168.1.1:81 I expect to get the webif. But it is not beeing parsed. It just output the code to the browser like:
Code:
#!/usr/bin/webif-page
<?
. /usr/lib/webif/webif.sh
#
# This page is synchronized between kamikaze and WR branches. Changes to it *must*
# be followed by running the webif-sync.sh script.
#
# TODO: This page looks ugly anymore (rendered).
#
header "Info" "System" "<img src=/images/blkbox.jpg align="absmiddle">@TR<<System Information>>" '' ''

SHOW_BANNER=0 # set to show /etc/banner



The following modues are installed:
Code:
Uninstall lighttpd 1.4.11-2 a flexible and lightweight web server, 
Uninstall lighttpd-mod-cgi 1.4.11-2 a CGI module for lighttpd 
Uninstall lighttpd-mod-simple-vhost 1.4.11-2 a simple virtual hosting module for lighttpd 
Uninstall lighttpd-mod-status 1.4.11-2 a server status display module for lighttpd

Uninstall php5 5.0.5-1 PHP5 Hypertext preprocessor 
Uninstall php5-fastcgi 5.0.5-1 PHP5 Hypertext preprocessor (FastCGI) 
Uninstall php5-mod-mysql 5.0.5-1 MySQL module



Logged
Jonas
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #1 on: February 03, 2007, 01:22:38 AM »

Ok I got webif working
cgi.assign = ( ".php" => "/bin/php", ".sh" => "" ) did the trick.

But php is not working. When requesting a php file following error is given:

2007-02-03 01:18:39: (mod_cgi.c.703) stat for cgi-handler /bin/php failed: No such file or directory
Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #2 on: February 03, 2007, 08:29:17 AM »


You installed the fastcgi binary of php, not the cgi.

The fastcgi needs a differe t configuration.

Logged
Termi
Newbie
*
Offline Offline

Posts: 5


View Profile
« Reply #3 on: February 04, 2007, 22:51:12 PM »

Hi!

I have also a problem with php. My error.log says :'/opt1/usr/bin/php: can't load library 'libz.so.1'

Have you any ideas??

thanks
Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #4 on: February 05, 2007, 09:18:37 AM »


Seems like you are missing this package:
Code:
ipkg install zlib
Logged
Termi
Newbie
*
Offline Offline

Posts: 5


View Profile
« Reply #5 on: February 05, 2007, 22:50:45 PM »

yes, you are right. The solution was for me:
ipkg remove -force-depends zlib (remove zlib package from opt)
ipkg -d opt1 install zlib
because our web server is installed to opt1 (instead of opt)

thanks a lot
Logged
Jonas
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #6 on: February 08, 2007, 12:34:28 PM »

I still have trouble

Code:
2007-02-08 12:31:40: (mod_cgi.c.703) stat for cgi-handler /bin/php failed: No such file or directory

I tried to install the php5-cgi but I still get the error.

Code:
root@OpenWrt:/etc/init.d# ipkg install php5-cgi
Package php5-cgi (5.0.5-1) installed in root is up to date.
Nothing to be done
Successfully terminated.

Also when running webif I get the error:
Code:
/bin/sh: nvram: not found

Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

English Steel 1.6 © Saxon North Technologies
Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.738 seconds with 24 queries.