Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
sala wrote:
Re-compiled. This time it's modular, so you need to setup php.ini for modules.
http://dns323.kood.org/downloads/php-4.4.4.tar.bz2
Doesn't seem to work... phpinfo returns Dynamic Library support not available so I can't load any of the *.so extensions.
Also php -m from command line says the same thing.
Help?
Offline
sala wrote:
Damn
I totaly forget that, uploading fixed version at monday
Sweet, thanks. I can live without thumbs til then
Offline
Actually there is nothing more to build in. Did you set enable_dl = On or enable_dl = 1 in your php.ini ?
By default php.ini path is /mnt/HD_a2
Offline
sala wrote:
Actually there is nothing more to build in. Did you set enable_dl = On or enable_dl = 1 in your php.ini ?
By default php.ini path is /mnt/HD_a2
I think there is a switch needed. http://us3.php.net/gd for example refers to a --with-jpeg-dir=DIR
The bundled GD I think is fine, just needs this switch in addition to the regular --with-gd , don't know if the library is there by default though (seems like it says it is).
Offline
I was talking about dynamic modules.
Anyways --with-jpeg-dir and --with-png-dir is already added along with --with-gd=shared. I also hex searched and all jpeg and png functions is there
Offline
sala wrote:
I was talking about dynamic modules.
Anyways --with-jpeg-dir and --with-png-dir is already added along with --with-gd=shared. I also hex searched and all jpeg and png functions is there
I knew that. *looks around* What I get for reading forums so early. Let me check tonight, I'm just using the default php.ini that comes with 4.4.4 so that may be the issue. The way it read I thought it was a compile time switch, not runtime.
Thanks
Offline
Damn, it still says
2006-10-30 18:31:50: (mod_fastcgi.c.2502) FastCGI-stderr: PHP Warning: dl() [<a href='function.dl'>function.dl</a>]: Cannot dynamically load /mnt/HD_a2/website/gd.so - dynamic modules are not supported in /mnt/HD_a2/website/pages/_index.php on line 2
I have no ideas any more.
php is configured:
'./configure' '--target=powerpc-uclibc-linux-gnu' '--host=i686-linux-gnu' '--build=powerpc-uclibc-linux-gnu' '--disable-all' '--enable-session' '--enable-fastcgi' '--with-config-file-path=/mnt/HD_a2' '--enable-magic-quotes' '--enable-memory-limit' '--enable-force-cgi-redirect' '--enable-discard-path' '--without-pear' '--without-gettext' '--without-iconv' '--with-pcre-regex=shared' '--with-gd=shared' '--with-zlib' '--with-jpeg-dir' '--with-png-dir' '--with-mysql=shared' '--enable-sockets=shared' '--enable-mbstring=shared' '--enable-shared'
I guess it is because of --disable-all but we should still be able to enable --enable-shared and any other parameter disabled by --disable-all.
//edit
Ok, now I got it, it's because of uclibc libdl.so, somehow php does not like it.
Offline
OK, I managed to go around libdl.so problem, now it supports dynamic modules
Only gd.so will need some tweaks, now it outputs after loading:
Can't modify ./gd.so's text section. Use GCC option -fPIC for shared objects, please.
Offline
Thanks for the working php-gd, now my file server is complete
Offline
I just couldn't make it as a module. So as TheWalt says, if gd is needed then use php-gd instead of php.
All files are as usual in http://dns323.kood.org/downloads/php-4.4.4.tar.bz2
Offline
i got php workin this way and everythings sweet when i access the page on my network but if i try to access it via the internet i get "invalid request"
whats wrong here
Offline
tksm wrote:
i got php workin this way and everythings sweet when i access the page on my network but if i try to access it via the internet i get "invalid request"
whats wrong here
Is your dsmg connected directly to internet? If not then you need to setup your router to allow port forwarding.
Also your service provider may block some or all ports you are trying to use.
Offline
lol never mind it was my php index file had some f-ed up code in it , i got it now
Last edited by tksm (2006-11-11 19:28:35)
Offline
Hi TheWalt.
Thanks for your detailed description. It worked out of the box for me after I followed your instructions.
However I wanted to mention that despite the builtin admin interface by default will block port 80, you can still force lighttpd to listen on port 80.
The trick is to shutdown/finish the webserver (e.g. I do this from fun_plug), then start lighttpd on port 80 and afterwards to restart the builtin web server. After I had a quick peek into the sources that D-Link has provided in the meantime, I saw that this GoAhead server will do up to 5 reattempts to open a listening socket if the default one is not available. It will simply probe ports 81, 82, ... 84.
Therefore in our case it will end up with port 81 since lighttpd blocked 80.
Stopping the builtin web server is as easy as a kill $WEBS_PID, which WEBS_PID=`pidof webs` will determine.
Find attached a snipplet from the fun_plug I use.
I have all my stuff organized such that beside the fun_plug, there's only a single directory addons which hold something similar to a unix file hierarchy, e.g. addons/etc, addons/bin, addons/web etc.
My lighttpd modules are in addons/lib/lighttpd, lighttpd's config file is in addons/etc/lighttpd.conf.
There's a central rc.config file in addons/etc that fun_plug will source include and that will control which service will be started and which won't (Remember - I posted only a snipplet from the whole fun_plug script.
Actually there's much more like starting telnetd, drobbear etc.)
rc.config is just a plain file:
START_TELNETD=no START_SSHD=yes START_LIGHTTPD=yes LIGHTTPD_PORT=80
My lighttpd.conf is exactly as yours except for the port which is 80 for me. However, as you can see in the attachment,
this will be replaced by the value you specified in rc.config anyway.
Having things set up this way will turn the DSM-G600 in an almost regular web server on e.g. http://192.168.10.101
while the builtin admin interface will still be available and fully functional at http://192.168.10.101:81
Hope that this might be useful for somebody out there as well. ;-)
Art
PS: Note the use of boot log files in the script. This turned out to be quite a useful stuf in case things do not work as expected.
Offline
If you don't need internal webserver then you can also remove it.
kill `pidof chkbutton` kill `pidof webs`
But with this method you are going to lose some process checking features, maybe also shutdown by button, usb dismount button and error emailing.
To get around this you can kill just webs and then fake /web/webs process by replacing /web/webs symlink with something else. Removing /web/webs symlink completely should also work
Offline
art wrote:
However I wanted to mention that despite the builtin admin interface by default will block port 80, you can still force lighttpd to listen on port 80.
I use my router to forward external port 80 requests to internal port so it's transparent, but this is nice to know also. Thanks for the info.
Here is my updated lighttpd.conf file since my origional posting. Other then this, I use the default php.ini and everything has been stable thus far.
Offline
Can't modify /usr/local/lib/mod_dirlisting.so's text section. Use GCC option -fPIC for shared objects, please.
Help?
Using the lighttpd.conf that TheWalt last provided got me further than before, because I was having that same error but with mod_rewrite.so file. I've modified the .conf file with my settings (my folder setup, IP and ports, but not modifying other stuff).
Did I miss something totally obvious or is there a trick that I haven't thought of yet? If I do php -m, I get the following:
[PHP Modules]
session
standard
zlib
[Zend Modules]
Do I need a php.ini file? If so, where do I place it and where can I get a copy of one that I can use (and obviously customize)?
I'm not a n00b to the Linux OS & structure, but I have lost touch with it, unfortunately, so please resist the urge to reach through the computer to strangle me.
Offline
Attached is the php.ini I use. Just the default.
One thing to keep in mind for my conf is you need the following in your lighttpd folder.
A few of the so's are loaded by default even though not explicit in the conf file.
lighttpd.conf
lighttpd.css
lighttpd
mod_alias.so
mod_auth.so
mod_dirlisting.so
mod_fastcgi.so
mod_indexfile.so
mod_staticfile.so
mod_status.so
pcre.so
php.ini
php
sockets.so
Offline
Still getting the error with mod_dirlisting.so, and now I'm hunting around for lighttpd.css (first mention I've seen of it).
Does it matter that I'm running it from the root user?
Offline
Wolfie wrote:
Still getting the error with mod_dirlisting.so, and now I'm hunting around for lighttpd.css (first mention I've seen of it).
Does it matter that I'm running it from the root user?
lighttpd.css is just a custom style sheet and is not actually required. I run mine from root and it has been up for 31 days and counting.
Offline
Wolfie wrote:
Still getting the error with mod_dirlisting.so
Are you using the latest lighttpd from http://dns323.kood.org/downloads/ ?
Also don't mix modules from different versions/build date of lighttpd.
Offline
lighttpd-ssl-pcre-1.4.13.tar.bz2 -and- php-4.4.4.tar.bz2
I didn't download any of the other lighttpd's nor php's, although to be certain, I will re-extract the archive to be certain.
---
Deleted all the files in the directory, except for the .conf file. Re-extracted the lighttpd files only (from the archive listed above). Same error.
Even tried doing the same thing but the other 1.4.13 files, same results. (Always deleting the current files, then extracting). I'm sure there's something simple that I'm not doing right.
Question, would permissions cause this error?
Offline
Any chance you can cross compile either 4 or 5 for the 323 - I have hit a wall and cant figure out what is wrong with my compile
Thanks
Myk
Offline
mykroft:
The forum you want is http://dns323.kood.org/forum/viewforum.php?id=3
Threads about lighttpd:
> http://dns323.kood.org/forum/t530-light … vious.html
> http://dns323.kood.org/forum/t213-lighttpd.html
Thread about php http://dns323.kood.org/forum/t260.html
I don't know if any of that will answer what you are looking for, but since some people only read forums that interest them, your question is more likely to be answered there. (Of course, the all knowing sala might still answer it...)
Offline