DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-12-16 22:01:24

pwvandeursen
Member
Registered: 2007-07-04
Posts: 112

can not load web pages

All I need some help.
i am able to telnet to my device, and access all my files through windows explorer on the dns.
I am however not able to access my webpage through a browser...

strange thing is the following:

~/HD_a2/fun_plug.d/start # ./lighttpd.sh
Starting lighttpd...
~/HD_a2/fun_plug.d/start # killall lighttpd
killall: lighttpd: no process killed

it is running, but cannot be killed? also the netstat indicated no listning on port 3000,which is configured in the config file..

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:515             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:23              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN
~/HD_a2/fun_plug.d/start #


Wat should I do?

Thanks for any help

Offline

 

#2 2007-12-16 22:59:51

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: can not load web pages

After starting ./lighttpd.sh do you see the 'lighttpd' daemon in the process list?

Use the 'ps' command to see the process list:

Code:

# ps

DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

#3 2007-12-17 10:51:54

pwvandeursen
Member
Registered: 2007-07-04
Posts: 112

Re: can not load web pages

/ # ps
PID   USER     COMMAND
    1 root     init
    2 root     [ksoftirqd/0]
    3 root     [events/0]
    4 root     [khelper]
    5 root     [kthread]
   11 root     [kblockd/0]
   14 root     [khubd]
   50 root     [pdflush]
   51 root     [pdflush]
   53 root     [aio/0]
   52 root     [kswapd0]
  190 root     [scsi_eh_0]
  191 root     [scsi_eh_1]
  192 root     [scsi_eh_2]
  193 root     [scsi_eh_3]
  204 root     [mtdblockd]
  219 root     [kcryptd/0]
  220 root     [kmirrord/0]
  248 root     [loop0]
1255 root     atd
1258 root     smbd -D
1260 root     nmbd -D
1290 root     crond
1853 root     chkbutton
1877 root     fancontrol
1901 root     op_server 3 3 3
1905 root     -sh
1929 root     /web/webs
1969 root     lpd Waiting
2023 root     ftpd: accepting connections on port 21
2076 root     /mnt/HD_a2/fun_plug.d/bin/telnetd -l /mnt/HD_a2/fun_plug.d/bin/s
3725 pwvandeu smbd -D
3729 root     /mnt/HD_a2/fun_plug.d/bin/sh
3730 root     ps

guess not?

Offline

 

#4 2007-12-17 11:43:21

bgoedel
Member
From: Vienna, Austria
Registered: 2007-11-24
Posts: 62

Re: can not load web pages

Hi pw,

most likely your lighttp is not configured properly and thus the start of the service fails. I think, if you try to start lighttp as a service (using fun_plug.d/start/lighttp.sh start) the output is redirected to /dev/nul and so you can't see it.

You could try to start lighttpd directly, probably there is a -v (verbose) option so that you have more output: fun_plug.d/bin/lighttpd -v

If you've identified the cause of the failure, you can remove it by editing fun_plug.d/etc/lighttpd.conf.


If you've configured lighttpd to listen to port 80, the problem is that there is already another service listening on this port (the built-in go ahead webserver of the device). Configure lighttpd to listen to a different port (e.g. 81) by editing the appropriate line in fun_plug.d/etc/lighttpd.conf

Bernhard

Offline

 

#5 2007-12-17 11:47:01

pwvandeursen
Member
Registered: 2007-07-04
Posts: 112

Re: can not load web pages

thanks for the reply. I'll have to read through it a couple of time to ensure I understand and am able to perform the actions, but in the mean time,
lighttpd is configured to port 3000 and not 80, so there shouldn't be a conflict. also it doesn't come up on the netstat list so it is definetly not running...

just to be clear it has been working for months without problems, but maybe I changed something on the conf file, so I'll have to check that again

Patrick

Last edited by pwvandeursen (2007-12-17 11:48:56)

Offline

 

#6 2007-12-17 11:54:11

pwvandeursen
Member
Registered: 2007-07-04
Posts: 112

Re: can not load web pages

ok, so the conf file had an issue. I uncommented the following, and then it worked again. What is wrong here?


## php support
## uncomment the following lines and the mod_fastcgi module above
fastcgi.server = ( ".php" => ((
    "bin-path"  => "/mnt/HD_a2/fun_plug.d/bin/php-cgi",
    "socket"    => "/tmp/php-cgi.socket",
    "max-procs" => 2
)))

Offline

 

#7 2007-12-17 14:12:04

bgoedel
Member
From: Vienna, Austria
Registered: 2007-11-24
Posts: 62

Re: can not load web pages

Hi Patrick,

check whether the file fun_plug.d/bin/php-cgi does exist on your device and whether it has execute privileges. If it doesn't you need to install the package http://www.inreto.de/dns323/fun-plug/0.3/php-5.2.4.tgz

Bernhard

Offline

 

#8 2007-12-17 15:11:58

pwvandeursen
Member
Registered: 2007-07-04
Posts: 112

Re: can not load web pages

Bgoedel,

php-cgi does exist and it is in the correct dir. How do I check which priviliges it has?
thanks

Offline

 

#9 2007-12-17 15:54:28

bgoedel
Member
From: Vienna, Austria
Registered: 2007-11-24
Posts: 62

Re: can not load web pages

List the files in the directory using the command 'ls -la'. You'll see a column containing dashes or the characters 'r', 'w' and 'x' where the first rwx group stand for the file owner's permissions, the 2nd rwx group for the users group permission and the 3rd rwx group for other users. Depending under which user your lighttpd runs, it needs the x in the proper rwx group.

The permission setting -rw-r--r-- is not sufficient. Do a 'chmod a+x cgi-bin', then you'll have a -rwxr-xr-x.



BTW, did you enable the mod_fastcgi in the lighttp.conf?

Bernhard

Offline

 

#10 2007-12-17 16:42:12

pwvandeursen
Member
Registered: 2007-07-04
Posts: 112

Re: can not load web pages

-rwxrwxrwx    1      2799872 Jul 29 17:58 php
-rwxrwxrwx    1      2808412 Jul 29 17:58 php-cgi
-rwxrwxrwx    1      1057 Jul 29 17:58 php-config
-rwxrwxrwx    1      4187 Jul 29 17:58 phpize

Looks like every body has access right? Thus privileges are set that it should work....

It is now no longer uncommented, because that gave problems.

I have the following in the conf file:



"mod_fastcgi",


## php support
## uncomment the following lines and the mod_fastcgi module above
#fastcgi.server = ( ".php" => ((
#    "bin-path"  => "/mnt/HD_a2/fun_plug.d/bin/php-cgi",
#    "socket"    => "/tmp/php-cgi.socket",
#    "max-procs" => 2
#)))

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

#### fastcgi module
## read fastcgi.txt for more info
## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
#fastcgi.server             = ( ".php" =>
#                               ( "localhost" =>
#                                 (
#                                   "socket" => "/tmp/php-fastcgi.socket",
#                                   "bin-path" => "/usr/local/bin/php"
#                                 )
#                               )
#                             )

the PHP support part is #-ed again, because it gave problems, but I don't know why.

This is all I have in the conf file with respect to php.

thanks again for working with me on this one....

Last edited by pwvandeursen (2007-12-17 16:55:56)

Offline

 

#11 2007-12-17 16:50:49

bgoedel
Member
From: Vienna, Austria
Registered: 2007-11-24
Posts: 62

Re: can not load web pages

pwvandeursen wrote:

## php support
## uncomment the following lines and the mod_fastcgi module above

As mentioned above - did you uncomment the 'mod_fastcgi'?

Bernhard

Offline

 

#12 2007-12-17 17:08:01

pwvandeursen
Member
Registered: 2007-07-04
Posts: 112

Re: can not load web pages

yes I did.

this is in my conf file:

"mod_fastcgi",


## php support
## uncomment the following lines and the mod_fastcgi module above
#fastcgi.server = ( ".php" => ((
#    "bin-path"  => "/mnt/HD_a2/fun_plug.d/bin/php-cgi",
#    "socket"    => "/tmp/php-cgi.socket",
#    "max-procs" => 2
#)))

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

#### fastcgi module
## read fastcgi.txt for more info
## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
#fastcgi.server             = ( ".php" =>
#                               ( "localhost" =>
#                                 (
#                                   "socket" => "/tmp/php-fastcgi.socket",
#                                   "bin-path" => "/usr/local/bin/php"
#                                 )
#                               )
#                             )

the PHP support part is #-ed again, because it gave problems, but I don't know why.

This is all I have in the conf file with respect to php.

Offline

 

#13 2007-12-17 21:15:19

bgoedel
Member
From: Vienna, Austria
Registered: 2007-11-24
Posts: 62

Re: can not load web pages

Patrick,

according to fonz' README.TXT (http://www.inreto.de/dns323/fun-plug/0.3/README.txt) of fun-plug 0.3 there is a lighttpd.conf-with-php-sample included in the lighttp package (of 0.3). Try this one if you still want to have php support enabled. It worked for me.

Bernhard

Offline

 

#14 2007-12-17 22:11:03

pwvandeursen
Member
Registered: 2007-07-04
Posts: 112

Re: can not load web pages

That is also the one I used......

It worked before also with php support, but for some reason php stopped working.
At least lighttpd is working again, unfortunately php not yet.

is there anything wrong with the conf file as mentioned here above?

Offline

 

#15 2007-12-21 15:30:51

pwvandeursen
Member
Registered: 2007-07-04
Posts: 112

Re: can not load web pages

in the conf file I see this line :

    "socket"    => "/tmp/php-cgi.socket",

but my tmp folder is empty....is that correct?

Offline

 

#16 2007-12-21 22:42:50

pwvandeursen
Member
Registered: 2007-07-04
Posts: 112

Re: can not load web pages

if I leave the following commented, the webserver works (but php obviously not)

## php support
## uncomment the following lines and the mod_fastcgi module above
#fastcgi.server = ( ".php" => ((
#    "bin-path"  => "/mnt/HD_a2/fun_plug.d/bin/php-cgi",
#    "socket"    => "/tmp/php-cgi.socket",
#    "max-procs" => 2
#)))

When I uncomment (and also the "mod_fastcgi" line ) it the webserver no longer works, and also PHP doesn΄t....

Does anybody know what could be wrong?

Offline

 

#17 2007-12-22 01:04:58

MiK
Member
From: Sweden
Registered: 2006-12-17
Posts: 102

Re: can not load web pages

You haven't by any chance updated the DNS firmware since it was working before, have you?

Offline

 

#18 2007-12-22 01:12:24

pwvandeursen
Member
Registered: 2007-07-04
Posts: 112

Re: can not load web pages

No. I am still running 1.03, and have been for the last couple of months..

Offline

 

#19 2007-12-23 12:35:13

pwvandeursen
Member
Registered: 2007-07-04
Posts: 112

Re: can not load web pages

OK I solved it.....

Apparently, due to some copying error, I copied incorrect php files to the bin dir... (PHP, PHP-conf, php-cgi, phpize)

I dont know why, but after replacing them with the original files from Fonz al is working again!

issue closed

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB