0

I am using QNAP Network Attached Storage with a built in Web Server and MySQL Database my model is QNAP TS-253

I have an issue regarding running my PHP application inside my QNAP Web Server. It runs perfectly when using my localhost , but when i upload it to the /Web folder in my file storage directory in My QNAP Server and ran the program inside the server, I encounter some issues, like some functions inside my PHP Application doesnt work(Connecting to database , executing php functions). I do not know where the problem lies. I think it only reads the HTML codes and ignores the php sections of the file but i am not sure.

Essentially what I did is enable Web Server(Without changing any configurations) and copy all the files in my PHP project to the default Web folder in the file storage of my QNAP Web Server. I use the MySQL database provided in QNAP (which I can access without any problems when I run my PHP application using localhost), but cannot be accessed when I run my PHP application from the QNAP Web Server.

Also, Everytime I login to the QNAP utilities and settings browser interface(the page where you can edit network settings and other configurations for your QNAP) I get a message that DNS cannot resolve hosts. I am not sure if this issue affects my PHP application from running in my QNAP Web Server.

Pleasehelp, I am happy to provide further details if needed

Adrian
  • 3
  • 2
  • 5
  • phpinfo(); will tell you what libraries and extension where compiled into PHP – John Oct 22 '15 at 04:10
  • I opened my phpinfo file and it showed that my PHP API and PHP Extension is "20090626" and PHP Extension Build is "20090626,NTS" what does this mean? thanks – Adrian Oct 22 '15 at 07:35

1 Answers1

0

One approach could be updating your PHP-version. QNAP is very restrictive in terms of PHP-updates. Therefore, you should check your PHP-version. Since QTS 4.2, QNAP included PHP 5.5 and MariaDB 5.5. Maybe, an update can solve your problems.

Another alternative could be installing this QPKG: http://forum.qnap.com/viewtopic.php?f=320&t=110391

This provides an Apache 2.4.12 (the built-in QNAP Apache is only at version 2.2) + PHP 5.6.10 (only for x86 CPUs). After this, you would have an up-to-date webserver with adequate PHP and database versions.

Hope this helps.

Ben
  • 1,579
  • 4
  • 20
  • 34