Page 1 of 1

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

Posted: Tue Jul 16, 2019 7:59 pm
by goranp
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

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

Posted: Tue Jul 16, 2019 8:19 pm
by goranp
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 ?

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

Posted: Tue Jul 16, 2019 11:19 pm
by john.woody
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

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

Posted: Thu Jul 18, 2019 4:30 am
by goranp
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..

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

Posted: Sun Sep 22, 2019 9:07 pm
by flashwebb
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

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

Posted: Wed Oct 09, 2019 12:55 am
by goranp
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 ...

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

Posted: Thu Oct 10, 2019 2:48 pm
by Pap76
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

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

Posted: Thu Oct 10, 2019 9:09 pm
by dolbyman
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

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

Posted: Sat Oct 12, 2019 5:43 am
by Pap76
You are right. I need to change code to php7.

Thanks