DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-04-16 18:41:40

jrbilodeau
Member
Registered: 2007-11-26
Posts: 47

lighttpd + php +mysql

Hey,

I'm trying to get lighttpd with php and mysql running. i had lighttpd and php running with fonz fun plug 0.5, but couldn't find a plugin for php with mysql support. then i saw the ipkg packages and there seems to be one with php-mysql. here's what i did so far.

cd /mnt/HD_a2/
mkdir ipkg
cd ipkg
wget http://ipkg.nslu2-linux.org/feeds/optwa … -9_arm.ipk
tar -xzf ipkg-opt_0.99.163-9_arm.ipk
tar -xzf data.tar.gz
mkdir /opt
mount --bind /mnt/HD_a2/ipkg/opt /opt
export PATH=/opt/bin:/opt/sbin:$PATH
echo src dns323 http://ipkg.nslu2-linux.org/feeds/optwa … /unstable/ >> /opt/etc/ipkg.conf
ipkg update
ipkg list
ipkg install lighttpd
ipkg install mysql
ipkg install php
ipkg install php-mysql


everything seemed to install ok i think. i stoped lighttpd that i had running under fonz fun plug 0.5, but now im not sure how to get the ipkg one running, and if there are any specific config files i need to modify. could someone please shead some light on this. i've seem quite a few posts about php with mysql but none that actually say how to get it all up and running.

thanks

Offline

 

#2 2008-04-16 19:05:32

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: lighttpd + php +mysql

I haven't used any of those apps myself, but ...

The mysql ipkg (mysql version 4) is broken at the moment - it dies with an illegal instruction during install.

I don't know about the mysql5 ipkg (mysql version 5).

All of the configuration files should be under /opt/etc, and there should be startup scripts in /opt/etc/init.d that you could modify for use by putting them in your fonz fun_plug start folder (or just run them from the command line, or put them in to your fun_plug file.)

Remember that you'll have to call the
mount --bind /mnt/HD_a2/ipkg/opt /opt
command each time your DNS323 boots (so put that in your fun_plug script for now)

You'll need to do this
export PATH=/opt/bin:/opt/sbin:$PATH
in each startup script that you write (or each time you start a console session) unless you make it part of your fonz fun_plug etc/profile file.

Last edited by sjmac (2008-04-16 19:07:34)

Offline

 

#3 2008-04-16 20:37:07

jrbilodeau
Member
Registered: 2007-11-26
Posts: 47

Re: lighttpd + php +mysql

if mysql wont work then it's not worth it. ill just go back to what i had. does anyone know how to get it to work, or have php and mysql working? i did really appreciate some help or direction.

thanks

Offline

 

#4 2008-04-16 23:12:31

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: lighttpd + php +mysql

You can also consider a hybrid approach. Use lighttpd, php and php-mysql from optware, connecting to funplug mysql. This is assuming php-mysql is working of course.

Offline

 

#5 2008-04-17 14:05:57

jrbilodeau
Member
Registered: 2007-11-26
Posts: 47

Re: lighttpd + php +mysql

any ideas how i would go about doing that, or which files i would need to edit. also i noticed that in the optware php version there is a php.ini file for the config options. i don't seem to see this in fonz php package for 0.5. reason i ask is i thought that i read that if php wasn't compiled with mysql that you could load the extension dynamically.

Offline

 

#6 2008-04-18 04:07:01

[DrAg]
Member
Registered: 2008-04-17
Posts: 16

Re: lighttpd + php +mysql

I was able to use lighttpd from fun_plug 0.5 and use php-fcgi from optware, by changing the fun_plug lighttpd config. It makes mysql from php possible, only problem I get 500 server error.
And on a CH3SNAS I am not able te get mysql working .... At the moment there are a lot of questions on the subject. No answers

Offline

 

#7 2008-04-19 11:39:00

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: lighttpd + php +mysql

The mysql (version 4.1.22) package in optware works now, so the steps you followed at the top of this thread should get you working versions of all the apps.

After a reboot the scripts to restart these apps are in /opt/etc/init.d (the scripts with names that start with an S are start scripts, and the names starting with K are kill (stop) scripts.

Configuration files are in /opt/etc/

It looks like lighttpd starts on port 8081 if port 80 is already in use which it will be because DNS323 admin interface is there.

===

Don't forget to stop the lighttpd installed with ffp if you are running that.

Last edited by sjmac (2008-04-19 11:40:21)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB