Page 1 of 4 123 ... LastLast
Results 1 to 15 of 56

Thread: running php on wl500g

  1. #1

    running php on wl500g

    Guys,

    Can someone write a short introduction to help me get PHP running on my router. I'm not using the default httpd (just for admin gui) but I run busybox_httpd. Now i want to make it possible to run php.

    please help me out!

    RoNin
    amd2600 Ati 9700pro wl500g and lots more.....

  2. #2
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,306
    On the OpenWRT forum I found this:
    http://davidoffdotnet.net/openwrt/ipkg/

    There are the following packages which provide PHP for the Linksys WRT54g, so they might work on the WL-500g as well:
    Code:
    Package: lwhp
    Version: 1.0.0
    Section: net
    Architecture: mipsel
    Maintainer: sam <sam@davidoffdotnet.net>
    MD5Sum: 96bd50f8625f94f54e62255456b3a683
    Size: 143640
    Filename: lwhp_1.0.0_mipsel.ipk
    Source: http://davidoffdotnet.net/openwrt/ip...0.0_mipsel.ipk
    Description: a lightweight hypertext processor
    
    
    Package: thttpd-php
    Version: 2.21b-2
    Section: net
    Architecture: mipsel
    Maintainer: sam <sam@davidoffdotnet.net>
    MD5Sum: b0660a8072d3c9bfd42a26fccf7571c4
    Size: 402230
    Filename: thttpd-php_2.21b-2_mipsel.ipk
    Source: http://davidoffdotnet.net/openwrt/ip...b-2_mipsel.ipk
    Description: The thttpd webserver compiled with php4 support.
    The first seems to me a simple php library (I don't know what its features are).
    The second package contains a webserver.

    I hope this is helpful and, as allways, if it works for you please report back here

  3. #3
    Join Date
    Dec 2004
    Location
    Hungary
    Posts
    22
    I've tryed these packages, but after starting the php application died with 'Segmentation Fault' error. Can anybody write me how to make install these packages correctly? I'm newbie in LINUX :-(

    My configuration is: ASUS WL-500GX, Firmware 1.9.2.7 RC2 (OLEG)

    Please help me out.

    SC

    Packages: http://davidoffdotnet.net/openwrt/ipkg/

  4. #4
    Join Date
    Dec 2003
    Location
    Czech Republic
    Posts
    270
    You have to replace the current firmware by OpenWRT if you wish to use OpenWRT packages. Read at least this thread: http://wl500g.info/showthread.php?t=...hlight=openwrt The firmware download link seems to be dead at the moment but it should be available soon.

  5. #5
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,306
    Any possibilities on cross-comping these applications to Asus source tree?

  6. #6
    Join Date
    Feb 2004
    Posts
    103
    I gave it a try and compiled these.

    Here is PHP3 & thttpd (without PHP4). I'll give the thttpd+php4 combi another try later, but sofar that resulted in a long list of errors

    For me it is working on 1.9.2.7-2 software.

    Good luck
    Attached Files Attached Files
    Last edited by erik_bies; 05-01-2005 at 00:29.

  7. #7
    Join Date
    Dec 2004
    Location
    Hungary
    Posts
    22
    Eric,

    Thanks for PHP stuff.

    I tried these programs, but the browser sends me this message:

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

    Can you tell me the correct setup process to WL-500GX device?

    My configuration is: ASUS WL-500GX, Firmware 1.9.2.7 RC2 (OLEG)

    SC


    -----------------
    Here is PHP3 & thttpd (without PHP4). I'll give the thttpd+php4 combi another try later, but sofar that resulted in a long list of errors

    For me it is working on 1.9.2.7-2 software.

    Good luck[/QUOTE]

  8. #8
    same issue for me. php works fine, script can be run from command line.

  9. #9
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,358
    Seems this problem is due to the fact, that fat/fat32 is not a native linux filesystem, i.e. it does not have all required file attributes, so by default all files on the fat volumes are executable. So, either thttpd or it config should be adjusted to check for file extension or particular directory, or alternatively you could switch to ext3 filesystem.

  10. #10
    You're going far on this one Oleg


    Use this command instead to run thttpd from sbin folder:

    Code:
    ./thttpd -C ../etc/thttpd.conf -c /cgi-bin/*
    Problem is the cgipat variable not set up in thttpd.conf

  11. #11
    This team is working great, but most of the site library are in PHP4. I will wait for your try in compiling V4 or try it myself out of despair ;-)

  12. #12
    Join Date
    Feb 2004
    Posts
    103
    if you want to compile it for yourself, you need to build it statically with uClib from CVS. Than apply the paches for dns.c & remove the problems with testing in ./configure

    uClib that is standard for the WL500g supplied won't work cuz of missing functions (e.g. in dns.c)

    Unfortunately I'm still struggling to get a decent new up2date toolchain working. For the rest it should comile without many problems. Oh you need to take an older version of thhtpd as the most recent version (ahum dec 2003) is not supported.

    haha, my last try ended this way
    gcc -IZend/ -I/usr/local/root/php-4.3.9/Zend/ -DPHP_ATOM_INC -I/usr/local/root/php-4.3.9/include -I/usr/local/root/php-4.3.9/main -I/usr/local/root/php-4.3.9 -I/usr/local/root/thttpd-2.21b -I/usr/local/root/php-4.3.9/Zend -D_XPG_IV -I/usr/local/root/php-4.3.9/TSRM -g -O2 -c /usr/local/root/php-4.3.9/Zend/zend_execute.c -o Zend/zend_execute.o && echo > Zend/zend_execute.lo

    gcc: Internal error: Terminated (program cc1)
    Please submit a full bug report.
    See <URL:http://gcc.gnu.org/bugs.html> for instructions.
    make: *** [Zend/zend_execute.lo] Error 1

  13. #13
    This looks ugly. What about trying to staticaly link it to glibc (using mipsel-linux toolchain from firmware?) I've had good result for my xmail project, where the uclibc where insuficient.

    Also the -IZend/ looks strange, if not worst. Where is this folder come from? is it a cutted path?
    Last edited by hugo; 05-01-2005 at 23:06.

  14. #14
    Join Date
    Feb 2004
    Posts
    103
    Quote Originally Posted by hugo
    This looks ugly. What about trying to staticaly link it to glibc (using mipsel-linux toolchain from firmware?) I've had good result for my xmail project, where the uclibc where insuficient.
    the result is an enormous file. I did it first with the PHP3, I believe it resulted in a 3MB file dynamically! linked vs 700k static linked uClib.

    1 sec, I'll give it a try and let u know.

  15. #15
    also read my edited comment about -IZend/

Page 1 of 4 123 ... LastLast

Similar Threads

  1. Running Giftd on wl500g
    By DeF in forum WL-500g/WL-500gx Tutorials
    Replies: 77
    Last Post: 17-04-2006, 13: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, 09:51
  3. Samba running
    By erik_bies in forum WL-500g Custom Development
    Replies: 48
    Last Post: 23-01-2005, 21:16
  4. running a second webserver
    By ronin in forum WL-500g Q&A
    Replies: 25
    Last Post: 23-08-2004, 05: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
  •