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
Printable View
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
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:
The first seems to me a simple php library (I don't know what its features are).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 second package contains a webserver.
I hope this is helpful and, as allways, if it works for you please report back here :)
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/
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.
Any possibilities on cross-comping these applications to Asus source tree?
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
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]
same issue for me. php works fine, script can be run from command line.
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.
You're going far on this one Oleg :D
Use this command instead to run thttpd from sbin folder:
Problem is the cgipat variable not set up in thttpd.confCode:./thttpd -C ../etc/thttpd.conf -c /cgi-bin/*
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 ;-)
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 :eek: :confused:
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
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?
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.Quote:
Originally Posted by hugo
1 sec, I'll give it a try and let u know.
also read my edited comment about -IZend/