Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 56

Thread: running php on wl500g

  1. #31
    This version is working fully on my box. Most of the script is using system command. If some are unavailable, it won't be able to run. Do you have any specific firmware?

  2. #32
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,308
    Oh, yes, I forgot: 1.8.1.7 CR3. I'm not running from rootfs. I did see Oleg upped 1.9.2.7 CR3b on which I was waiting, so I'll be happy to upgrade.

  3. #33
    It has been tested on the latest Oleg firmware, so yes it should work.

  4. #34
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,308
    Still no luck

    Here's what I've done so far:
    - Upgraded to latest custom firmware 1.9.2.7 CR3b from Oleg (ofcourse )
    - Created an ext3 partition on my HDD, initialized it and mounted it on /tmp/extra:
    Code:
    mkdir /tmp/extra
    mount -o rw /dev/scsi/host0/bus0/target0/lun0/part5 /tmp/extra
    - Then I've copied the first build from erik_bies (the one with the subdirectories) to the ext3 partition and updated the thttpd program with the latest build with PHP4 support.
    - I changed the rights of several directories:
    Code:
    drw-r--r--    2 admin    nobody       1024 Jan 15 15:23 etc
    drwx------    2 admin    root        12288 Jan 15 00:26 lost+found
    drw-r--r--    3 admin    nobody       1024 Jan 15 15:23 man
    drw-r--r--    2 admin    nobody       1024 Jan 15 15:23 sbin
    drwxr-xr-x    4 admin    nobody       1024 Jan 15 15:23 www
    I've noticed that the /www directory needs execute priviledges, otherwise the webserver will report an '500 - internal server error'.

    - I copied phpsysinfo-dev into the /www directory and also into the /www/cgi-bin directory.
    Code:
    drwxr-xr-x    3 admin    nobody       1024 Jan 15 15:28 cgi-bin
    -rw-r--r--    1 admin    nobody        323 Jan  4 00:30 index.html
    drwxr-xr-x    5 admin    nobody       1024 Jan 15 15:42 phpsysinfo-dev
    - I've renamed the config.php.new to config.php

    When I request the index.html page it says:
    Code:
    If you see this you are sucessfully running thttpd on wl500x
    When I request the phpsysinfo page (http://wl500g:81/phpsysinfo-dev) it says:
    Code:
    Error: Linux is not currently supported
    Also when I request the same page from cgi-bin (http://wl500g:81/cgi-bin/phpsysinfo-dev) it says the same as above.

    I've also written a test php script which I placed into the /www and the /www/cgi-bin folder, and in both cases the script worked perfect (Hello World).

    My conclusion so far is: PHP is running fine, I only need some extra stuff for phpsysinfo. Any ideas what might cause the phpsysinfo to report the error?

  5. #35
    Styno:
    I had the same problem with phpsysinfo that it said that Linux was not supported.
    The problem was that phpsysinfo looks for a file called class.Linux.inc.php in sysinfo/includes/os/
    I had that file but with a lowercase L in the word class.Linux.inc.php.
    Moved the file with
    Code:
    mv class.linux.inc.php class.Linux.inc.php
    and it worked fine after that.
    Hope this will work for you too.

  6. #36
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,308
    Quote Originally Posted by Jaap
    The problem was that phpsysinfo looks for a file called class.Linux.inc.php in sysinfo/includes/os/
    I had that file but with a lowercase L in the word class.Linux.inc.php.
    Yep, that was my problem too, among with some other files who were also lowercase. It's because I copied the files through a SAMBA share (which converts every file/dir to lowercase) that I had this problem.

    So to everyone: Do not unpack the files to a SAMBA share, because it will break the website.

    Thanks Jaap!

  7. #37
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Starting with 1.9.2.7-3 samba preserves file case (i.e. required options are set in the config file).

  8. #38

    mmap v thttpd

    FYI
    By default thttpd is trying to load whole page to memory before sending it to client. This means that kernel will kill it, when somebody wants to download any huge file from your web.
    But it can be changed! Look for following lines in configure script:
    > if test "$cross_compiling" = yes; then
    > ac_cv_func_mmap_fixed_mapped=no
    WL500g CAN do mmap, so you can set ac_cv_func_mmap_fixed_mapped to yes.
    Then thttpd only memory-maps file and big files are served without impact on free memory.
    Friend compiled it for me, but without PHP.

  9. #39
    where does it go wrong with me ??
    When i install the thttpd with php is works great on *.html and *.php
    After rebooting my wl500g
    and start the ./thttpd -C ../etc/thttpd.conf -c /cgi-bin/* again
    i get this on *.html

    403 Forbidden
    The requested URL '/' resolves to a file which is marked executable but is not a CGI file; retrieving it is forbidden.

    *.php still works fine.

  10. #40
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,308
    You will have to do a chmod -x on all html files. Also the filesystem needs to be ext2 or ext3 (on FAT filesystems all files have execute rights).

  11. #41
    ok thank you styno
    chmod is no probleem
    only thing is that i have only windows xp running and can't format too ext2 or ext3.
    Is it possible to format it on the wl500g itself ?

    thanks too all

  12. #42
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,308
    Yes, the newer firmwares from Oleg allow you to format ext2 and ext3 partitions. Don't know if there is a tool present to create those partitions though, but you can use Ranish partition manager (freeware) for that.

    Check this thread: http://wl500g.info/showthread.php?t=1518

  13. #43
    Join Date
    Dec 2003
    Location
    Czech Republic
    Posts
    270
    Quote Originally Posted by Styno
    Yes, the newer firmwares from Oleg allow you to format ext2 and ext3 partitions. Don't know if there is a tool present to create those partitions though, but you can use Ranish partition manager (freeware) for that.

    Check this thread: http://wl500g.info/showthread.php?t=1518
    In recent Oleg's firmwares is FDISK applet present (as part of Busybox) so you don't need any external application.

  14. #44

    Pb execute some file

    Hello,
    Hello i have some problem to acces some file with this web server.For exemple if i try to see a jpg or gif file i obtain an error witch say 403 Forbiden this file is executable but not containing a CGI scipt.
    I have made all the file executable.

    ThX

  15. #45
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,308
    Quote Originally Posted by Rom666
    Hello,
    Hello i have some problem to acces some file with this web server.For exemple if i try to see a jpg or gif file i obtain an error witch say 403 Forbiden this file is executable but not containing a CGI scipt.
    I have made all the file executable.

    ThX
    Chmod -x the .jpg file.

Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Running Giftd on wl500g
    By DeF in forum WL-500g/WL-500gx Tutorials
    Replies: 77
    Last Post: 17-04-2006, 12:57
  2. samba, ftp, I can`t get it running. PL Help!
    By atomilein in forum WL-500g Q&A
    Replies: 0
    Last Post: 23-04-2005, 08:51
  3. Samba running
    By erik_bies in forum WL-500g Custom Development
    Replies: 48
    Last Post: 23-01-2005, 20:16
  4. running a second webserver
    By ronin in forum WL-500g Q&A
    Replies: 25
    Last Post: 23-08-2004, 04:19

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •