Setting Up PHP and MySQL Development Environment - php

I'm building a website with PHP and using MySQL as the database, so I need help setting up the development environment. I want to execute and test the PHP scripts locally, with all the local database connections and all the operations possible on database by PHP scripts.
I'm on Windows and I've installed MySQL and Eclipse IDE for PHP, so how do I connect these two applications, so that the scripts related to database can directly execute queries on this MySQL installation? Also the Eclipse IDE isn't able to execute the scripts on localhost, it returns this error "The webpage cannot be found".
So how can this be solved and connections be made to MySQL?

Are you able to connect your website to the database? What server are you using? WAMP or XAMPP? You need to first install the server. You can install wamp from here http://www.wampserver.com/en/.
This would be your starting point.

Related

Moving databases from XAMPP to a standalone MySQL 8 server

before I used xampp to start mysql server but recently I installed mysql server 8 and I need to transfer old databases that are in data folder in xampp to data folder that is in mysql server 8 but when I did that I get error when I try to restart mysql service. Can somebody explain to me how should I go about this?
I tried to change all files that is inside of mySql server 8 Data folder but it doesn't work, I still get the same issue.
Xampp is based on mariadb and its version is relatively low, so there will be problems directly by copying the directory. It is recommended to export and import through mysqldump.In addition, it is necessary to ensure that they use different ports, otherwise there will be port conflicts and the database will not start.

PHP development without xampp

I have machine on which I lack admin privileges. I was not able to install xampp server on it. So I tried portable version of xampp. But I was getting error while starting Apache server and MySQL. The log file is not getting created.
Also many tutorials online use NetBeans which is also I am not able to install due lack of admin privileges.
I have postgres and apache tomcat working on my machine, which I used for Java Spring development. I also have eclipse installed on my machine. So I was thinking if I can manually configure eclipse, postgres, tomcat to develop php without installing xampp or netbeans.
Is it possible? If yes how do I do it? Is there any tutorial / link / webpage explaining the same?
If you can install jetbrains PhpStorm it has a built in server but due to lack of privileges i think it is not posiible though, so here are two links i have for you, hope you will able to find an answer..
https://www.eclipse.org/articles/article.php?file=Article-EclipseDbWebapps/index.html
https://www.enterprisedb.com/postgres-tutorials/how-connect-postgres-database-using-eclipse-and-netbeans
if you use php framework like laravel, cakephp etc.
Those have own development server to run application.
and for the database you can use sqlite database.
that not require xampp server

Is it possible to configure Apache2 to load PHP with different modules per vhost?

I have a server with Apache2, that used to handle my target site and phpmyadmin for site's DB. Both phpmyadmin and site are using PHP 7.4. I need xDebug to debug my site, but it is loaded for phpmyadmin too, so phpmyadmin slows down and tries to load connect to my IDE. Can I turn off xDebug for phpmyadmin and keep it on for another virtual host?

Running My PHP Application in Web Server

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.

How to upload PHP and MySQL into a webserver

I am developing a site in vertigoserver. Now I need to test the webpage in webserver.
I am using the webserver Host-Europe VirtualServer 3.0.
Now what are the steps I need to upload the PHP pages?
What is the software needed to upload MySQL queries?
Are there any tutorials or suggestions?
This seems like basic stuff, but I'll give you some pointers!
Upload the pages with an FTP client or similar. If you have shell access, tools like rsync can make this easier.
You've probably got some sort of web based front end for MySQL like phpMyAdmin - this will let you upload and restore a database dump. If you have shell access, or if the MySQL server is open to the Internet, you can pipe the dump into the MySQL command line client, for example,
mysql -h<hostname> -u<username> -p<password> mydatabase < dump.mysql
Okay, you got a virtual machine and don't know how to upload stuff? This has been discussed in Host-Europe forums for a while. If you don't know the basics you probably don't want to run a server on your own. If you don't know how to use Linux don't start with a machine which can get you in a lot of trouble. A hosting package is probably better you at the moment.
The problem I have is you didn't specify what OS you have. If you're using Linux with Plesk you want to activate FTP, etc. If you are using Linux without Plesk you want to upload the PHP files with WinSCP and over SSH (SCP).
If you are running Windows with Plesk use FTP. If not, you should install an FTP server on the machine.
Regarding the MySQL stuff you're probably best off installing a webfrontend for MySQL.
!DON'T FORGET TO SECURE IT!

Categories