Web server doesn't work with php after update QTS to version 4.4.1.0978

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
Post Reply
goranp
Starting out
Posts: 15
Joined: Thu Dec 30, 2010 1:15 am

Web server doesn't work with php after update QTS to version 4.4.1.0978

Post by goranp » Tue Jul 16, 2019 7:59 pm

Hello.
I have a Qnap TVS-1282T3. In that machine I had a webserver configurated and running (with php) before I updated the firmware to version 4.4.1.0978 public beta 2 yesterday.
After that webserver is working with .html files but not with .php files.

Everythings seems to be OK when i look at the configuring pages.
But something is still missing(?). I'm not able to find what.

Does anyone have some tip for me to look at ?

// Göran

goranp
Starting out
Posts: 15
Joined: Thu Dec 30, 2010 1:15 am

Re: Web server doesn't work with php after update QTS to version 4.4.1.0978

Post by goranp » Tue Jul 16, 2019 8:19 pm

Some more info.
I tested with a testpage, including the code "phpinfo()".
The result was positive, so i see that php is running. For me it means that I don't get any contact with the database.
Anyhow, I can call the database, (MariaDB), from external application (HeideSQL) in my computer, and i have also contact through phpAdmin withput any problem.

So, something has changed at the upgrade, but what?
Does anyone has a tip ?

john.woody
New here
Posts: 8
Joined: Mon May 27, 2019 10:48 pm

Re: Web server doesn't work with php after update QTS to version 4.4.1.0978

Post by john.woody » Tue Jul 16, 2019 11:19 pm

It could be your code needs updating. The MySQL extension has been removed in php version 7. The new extension is mysqli or pdo (I think is the other one). If it is this you will have to update all references to the MySQL extension in your pages. Google can give you more information...


Sent from my iPhone using Tapatalk
Qnap TS251+ 8Gig RAM 2 * 2Gig WD Red HHD RAID1 Firmware 4.4.1.1064

goranp
Starting out
Posts: 15
Joined: Thu Dec 30, 2010 1:15 am

Re: Web server doesn't work with php after update QTS to version 4.4.1.0978

Post by goranp » Thu Jul 18, 2019 4:30 am

Thanks john.woody, that's was the "missing trick"
I have made some test's, and see that I have some "homework" to do.

Thanks alot for the tip..

flashwebb
First post
Posts: 1
Joined: Sun Sep 22, 2019 9:02 pm

Re: Web server doesn't work with php after update QTS to version 4.4.1.0978

Post by flashwebb » Sun Sep 22, 2019 9:07 pm

Hi Göran

Did you find out what was wrong ??

I get this error after update tyhe firmware

Fatal error: Uncaught TypeError: Argument 1 passed to printException() must be an instance of Exception, instance of Error given in /share/CACHEDEV1_DATA/Web/flashwebb/includes/exception.php:27 Stack trace: #0 [internal function]: printException(Object(Error)) #1 {main} thrown in /share/CACHEDEV1_DATA/Web/flashwebb/includes/exception.php on line 27


I also test it with phpinfo...and the server is working

Peter

goranp
Starting out
Posts: 15
Joined: Thu Dec 30, 2010 1:15 am

Re: Web server doesn't work with php after update QTS to version 4.4.1.0978

Post by goranp » Wed Oct 09, 2019 12:55 am

flashwebb - I'm sorry, I forgot to answer you.
The main thing was that I used mysql_query, mysql_fetch_array, etc, in my php-code.
I had to change class to the mysqli-class. You can see more here, https://www.php.net/manual/en/book.mysqli.php.
Hope that it helps you ...

Pap76
New here
Posts: 2
Joined: Tue Apr 04, 2017 2:14 pm

Re: Web server doesn't work with php after update QTS to version 4.4.1.0978

Post by Pap76 » Thu Oct 10, 2019 2:48 pm

I have the same problem with a TS 251. It seems like php is not more available, I tried to run php - v but the php command is not recognized.
I opened a ticket to qnap, has anyone other suggestions?

Thanks

dolbyman
Guru
Posts: 14823
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Web server doesn't work with php after update QTS to version 4.4.1.0978

Post by dolbyman » Thu Oct 10, 2019 9:09 pm

if you have the same problem..then you need the same fix

update your code to be php7 compatible

otherwise you do not have the same problem

Pap76
New here
Posts: 2
Joined: Tue Apr 04, 2017 2:14 pm

Re: Web server doesn't work with php after update QTS to version 4.4.1.0978

Post by Pap76 » Sat Oct 12, 2019 5:43 am

You are right. I need to change code to php7.

Thanks

Post Reply

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