Updating PHP on QNAP NAS

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
harveydt
New here
Posts: 5
Joined: Tue Feb 21, 2017 7:05 pm

Updating PHP on QNAP NAS

Post by harveydt »

How can I update PHP on my QNAP NAS?
It currently has PHP5.6.40 installed, whereas support for PHP 5 was discontinued in January 2019 and I would like to update to version 7.4.8.

Do I have to wait for QNAP to release a new firmware upgrade, or can someone give me instructions on how to do it myself? (and if it is possible to do it myself, is there any danger that subsequent firmware upgrades could cause problems, or should it all be okay?

Thanks!
User avatar
dolbyman
Guru
Posts: 35024
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Updating PHP on QNAP NAS

Post by dolbyman »

what is your nas model?

in any case make sure you dont expose your nas to wan ...bad idea
harveydt
New here
Posts: 5
Joined: Tue Feb 21, 2017 7:05 pm

Re: Updating PHP on QNAP NAS

Post by harveydt »

TS-421
Re WAN, yes indeed... Just using it as a local test server, but it's no use if I can't keep it up to date.
User avatar
dolbyman
Guru
Posts: 35024
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Updating PHP on QNAP NAS

Post by dolbyman »

yeah .. no that one is a lost cause (10 years old)

all the ones here are also not for old x19 units
https://www.qnapclub.eu/en

maybe time for a new NAS or just sepperate dev system (esxi on whitebox)
harveydt
New here
Posts: 5
Joined: Tue Feb 21, 2017 7:05 pm

Re: Updating PHP on QNAP NAS

Post by harveydt »

There must be a way to do it manually.... surely...

I only bought the box 5 years ago, so I'm a pretty cross to hear it's a lost cause already.... If I have to replace it, it won't be with another QNAP device if that's their attitude towards longevity!
User avatar
dolbyman
Guru
Posts: 35024
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Updating PHP on QNAP NAS

Post by dolbyman »

Sorry to hear that you bought an old NAS.. feature support ran out end of 2017 and security patches will not be provided after 12-2020
https://www.qnap.com/en/product/eol.php#

As I said if you want to keep the NAS, get a different dev machine and keep the QNAP for data storage... If you are feeling adventurous you can switch the OS on your NAS for debian

https://wiki.debian.org/InstallingDebianOn/QNAP
User avatar
jaysona
Been there, done that
Posts: 846
Joined: Tue Dec 02, 2008 11:26 am
Location: Somewhere in the Great White North

Re: Updating PHP on QNAP NAS

Post by jaysona »

harveydt wrote: Thu Aug 20, 2020 11:32 pm There must be a way to do it manually.... surely...

I only bought the box 5 years ago, so I'm a pretty cross to hear it's a lost cause already.... If I have to replace it, it won't be with another QNAP device if that's their attitude towards longevity!
I agree with you, being told to purchase a new NAS just to be able to have up to date PHP is a pretty sh**ty thing to hear, but that is effectively what QNAP NAS' are.

There are ways to update Apache and PHP, but they are not simple and require some spelunking in the NAS.

PHP is stored in /usr/local/apache/bin (which is really /mnt/ext/opt/apache/bin), so you can compile a new version and install it there, or you can use Entware to download the latest version of PHP and then make the necessary symlinks for everything to work.

It stands to reason that the crippled version of Apache that is included with the NAS might not work properly with the newest version of PHP, so you may also need to download the latest Apache version using Entware as well.

Keep in mind that, despite what QNAP's glitzy marketing will try to convince you, the NAS is really nothing more than a NAS, it is not a true Linux server, QNAP NAS' run a very outdated and purposely crippled version of Linux.
RAID is not a Back-up!

H/W: QNAP TVS-871 (i7-4790. 16GB) (Plex server) / TVS-EC1080 (32Gig ECC) - VM host & seedbox
H/W: Asustor AS6604T (8GB) / Asustor AS7010T (16GB) (media storage)
H/W: TS-219 Pro / TS-509 Pro
O/S: Slackware 14.2 / MS Windows 7-64 (x5)
Router1: Asus RT-AC86U - Asuswrt-Merlin - 386.7_2
Router2: Asus RT-AC68U - Asuswrt-Merlin - 386.7_2
Router3: Linksys WRT1900AC - DD-WRT v3.0-r46816 std
Router4: Asus RT-AC66U - FreshTomato v2021.10.15

Misc: Popcorn Hour A-110/WN-100, Pinnacle Show Center 250HD, Roku SoundBridge Radio (all retired)
Ditched QNAP units: TS-269 Pro / TS-253 Pro (8GB) / TS-509 Pro / TS-569 Pro / TS-853 Pro (8GB)
TS-670 Pro x2 (i7-3770s 16GB) / TS-870 Pro (i7-3770 16GB) / TVS-871 (i7-4790s 16GB)
harveydt
New here
Posts: 5
Joined: Tue Feb 21, 2017 7:05 pm

Re: Updating PHP on QNAP NAS

Post by harveydt »

A QNAP forum might not be the best place for this discussion, but I'm keen to hear recommendations for alternatives if anyone has any experience and ideas.
User avatar
jaysona
Been there, done that
Posts: 846
Joined: Tue Dec 02, 2008 11:26 am
Location: Somewhere in the Great White North

Re: Updating PHP on QNAP NAS

Post by jaysona »

Recommendation:
1. Install Entware (if not already installed)
2. Install PHP 7

PHP7 on Entware as of the date of this post:

Code: Select all

php7 - 7.4.6-1 - PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. This package contains only the PHP config file. You must >
php7-cgi - 7.4.6-1 - PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. This package contains the CGI version of the PHP7 int>
php7-cli - 7.4.6-1 - PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. This package contains the CLI version of the PHP7 int>
php7-fastcgi - 7.4.6-1 - As FastCGI support is now a core feature the php7-fastcgi package now depends on the php7-cgi package, containing just the startup script.
php7-fpm - 7.4.6-1 - PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. This package contains the FastCGI Process Manager of >
php7-mod-bcmath - 7.4.6-1 - Bcmath shared module
php7-mod-calendar - 7.4.6-1 - Calendar shared module
php7-mod-ctype - 7.4.6-1 - Ctype shared module
php7-mod-curl - 7.4.6-1 - cURL shared module
php7-mod-dom - 7.4.6-1 - DOM shared module
php7-mod-exif - 7.4.6-1 - EXIF shared module
php7-mod-fileinfo - 7.4.6-1 - Fileinfo shared module
php7-mod-filter - 7.4.6-1 - Filter shared module
php7-mod-ftp - 7.4.6-1 - FTP shared module
php7-mod-gd - 7.4.6-1 - GD graphics shared module
php7-mod-gettext - 7.4.6-1 - Gettext shared module
php7-mod-gmp - 7.4.6-1 - GMP shared module
php7-mod-iconv - 7.4.6-1 - iConv shared module
php7-mod-imap - 7.4.6-1 - IMAP shared module
php7-mod-intl - 7.4.6-1 - Note that this package depends in ICU library which is built without data by default. This is to satisfy programs build and run dependencies but to keep the installed footprint smal>
php7-mod-json - 7.4.6-1 - JSON shared module
php7-mod-ldap - 7.4.6-1 - LDAP shared module
php7-mod-mbstring - 7.4.6-1 - MBString shared module
php7-mod-mysqli - 7.4.6-1 - MySQL Improved Extension shared module
php7-mod-mysqlnd - 7.4.6-1 - MySQL Native Driver shared module
php7-mod-opcache - 7.4.6-1 - OPcache shared module
php7-mod-openssl - 7.4.6-1 - OpenSSL shared module
php7-mod-pcntl - 7.4.6-1 - PCNTL shared module
php7-mod-pdo - 7.4.6-1 - PHP Data Objects shared module
php7-mod-pdo-mysql - 7.4.6-1 - PDO driver for MySQL shared module
php7-mod-pdo-pgsql - 7.4.6-1 - PDO driver for PostgreSQL shared module
php7-mod-pdo-sqlite - 7.4.6-1 - PDO driver for SQLite 3.x shared module
php7-mod-pgsql - 7.4.6-1 - PostgreSQL shared module
php7-mod-phar - 7.4.6-1 - Phar Archives shared module
php7-mod-session - 7.4.6-1 - Session shared module
php7-mod-shmop - 7.4.6-1 - Shared Memory shared module
php7-mod-simplexml - 7.4.6-1 - SimpleXML shared module
php7-mod-snmp - 7.4.6-1 - SNMP shared module
php7-mod-soap - 7.4.6-1 - SOAP shared module
php7-mod-sockets - 7.4.6-1 - Sockets shared module
php7-mod-sqlite3 - 7.4.6-1 - SQLite3 shared module
php7-mod-sysvmsg - 7.4.6-1 - System V messages shared module
php7-mod-sysvsem - 7.4.6-1 - System V shared memory shared module
php7-mod-sysvshm - 7.4.6-1 - System V semaphore shared module
php7-mod-tokenizer - 7.4.6-1 - Tokenizer shared module
php7-mod-xml - 7.4.6-1 - XML shared module
php7-mod-xmlreader - 7.4.6-1 - XMLReader shared module
php7-mod-xmlwriter - 7.4.6-1 - XMLWriter shared module
php7-mod-zip - 7.4.6-1 - ZIP shared module
php7-pecl-dio - 0.2.0-1 - Direct I/O functions
php7-pecl-http - 3.2.3-2 - Extended HTTP Support
php7-pecl-libevent - 2019-05-30-ce255e7e1e293030951fd68d5df06b2a4c077a89-2 - Libevent - event notification
php7-pecl-mcrypt - 1.0.3-2 - Bindings for the libmcrypt library
php7-pecl-propro - 2.1.0-1 - Property proxy
php7-pecl-raphf - 2.0.1-2 - Resource and persistent handles factory
php7-pecl-redis - 5.2.2-1 - PHP extension for interfacing with Redis
php7-pecl-trader - 0.5.0-1 - Technical Analysis for traders
Alternatives:
1. Get a real Linux server (running on an Intel NUC or Raspberry Pi for example)
2. Install Debian on your QNAP NAS (link already provided, plus google will have more)
RAID is not a Back-up!

H/W: QNAP TVS-871 (i7-4790. 16GB) (Plex server) / TVS-EC1080 (32Gig ECC) - VM host & seedbox
H/W: Asustor AS6604T (8GB) / Asustor AS7010T (16GB) (media storage)
H/W: TS-219 Pro / TS-509 Pro
O/S: Slackware 14.2 / MS Windows 7-64 (x5)
Router1: Asus RT-AC86U - Asuswrt-Merlin - 386.7_2
Router2: Asus RT-AC68U - Asuswrt-Merlin - 386.7_2
Router3: Linksys WRT1900AC - DD-WRT v3.0-r46816 std
Router4: Asus RT-AC66U - FreshTomato v2021.10.15

Misc: Popcorn Hour A-110/WN-100, Pinnacle Show Center 250HD, Roku SoundBridge Radio (all retired)
Ditched QNAP units: TS-269 Pro / TS-253 Pro (8GB) / TS-509 Pro / TS-569 Pro / TS-853 Pro (8GB)
TS-670 Pro x2 (i7-3770s 16GB) / TS-870 Pro (i7-3770 16GB) / TVS-871 (i7-4790s 16GB)
Robert02
New here
Posts: 5
Joined: Wed Jun 08, 2011 7:22 am

Re: Updating PHP on QNAP NAS

Post by Robert02 »

I can't believe I'm reading what I read in this topic, but yes, probably QNAP is really a bad company. Since PHP , Apache and MySQL for development purpose won't affect the NAS performaces
User avatar
dolbyman
Guru
Posts: 35024
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Updating PHP on QNAP NAS

Post by dolbyman »

Depending on your NAS model, install a dev environment in a container or VM. Why does a NAS (!!) have to be used for web development ? It's supposed to serve files (hence the name) all the other stuff is just extra (and many of those extras lead to vulnerabilities)
Storyline
Getting the hang of things
Posts: 63
Joined: Thu Nov 24, 2016 8:46 pm

Re: Updating PHP on QNAP NAS

Post by Storyline »

I think what Jaysona says in his post above suggests that he may be expecting a bit too much from his QNAP NAS. I have only had experience with one model in the range. the TS453A which is a few years old now but I am still regularly surprised about just how many things this relatively low cost unit can do. I only use a small number of the apps but the ones I use are being updated all the time. It is true that, especially for someone like myself who has no IT background, the user experience can be confusing and I regularly come across things that seem illogical to me but with the help of this forum and some trial & error it is amazing what it does in our house.

My theory is that as they (QNAP) develop and maintain the QTS firmware which feels to me almost like a complete operating system, it is inevitable that some will compare it with the bomb proof GUI of Windows & Apple devices which are developed and supported by much larger teams of engineers.

I have to admit that I quite enjoy the challenge of trying to get my NAS to do what I want it to. Sometimes it takes me hours of ignorant muddling around but finally there will be a breakthrough which can be hugely satisfying. The only time I have been completely defeated is when I was using Security Station to upload and store activity captured by thee security cameras. I found a clumsy way of getting it to work but what I particularly wanted was to store the footage that was filmed 20 or 30 seconds before the cameras detected movement. It seemed to me that the NAS was not operating as it should and after a call to QNAP support I was instructed to install some remote desktop software and shortly afterwards a woman logged on from QNAP in Germany and after 20 minutes of rapid activity with our PC, the NAS and the camera firmware she had the whole system running perfectly. Not only that, when I timidly asked her what was wrong and what she had done to fix it she sent me an easy to understand email which has meant I have been able to keep the system running smoothly despite upgrading all three cameras. That is good after sales support I reckon.

Anyway, sorry for the o/t ramblings - now to get back and try to get my PHP updated so I can stop my WordPress install nagging me.
Slowly getting the hang of my TS-453A :)
brongracz
New here
Posts: 7
Joined: Tue Oct 22, 2013 12:32 am

Re: Updating PHP on QNAP NAS

Post by brongracz »

@jasona

Can you elaborate on this? How do I do it? Do I need to install the qpkg and the operate it via ssh?
jaysona wrote: Fri Aug 21, 2020 12:09 am Recommendation:
1. Install Entware (if not already installed)
2. Install PHP 7

PHP7 on Entware as of the date of this post:

Code: Select all

php7 - 7.4.6-1 - PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. This package contains only the PHP config file. You must >
php7-cgi - 7.4.6-1 - PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. This package contains the CGI version of the PHP7 int>
php7-cli - 7.4.6-1 - PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. This package contains the CLI version of the PHP7 int>
php7-fastcgi - 7.4.6-1 - As FastCGI support is now a core feature the php7-fastcgi package now depends on the php7-cgi package, containing just the startup script.
php7-fpm - 7.4.6-1 - PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. This package contains the FastCGI Process Manager of >
php7-mod-bcmath - 7.4.6-1 - Bcmath shared module
php7-mod-calendar - 7.4.6-1 - Calendar shared module
php7-mod-ctype - 7.4.6-1 - Ctype shared module
php7-mod-curl - 7.4.6-1 - cURL shared module
php7-mod-dom - 7.4.6-1 - DOM shared module
php7-mod-exif - 7.4.6-1 - EXIF shared module
php7-mod-fileinfo - 7.4.6-1 - Fileinfo shared module
php7-mod-filter - 7.4.6-1 - Filter shared module
php7-mod-ftp - 7.4.6-1 - FTP shared module
php7-mod-gd - 7.4.6-1 - GD graphics shared module
php7-mod-gettext - 7.4.6-1 - Gettext shared module
php7-mod-gmp - 7.4.6-1 - GMP shared module
php7-mod-iconv - 7.4.6-1 - iConv shared module
php7-mod-imap - 7.4.6-1 - IMAP shared module
php7-mod-intl - 7.4.6-1 - Note that this package depends in ICU library which is built without data by default. This is to satisfy programs build and run dependencies but to keep the installed footprint smal>
php7-mod-json - 7.4.6-1 - JSON shared module
php7-mod-ldap - 7.4.6-1 - LDAP shared module
php7-mod-mbstring - 7.4.6-1 - MBString shared module
php7-mod-mysqli - 7.4.6-1 - MySQL Improved Extension shared module
php7-mod-mysqlnd - 7.4.6-1 - MySQL Native Driver shared module
php7-mod-opcache - 7.4.6-1 - OPcache shared module
php7-mod-openssl - 7.4.6-1 - OpenSSL shared module
php7-mod-pcntl - 7.4.6-1 - PCNTL shared module
php7-mod-pdo - 7.4.6-1 - PHP Data Objects shared module
php7-mod-pdo-mysql - 7.4.6-1 - PDO driver for MySQL shared module
php7-mod-pdo-pgsql - 7.4.6-1 - PDO driver for PostgreSQL shared module
php7-mod-pdo-sqlite - 7.4.6-1 - PDO driver for SQLite 3.x shared module
php7-mod-pgsql - 7.4.6-1 - PostgreSQL shared module
php7-mod-phar - 7.4.6-1 - Phar Archives shared module
php7-mod-session - 7.4.6-1 - Session shared module
php7-mod-shmop - 7.4.6-1 - Shared Memory shared module
php7-mod-simplexml - 7.4.6-1 - SimpleXML shared module
php7-mod-snmp - 7.4.6-1 - SNMP shared module
php7-mod-soap - 7.4.6-1 - SOAP shared module
php7-mod-sockets - 7.4.6-1 - Sockets shared module
php7-mod-sqlite3 - 7.4.6-1 - SQLite3 shared module
php7-mod-sysvmsg - 7.4.6-1 - System V messages shared module
php7-mod-sysvsem - 7.4.6-1 - System V shared memory shared module
php7-mod-sysvshm - 7.4.6-1 - System V semaphore shared module
php7-mod-tokenizer - 7.4.6-1 - Tokenizer shared module
php7-mod-xml - 7.4.6-1 - XML shared module
php7-mod-xmlreader - 7.4.6-1 - XMLReader shared module
php7-mod-xmlwriter - 7.4.6-1 - XMLWriter shared module
php7-mod-zip - 7.4.6-1 - ZIP shared module
php7-pecl-dio - 0.2.0-1 - Direct I/O functions
php7-pecl-http - 3.2.3-2 - Extended HTTP Support
php7-pecl-libevent - 2019-05-30-ce255e7e1e293030951fd68d5df06b2a4c077a89-2 - Libevent - event notification
php7-pecl-mcrypt - 1.0.3-2 - Bindings for the libmcrypt library
php7-pecl-propro - 2.1.0-1 - Property proxy
php7-pecl-raphf - 2.0.1-2 - Resource and persistent handles factory
php7-pecl-redis - 5.2.2-1 - PHP extension for interfacing with Redis
php7-pecl-trader - 0.5.0-1 - Technical Analysis for traders
Alternatives:
1. Get a real Linux server (running on an Intel NUC or Raspberry Pi for example)
2. Install Debian on your QNAP NAS (link already provided, plus google will have more)
Godissar
First post
Posts: 1
Joined: Sun May 18, 2014 1:03 pm

Re: Updating PHP on QNAP NAS

Post by Godissar »

brongracz wrote: Tue Feb 01, 2022 5:13 am @jasona

Can you elaborate on this? How do I do it? Do I need to install the qpkg and the operate it via ssh?

[
Im not jasona, but try to answer....

Yes, you must install either Entware or Qpkg from qnapclub.eu.

In the second option, you will also get the latest version of the server (Apache or Nginx)

And if you are worried about outdated PHP, then you are intimately familiar with the hosting setup.

After that, the question about SSH looks strange. Of course, you need to be able to work with the SSH terminal or SFTP or similar App

Отдельное спасибо Goooogletranslate
alien9998
Getting the hang of things
Posts: 71
Joined: Tue Jan 29, 2013 2:30 pm
Location: Netherlands

Re: Updating PHP on QNAP NAS

Post by alien9998 »

Updating Qnap PHP 7.3 with the PHP-FPM file (7.4) worked like a charm.
Thank you for making my day.
Qnap TS-473; 4x WD Red 4TB; 2x Samsung EVO860 M2 500gb; Raid 6; 4 GB RAM Memory
Qnap TS-133; 1x Samsung 870 QVO 1TB; 2 GB Memory
Post Reply

Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”