How to enable PHP webpublishing in NSA320

Marvell Kirkwood based
Post Reply
harpplucker
Posts: 6
Joined: Sun Nov 27, 2011 2:29 pm

How to enable PHP webpublishing in NSA320

Post by harpplucker » Sat Sep 01, 2012 7:15 am

I have enabled webpublishing for my NSA320 Firmware V4.40(AFO.0).
I have copied a PHP file to the share. But when I open the file with my Chrome web browser I get the content of the file instead of the PHP script result.

How do I tell the NSA320 that it should execute the PHP script?

Mijzelf
Posts: 6198
Joined: Mon Jun 16, 2008 10:45 am

Re: How to enable PHP webpublishing in NSA320

Post by Mijzelf » Sat Sep 01, 2012 10:20 am

You'll have to put your website in /usr/local/zy-pkgs/gui/<your-name>. Then the site will be available as http://<ip-of-nas>/pkg/<your-name>/. Assuming you have the php package installed.

The other way is to use an FFP-Stick, which provides lighttpd and php, and which can serve from any location you like.

harpplucker
Posts: 6
Joined: Sun Nov 27, 2011 2:29 pm

Re: How to enable PHP webpublishing in NSA320

Post by harpplucker » Sat Sep 01, 2012 4:52 pm

Mijzelf wrote:You'll have to put your website in /usr/local/zy-pkgs/gui/<your-name>. Then the site will be available as http://<ip-of-nas>/pkg/<your-name>/.
The php file had been found previously at the http://ipaddress/<myname>/ address, but hasn't been executed. The new location does not change the behaviour.
Assuming you have the php package installed.
There are following packages visible in the package management page:
  • BackupPlanner
    DyDNS (integrated)
    Gallery
    NFS
    PHP-MySQL-phpMyAdmin
    SMART (integrated)
    SqueezeCenter
    Syslog
    Tftp
    WordPress
    eMule
    pyLoad (integrated)
None of the not integrated packages is installed. There is no package with the name PHP, but only one packages that would use PHP. Is there a separate PHP package available and how do I install it without cluttering up my NAS with MySQL?
The other way is to use an FFP-Stick, which provides lighttpd and php, and which can serve from any location you like.
I did not succeed with booting the FFP-Stick yet. The Zyxel support just said: not supported anymore. But I habe a telnet access to the NAS.

Mijzelf
Posts: 6198
Joined: Mon Jun 16, 2008 10:45 am

Re: How to enable PHP webpublishing in NSA320

Post by Mijzelf » Sat Sep 01, 2012 7:45 pm

harpplucker wrote:There is no package with the name PHP, but only one packages that would use PHP. Is there a separate PHP package available and how do I install it without cluttering up my NAS with MySQL?
Not. The only way is installing PHP and MySQL.
I did not succeed with booting the FFP-Stick yet. The Zyxel support just said: not supported anymore.
Strange answer. ZyXEL never supported the FFP-Stick, it's a hack.

Did you rename nsa310_check_file_C0.libzy.so to nsa310_check_file_C0?

harpplucker
Posts: 6
Joined: Sun Nov 27, 2011 2:29 pm

Re: How to enable PHP webpublishing in NSA320

Post by harpplucker » Sun Sep 02, 2012 5:24 pm

Mijzelf wrote:The only way is installing PHP and MySQL.
Ok, thanks. I skip this. I was able to reset the master passwort and don't kneed the PHP script that dumps the masterkey anymore.
harpplucker wrote:I did not succeed with booting the FFP-Stick yet. The Zyxel support just said: not supported anymore.
Mijzelf wrote:Strange answer. ZyXEL never supported the FFP-Stick, it's a hack.
Maybe. Probably I am wrong in this place.
Mijzelf wrote:Did you rename nsa310_check_file_C0.libzy.so to nsa310_check_file_C0?
Yes. The FFP-Stick booted each time when the firmware was updated and the boot took a bit longer. But not at the next time. So I stopped trying this hack.

The FFP-Stick might provide more than a telnet/ssh login. But meanwhile I can login with telnet with other means and did not tried FFP-Stick further.

Mijzelf
Posts: 6198
Joined: Mon Jun 16, 2008 10:45 am

Re: How to enable PHP webpublishing in NSA320

Post by Mijzelf » Sun Sep 02, 2012 5:58 pm

harpplucker wrote:Yes. The FFP-Stick booted each time when the firmware was updated and the boot took a bit longer. But not at the next time. So I stopped trying this hack.
Ah. You are bitten by the 'timing issue'.
You can try the ffp-zypkg: NSA-Serie / FFP als Paket [INOFFIZIEL]. In short, create a file web_prefix in \\NAS\admin\zy-pkgs with the content: 'ftp://ftp.zyxel-tech.de/2.new_mirror/' (without quotes) and let the webinterface search for new packages.

uploader
Posts: 1
Joined: Thu May 16, 2013 10:47 am

Re: How to enable PHP webpublishing in NSA320

Post by uploader » Thu May 30, 2013 9:43 pm

Is it possible somehow to update PHP version on Zyxel NAS??

Post Reply