Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
anyone have php running on the dns323 ? is there a precompiled archive somewhere ? or can i use php that work on dsmg600 ?
Offline
KRH wrote:
you can not use the one from dsmg600, and i have tryed budt failed first time.
You can make a chroot and make it working whit debian.
I'm planning to do a crosscompile of php4 or php5 and use it with lighttpd. Hopefully not as painful as it was getting FireFly compiling in the D-Link environment. But, as it has already been ported to DSMG600 it should be possible since both are using uClibc.
But, forget about running a DB on the unit. Memory will (most likely) not handle it.
I will, as usual, post my findings here and write stuff in the Wiki. But, don't expect things to happen immediately as I have other obligations.
...and, you can always try for yourself. Follow the crosscompile instructions in the Wiki and look at the various buildscripts posted there. Just remember to share your findings....
/Apan
Last edited by Apskaft (2007-02-22 20:09:16)
Offline
php5 is piece of cake but php4 may need some patching first.
Look this topic for tips http://dns323.kood.org/forum/t24-lighttpd.html
Offline
Hi there,
anything new about PHP4 for the DNS? would be great to have a compiled file...
thanks a lot!
Offline
has anyone gotten php compiled to work on the dns-323 with lighttpd?
Offline
i'd love to see php on my DNS-323 :-)
Please do!
Offline
Hope this is not a stupid question Apskaft, but why couldn't you just run the database off a fast USB stick?
Offline
mykroft wrote:
has anyone gotten php compiled to work on the dns-323 with lighttpd?
just tried (php 5.2.2). failed because the d-link toolchain doesn't include c++ compiler and libs.
Edit: I searched for c++ source files, and found only one and that one seems to be a test program.
It seems to compile after I running "autoconf" before configure....
Last edited by fonz (2007-05-27 16:24:08)
Offline
Did you get this successfully compiled? I have not been able to get my linux box setup correctly yet to cross compile.....
Myk
Offline
Yes. It compiled and I tested a phpinfo() page. I attached my compile script. I had some trouble with zlib, though, might be better to disable for first try. D-Link's firmware uses zlib as well, but it's not installed (fw 1.02) so I had to install zlib myself. Then the pain started... php didn't find zlib and such. I though about including a basic php, but I won't until I learn how to link zlib statically into the php binary.
PS: fw103-scripts package on my site contains the scripts I'm using to create the cross-toolchain.
Last edited by fonz (2007-05-31 23:41:21)
Offline
ok, where I am getting stuck, actually unshure is in the editing of the qemu stuff.
I am not sure what to do about the ip addresses etc for the config of it.
I have never used/heard of qemu before - can you explain these settings so I know what to do with them?
Thanks
Myk
Offline
ok, after getting a couple of more utils (might want to add those to the readme as I did not have them..... dunno) and blindly editing some of the ip config stuff I am getting the following
[root@fileserver bobclfs]# sh qemu/run.sh + '[' -r qemu/run.sh ']' + cd qemu + RAM=256 + /sbin/ifconfig tap1 + '[' 1 -ne 0 ']' ++ pwd + su root -c /opt/dns323/bobclfs/qemu/setup.sh RTNETLINK answers: File exists /opt/dns323/bobclfs/qemu/setup.sh: line 40: /proc/sys/net/ipv4/conf/eth1/proxy_arp: No such file or directory OK + TARGET=armv5l-unknown-linux-uclibc ++ pwd + CROSSTOOLS=/opt/dns323/bobclfs/qemu/../mnt/cross-tools/armv5l-unknown-linux-uclibc/bin + '[' -d /opt/dns323/bobclfs/qemu/../mnt/cross-tools/armv5l-unknown-linux-uclibc/bin ']' + killall distccd + sleep 1 ++ pwd + DISTCCD_PATH=/opt/dns323/bobclfs/qemu/../mnt/cross-tools/armv5l-unknown-linux-uclibc/bin + TMPDIR=/dev/shm + distccd --daemon --allow 0/0 --log-file /opt/dns323/bobclfs/qemu/distccd.log + '[' -r zImage ']' + '[' -r initramfs.cpio.gz ']' + qemu-system-arm -M versatilepb -kernel zImage -initrd initramfs.cpio.gz -hda root_fs -append console=ttyAMA0,115200 -net nic -net tap,ifname=tap1,script=no -serial stdio -m 256 Could not initialize SDL - exiting
And do not know what to do now...
Assistance please if you have time - im sorry for being a pain - crosscompiling is completly new to me....
btw - mine is comming up tap0 - not tap1 like your scripts.....
Myk
Last edited by mykroft (2007-06-01 11:21:14)
Offline
ok, farther along....
did know I had to start the blody thing in a X window
ok, now i am at
-----
In qemu, mount sources and compile samba:
mount /mnt
cd /mnt/bobclfs
sh native/samba.sh
-----
am not sure what you mean by sources and the mount /mnt line.....
there is nothing in the qemu window to mount....
Also my qemu window - net traffic can not get to the outside world - its setting my gateway at 192.168.0.0.... I can not even ping my router at 192.168.0.1
Im slowing learning
Myk
update - for some reason my eth0 device is getting a bcast on your 10.x.x.x lan setup - i can not find where you have that setup.....
Last edited by mykroft (2007-06-01 12:11:08)
Offline
Here's some more info. After running the D-LINK TOOLCHAIN commands, i.e. after the first world.sh in my instructions, you should find the cross-tools in /opt/dns323/fw103/crosstools/gcc-3.3.x/toolchain_arm/bin - a lot of programs starting with "arm-linux-uclibc-".
To use the toolchain to compile php, you need to set a number of environment variables (CC, CXX, AR, ...) and the PATH to use these cross-tools. That's what the fun-toolchain-env.sh from the funplug sources does.
So maybe the easiest way to get you going might be to download and unpack the FUN-PLUG as well, but it shouldn't be necessary to run world.sh or make-image.
After unpacking the fun-plug sources, cd to the funplug directory (the one containing fun-toolchain-env.sh), and run:
source ./fun-toolchain-env.sh
If all went well so far, verify that your cross-compiler is actually there:
tp@motte:/opt/dns323/funplug$ $CC -v (...) gcc version 3.3.3
Now proceed to compile php:
tar xjf php-5.2.2.tar.bz2 cd php-5.2.2 autoconf ./configure \ --cache-file=config.cache \ --host=${FUN_TARGET} \ --prefix=${FUNPLUGDIR} \ --bindir=${BINDIR} \ --sbindir=${BINDIR} \ --libdir=${BINDIR}/lib \ --libexecdir=${BINDIR}/lib \ --sysconfdir=${ETCDIR} \ --disable-all \ --enable-shared=yes --enable-static=no \ --enable-fastcgi \ CFLAGS="${BUILD} ${FUN_CFLAGS} ${FUN_LIBS}" make -j4 cd sapi/cgi mv php php-cgi
Done. php-cgi in sapi/cgi/ is the php binary. Copy it to fun_plug.d/bin/, then enable fast-cgi for lighttpd, edit lighttpd.conf and add:
fastcgi.server = ( ".php" => (( "bin-path" => "/mnt/HD_a2/fun_plug.d/bin/php-cgi", "socket" => "/tmp/php-cgi.socket", "max-procs" => 2 )))
and uncomment the "mod_fastcgi" line in the server.modules list. Start/restart lighttpd and it should run "*.php" files.
Offline
Got it
Thanks for the push in the right direction
Offline
quick question
do you know the command line param on the ./configure to enable pcre-support
am trying to get simpleblog running and am getting
Fatal error: Call to undefined function preg_match() in /mnt/HD_a2/fun_plug.d/www/pages/install05.php on line 10
Thanks
Myk
Offline
any chance of a precompiled php binary to download ?
Offline
mykroft wrote:
do you know the command line param on the ./configure to enable pcre-support
Try
./configure --help | less
It should show all the available options. But I think you will also need to compile the pcre library in order to use it...
Offline
catohagen wrote:
any chance of a precompiled php binary to download ?
Im working on it, when I get to my satisfaction, I will post a binary of it
Myk
Offline
mykroft wrote:
catohagen wrote:
any chance of a precompiled php binary to download ?
Im working on it, when I get to my satisfaction, I will post a binary of it
Myk
Myk...any progress made on the PHP binary?
Offline
Not yet, I asked in the DSM-G600 forums since they were able to get a semi complete version compiled and got snub'ed.
Work has kept me busy this last week, but hopefully I will be able to continue on it this week.
Offline
mykroft wrote:
Not yet, I asked in the DSM-G600 forums since they were able to get a semi complete version compiled and got snub'ed.
Work has kept me busy this last week, but hopefully I will be able to continue on it this week.
Yeah, I read your post and the comment made in the DSM-G600 forum. That was not the question you asked.
I wish I could get php to work on this since there are a few things I would like to do. Why couldn't we just install the PHP binary or source code from http://www.php.net/ ?
I tried this one day and gave it the "sh" command. It said that it couldn't load a few of the files needed. So I moved those files to the folder it was looking for and it didn't give me any errors but I don't think the php was loaded.
Offline