How to Enable php 5.3.9 after firmware update to 3.7.1

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.

How to Enable php 5.3.9 after firmware update to 3.7.1

Postby BigMac222 » Mon Jul 02, 2012 11:56 am

I have just updated the firmware on my TS-212 to 3.7.1. When I run phpinfo.php it still returns "PHP Version 5.2.14"

How do I access the upgraded version of php? This is an important part of the upgrade for me and I assumed that it would have upgraded automatically with the new firmware. I would like to install the newer versions of moodle (2.1, 2.2 & 2.3) on the NAS for testing & development.

Any help would be greatly appreciated.

Thanks in advance,

Craig.
BigMac222
New here
 
Posts: 8
Joined: Mon Jul 02, 2012 10:47 am
NAS Model: TS-112

Re: How to Enable php 5.3.9 after firmware update to 3.7.1

Postby schumaku » Mon Jul 02, 2012 7:19 pm

Re-apply the firmware update - I doubt your NAS firmware update was succesful.

Follow the guideline here for example: http://wiki.qnap.com/wiki/Manually_Updating_Firmware
User avatar
schumaku
Guru
 
Posts: 22202
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
NAS Model: TS-x79 Pro

Re: How to Enable php 5.3.9 after firmware update to 3.7.1

Postby 321liftoff » Tue Jul 03, 2012 10:47 pm

It's possible that the firmware upgrade went well. Try running:
Code: Select all
/mnt/ext/opt/apache/bin/php --version

which should output: PHP 5.3.9 (cli) (built: Jun 15 2012 03:31:24)

If that works well, you may have an older version, possibly installed with ipkg, that's overriding the newer php. Maybe try
Code: Select all
ipkg remove php

and see if that helps?
321liftoff
Know my way around
 
Posts: 142
Joined: Sat Oct 22, 2011 6:54 pm
NAS Model: TS-219P+

Re: How to Enable php 5.3.9 after firmware update to 3.7.1

Postby aesculus » Wed Jul 04, 2012 1:16 am

If I wanted to downgrade PHP to the version in 3.7.0 could I just delete the /mnt/ext/opt/apache/bin/php file and then install the 3/7/0 firmware to replace it? Are there other PHP files that would have to be changed too?

If you just reinstall the older firmware the tool keeps the newer PHP file.
Chris
User avatar
aesculus
Easy as a breeze
 
Posts: 253
Joined: Fri Dec 14, 2007 11:17 am
NAS Model: TS-859U-RP+

Re: How to Enable php 5.3.9 after firmware update to 3.7.1

Postby BigMac222 » Thu Jul 05, 2012 9:02 pm

Thanks shumaku & 321liftoff,

After doing a little research & installing PuTTY I have done the following.

In the hope that firmware upgrade was successful (given that the QNAP admin GUI (..System Administratio/Firmware Update) says that the current Firmware is 3.7.1 Build 20120615) so ran "/mnt/ext/opt/apache/bin/php --version" as above which returned the old php version (5.2.14) - so no joy.

So I then followed the instructions on the wiki re manually updating firmware - except that I downloaded the 3.7.1 version to my desktop and unziped using windows, then copied it over to the NAS share\Public directory as per instructions rather than unzip it on the NAS via SSH. I then followed the instructions to the letter (except changing the filename to TS-212_3.7.1_20120615.img) Everything seemed to go as planned intil step 3 - run the update script which returned the following error:

/sbin/lock_system_update: symbol lookup error: /sbin/lock_system_update: undefined symbol: lock_system_update
cat: /mnt/update/newver: no such file or directory

I am not familiar with linux at all so I have no idea how to proceed.

Help please. Again.

Thanks,
Craig.
BigMac222
New here
 
Posts: 8
Joined: Mon Jul 02, 2012 10:47 am
NAS Model: TS-112

Re: How to Enable php 5.3.9 after firmware update to 3.7.1

Postby schumaku » Thu Jul 05, 2012 9:30 pm

It's a non-supported, pure trial-and-error approach, baed on a (well, lot...) of QNAP and systems management experiences - it requies editing a file on the NAS Linux shell, and addding an intermediate step to overcome the newver issue - not difficult, but this is neither user-frienldy nor very easy at all:

viewtopic.php?f=11&t=60459&p=274292#p274292

No, I don't blame anybody not following my experimental or tech approach - everybody experiencing this issue is encouraged to contact QNAP support.
User avatar
schumaku
Guru
 
Posts: 22202
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
NAS Model: TS-x79 Pro

Re: How to Enable php 5.3.9 after firmware update to 3.7.1

Postby BigMac222 » Thu Jul 05, 2012 10:16 pm

Thanks schumaku,

I've checked the link above, and a couple of links in that thread too and I agree with the general concensus - an update should just work, especially when distributed by the manufacturer. The steps described to get the update to work are a little bewildering to say the least. Very frustrating. The NAS seems to be working ok, though it is indicating vrsion 3.7.1 as the current version but without some of the enhancements.

My next question is will the live update still work. Currently it says that I have the most upto date version, so what is likely to happen in the future?

Ta,
Craig.
BigMac222
New here
 
Posts: 8
Joined: Mon Jul 02, 2012 10:47 am
NAS Model: TS-112

Re: How to Enable php 5.3.9 after firmware update to 3.7.1

Postby schumaku » Thu Jul 05, 2012 11:01 pm

Afraid, you won't be able to run any current or future updates - the issue will be carried forward, because of the status of ths sytem is inconstent, binaries (commands) are linked to different non-compatible libraries I'd say.
User avatar
schumaku
Guru
 
Posts: 22202
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
NAS Model: TS-x79 Pro

Re: How to Enable php 5.3.9 after firmware update to 3.7.1

Postby BigMac222 » Fri Jul 06, 2012 12:25 pm

What are the implications of editing update.sh and making an error?

Is it possible to save a copy,of the original, and if things go wrong restoring the original?
BigMac222
New here
 
Posts: 8
Joined: Mon Jul 02, 2012 10:47 am
NAS Model: TS-112

Re: How to Enable php 5.3.9 after firmware update to 3.7.1

Postby schumaku » Fri Jul 06, 2012 8:33 pm

BigMac222 wrote:What are the implications of editing update.sh and making an error?
Things can go wrong or fail...
BigMac222 wrote:Is it possible to save a copy,of the original, and if things go wrong restoring the original?
sure - but when you realize that things went wrong, it might be to late.

After a reboot, the update.ch will fall-bac to the default anyway - as it's held in the ram disk.
User avatar
schumaku
Guru
 
Posts: 22202
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
NAS Model: TS-x79 Pro

Re: How to Enable php 5.3.9 after firmware update to 3.7.1

Postby BigMac222 » Fri Jul 13, 2012 1:47 pm

I have now contacted QNAP support and await their response. How long does that generally take?
BigMac222
New here
 
Posts: 8
Joined: Mon Jul 02, 2012 10:47 am
NAS Model: TS-112

Re: How to Enable php 5.3.9 after firmware update to 3.7.1

Postby schumaku » Fri Jul 13, 2012 4:25 pm

Support works on "best effort" base. Might be worth to ping them by Sykpe chat from time to time, too.

But then - I have prepared an easier process: viewtopic.php?f=11&t=61185&p=276270#p276270
User avatar
schumaku
Guru
 
Posts: 22202
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
NAS Model: TS-x79 Pro

Re: How to Enable php 5.3.9 after firmware update to 3.7.1

Postby BigMac222 » Sun Jul 15, 2012 12:22 pm

Shumaku - you are a dead set legend :)

I just followed your instructions above and BAM - have now updated the firmware to 3.7.1 with phpinfo.php now indicating PHP Version 5.3.9.

I still have not heard back from QNAP Support so am most greatful - or maybe they prefer to leave their support to some dedicated people like your good self working through public forums.

In any case I am very happy now.

Many thanks.

Kind Regards,
Craig.
BigMac222
New here
 
Posts: 8
Joined: Mon Jul 02, 2012 10:47 am
NAS Model: TS-112

Re: How to Enable php 5.3.9 after firmware update to 3.7.1

Postby schumaku » Sun Jul 15, 2012 7:50 pm

Appreciated 8)

With the coming-up 3.7.2 firmware, PHP will be updated to 5.3.14, so the latent security vulnerabiity will be gone, too.
User avatar
schumaku
Guru
 
Posts: 22202
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
NAS Model: TS-x79 Pro


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

Who is online

Users browsing this forum: christiangd and 4 guests