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
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.
Related
I get the error when I open my VS. I´m working with, or on, files directly on the server, using SimpleFTP to synch between computer/Server. That means the files are loaded, and saved, directly from/to my server (yes, they are cached om the computer...).
This also means that a have the PHP installed on the server - not my computer/PC. Is it possible to use the server-installation of PHP, or do I need to install a PHP extension on my PC?
If I can use the server PHP installation - How do I set the path? I´m running Raspberry/Apache...
Hopefull for any respons...
using FTP you can only transfer/sync files. For running php command line is necessary. Better approach is to use ssh. On vscode using Remote - SSH official extension you can access complete developer environment.
I'm an absolute beginner when it comes to PHP. I have a standard html/css/js project that I'm editing with VS code and running a development server with the Live Server extension, which is running on localhost:5500.
I'd like to integrate a single .php file into my project which will handle a form submission.
Will I need xampp running on my local machine in order for the .php file to work?
At the moment the form action is sending a post request to my .php file but I get a 405 error from the browser.
Yes, A PHP processor is needed for the PHP code to work. If you have XAMPP installed (which means you have php), you can run
php -S localhost:5501 (make sure C:/xampp/php is in your PATH environment variable)
in the root directory of your project, this will start a PHP server and you don't have to move everything to the htdocs folder.
You need a server capable of processing PHP.
That doesn't need to be Apache HTTPD. If you do pick Apache HTTPD then you don't need to install it as part of XAMPP.
The Live Server extension is not capable of processing PHP so you need a different server. (I think I saw a PHP capable equivalent in the extensions library in VS Code, but I recall it being quite fiddly to configure.)
Yes, you need a server (apache or nginx) + php.
Xampp include all this in one application: x (SO) A (apache) M(mysql) P(perl) P(php)
Previously I used shared hosting, and the hosting company provided Apache Tomcat with PHP and MySQL. I have since switched to virtual private server hosting with Linux, so I can use a server of my choice, in particular Glassfish 4.1.1 for Java ServerFaces 2.2 applications, and have already deployed a war file for a particular application.
However, I have quite a lot of old code, including some PHP. I have put my old code in Glassfish's docroot folder and all the straight HTML5, JavaScript etc. work without any problems. How do I get the PHP code to work as before? In doing a Google search, it appears possible to deploy a war file from Quercus, but if this is done, how do I get PHP to work in the docroot folder?
I'm not aware of anybody who has done this before, so any advice would be most appreciated - thanks in advance.
I used GlassFish before with JSP. Now PHP has become the language of my choice. I feel like it's much more maintainable.
But to answer your question, in order to get PHP to work in the docroot server, you have to enable PHP on OracleGlassFish Server. From Oracle documentation :
1. Download the Quercus PHP interpreter from http://quercus.caucho.com/.
2. Deploy the downloaded WAR file to the GlassFish Server.
3. To verify that your PHP engine is working, enter the following URL in your browser:
http://localhost:8080/quercus-4.0.1/
4. Move your PHP application to a subdirectory of the Quercus directory.
5. To verify your PHP application is working, access your application from a browser.
For example, enter the following URL in your browser:
http://localhost:8080/quercus-4.0.1/myapp/
Also, this previous answer from SO may also help :
Allow Glassfish and PHP to work together in the same server using Apache
I'm trying to set up a PHP server. We have an old server that runs a bunch of in house forms over an intranet that is coded in ASP, and I'm trying to rebuild that into a better system using PHP.
I'm starting fresh, as have been given a Win 2012 r2 server.
I first tried installing IIS 8. I installed downloaded the files for php (version 7). I was successful in being able to access index.html and any other files placed in the c/inetpub/wwwroot folder from a different PC via a browser (http://servername/file.php). However, I installed MariaDB and phpmyadmin. phpmyadmin gave the the message the mysqli extension is missing.
I ultimately uninstalled IIS, and PHP, and the MariaDB. I wanted to start from scratch, and tried with Apache
I was able to get Apache and PHP to work together, but I could not access files in the htdocs folder from a different PC (going to http://<servername>/file.php). I could only access it via localhost.
I had the same problems with phpmyadmin and mysqli.
I also noticed there was no php.ini file... rather I saw a php-ini-production and php-ini-development files.
How to I fix the phpmyadmin problem? Any advice for configuring apache so that I can access files place in the htdocs folder from a device other than the server itself (non-localhost)?
I recommend using XAMPP, then you'll have MySQL, and may be you could configure to use MariaDB as well.
If you use XAMPP, phpmyadmin is not available other than localhost, but that is configurable. If you want i can help you find a good video for that.
take the php-ini-production file and rename it to php.ini and find the line
;extension=php_mysqli.dll
and just remove the leading semicolon (;), save and restart apache.
Also you need to open the firewall on your machine to allow port 80 to accept all connections.
HI I am trying to configure IIS7 to run PHP on a windows 2008 server machine.
I have followed this guide, php running on IIS7
Everything went well and I am sure it was working!!
However now when I try and run phpinfo.php the browser wants to download the page rather than running the script.
The handler mapper is configured the same as the the example. fastCGI/CGI is installed and enabled.
a normal index.html open no problem.
I have checked permissions, created a new empty site apart from phpinfo.php
I developed the site on my pc in a xampp environment where everything work great. First time I have tried to convert a site from xampp to IIS.
Their is no entry in the MIME Types, I am wondering if the WEB.CONFIG file is the issue but I don't know enough about what the file should/shouldn't contain.
thanks for any help
you can use http://php.iis.net/ to install php into your IIS setup. It comes with a manager to help you easily implement php in to your iis server and is way easier then trying to configure it manually. Hope this helps.