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 2009-05-22 22:32:25

adrianaitken
Member
Registered: 2009-05-22
Posts: 18

3.12 questions

Hi, I've an existing NSA-220 running 2.30 firmware and ffp. I've jsut got a new one (still waiting on disk to arrive). I've flashed it to 3.12 but when loading Fonz's funpkg stuff I get 'issues' when trying to install it to a 8Gb USB stick (formated as ext2)

/ffp/start/sshd.sh gets renamed to sshd.sh.new so I have to rename it back and chmod a+x it again (and I'm in via putty (SSH client) doing this !!!)

quite a few of the tgz files have i/o errors

PHP doesn't exist (nor looking at http://inreto.de/dns323/fun-plug/0.5/packages/ does it appear in the listing) - now I'm not a Linux person so how can I download a copy of PHP that would work with the NSA ?

Many thanks
Adrian


Many thanks
Adrian

Offline

 

#2 2009-05-22 23:47:51

adrianaitken
Member
Registered: 2009-05-22
Posts: 18

Re: 3.12 questions

Well, found the extra-packages so downloaded and installed PHP and Perl etc.
Now I'm having trouble installing lighttpd with php support.
Copied the lighttpd.confg-with-php to /etc as lighttpd.conf

the lines..

## php support
## uncomment the following lines and the mod_fastcgi module above
fastcgi.server = ( ".php" => ((
    "bin-path"  => "/ffp/bin/php-cgi",
    "socket"    => "/ffp/tmp/php-cgi.socket",
    "max-procs" => 2
)))

are causing a problem though. If I comment them out, lighttpd starts and stays started. If I keep the lines in lighttpd starts then stops. The bin-path is correctc (php-cgi exists there) and ffp/tmp exists as well.
I also tried using /e-data/{long string}/ffp/.... since I have to do that for lighttpd home path etc but that didn't work :-(

Any ideas on a late friday night ?

Many thanks
Adrian


Many thanks
Adrian

Offline

 

#3 2009-05-23 00:07:41

adrianaitken
Member
Registered: 2009-05-22
Posts: 18

Re: 3.12 questions

Back to PHP. I uncommented some of the extensions (like mysqli.dll) which caused php to crash which stopped lighttpd. I re-commented all of the extensions for now but how do I install the extensions (easy under Windows) for the NSA-220 ?


Many thanks
Adrian

Offline

 

#4 2009-05-23 00:24:17

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: 3.12 questions

Yes, I moved php to extra-packages. It's listed here: http://www.inreto.de/dns323/fun-plug/0. … S.html#php
The new php also requires curl. php extensions are *.so files (*.dll is for windows!). But there's no mysqli module, only mysql. Of course, you need to install mysql for this.
For php support, you need to uncomment one additional line in the config: "mod_fastcgi", in the modules list. There's also a ready-to-use example config:
/ffp/etc/examples/lighttpd.conf-with-php

Regarding the *.new files: Please update the funpkg package (download, then funpkg -u funpkg-...tgz), this will handle many of the *.new files automatically.

Offline

 

#5 2009-05-23 14:53:15

adrianaitken
Member
Registered: 2009-05-22
Posts: 18

Re: 3.12 questions

Hi fonz, thanks for the reply. I found a newer funpkg on your site so downloaded that and it did seem to cure alot of problems :-)
For php extensions, would I be right in thinking that they are the ones in "\ffp\lib\php\extensions\no-debug-non-zts-20060613" only 12 of them ? Ideally I wanted things like exif as well. Is this possible (considering I don't know *nix or how to compile programs in*nix) ?

And many thanks for this upgrade to my NSA-220 !!!


Many thanks
Adrian

Offline

 

#6 2009-05-23 15:53:26

adrianaitken
Member
Registered: 2009-05-22
Posts: 18

Re: 3.12 questions

And now onto mySQL ....
Installed it OK, ran secure_db_installation etc
Let root access it remotely. From ssh onto the NSA I can type in mysql -u root -p, enter password and have full access so the mysqld is running OK. Trouble is I can't remote into it. Even doing "telnet 192.168.0.250 3306" should at least show something (obviously its in binary not acsii) but I get connection refused so it doesn't seem to want to listen on the port specified in my.cnf (and the skip-networking option is commented out !!! ).
Is this due to how mysql was compiled ? It is good from security, not so good when I want to use a gui to manage mysql !!!


Many thanks
Adrian

Offline

 

#7 2009-05-23 16:10:30

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: 3.12 questions

adrianaitken wrote:

(and the skip-networking option is commented out !!! ).

There's another skip-networking in the start script. You need to edit /ffp/start/mysqld.sh, and remove '--skip-networking' from mysqld_flags.

Offline

 

#8 2009-05-23 16:13:02

adrianaitken
Member
Registered: 2009-05-22
Posts: 18

Re: 3.12 questions

And mysql AND PHP.
I can't get php to talk to mysql . The php.ini has extenion_dir pointing to '/ffp/lib/php/extensions/no-debug-non-zts-20060613/' since that is where the only mysql.so is (apart from a perl version).
Doing a web page
<?php
$con = mysql_connection('localhost','username','password');
?>
results in
Fatal error: Call to undefined function mysql_connect() in /ffp/www/pages/index.php on line 2

So, what am I doing wrong (anyone can feel free to step in here !!!! ) ?


Many thanks
Adrian

Offline

 

#9 2009-05-23 16:43:05

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: 3.12 questions

my php ini has

Code:

[php]
extension=mysql.so

Offline

 

#10 2009-05-23 18:33:51

adrianaitken
Member
Registered: 2009-05-22
Posts: 18

Re: 3.12 questions

fonz wrote:

adrianaitken wrote:

(and the skip-networking option is commented out !!! ).

There's another skip-networking in the start script. You need to edit /ffp/start/mysqld.sh, and remove '--skip-networking' from mysqld_flags.

Cheers, that works now.


Many thanks
Adrian

Offline

 

#11 2009-05-23 18:35:25

adrianaitken
Member
Registered: 2009-05-22
Posts: 18

Re: 3.12 questions

fonz wrote:

my php ini has

Code:

[php]
extension=mysql.so

And mine. What does your 'extension_dir' say?


Many thanks
Adrian

Offline

 

#12 2009-05-23 19:11:34

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: 3.12 questions

adrianaitken wrote:

And mine. What does your 'extension_dir' say?

Nothing. Use php -m find out about the available modules. If it lists mysql, all should be fine.

Offline

 

#13 2009-05-23 19:30:15

adrianaitken
Member
Registered: 2009-05-22
Posts: 18

Re: 3.12 questions

Hmmm, mysql is listed. And if I run (from the command line) php index.php then it works. Run it via lighttpd and it fails. Any ideas ?


Many thanks
Adrian

Offline

 

#14 2009-05-23 19:38:28

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: 3.12 questions

restart lighttpd?

Offline

 

#15 2009-05-23 20:54:14

adrianaitken
Member
Registered: 2009-05-22
Posts: 18

Re: 3.12 questions

full reboot did the trick.
Many thanks for all your help.


Many thanks
Adrian

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB