Do i need to install php after wamp?
Show
Setting Up Apache-MySQL/MariaDB-PHP (AMP) on Linux (LAMP), Windows (WAMP) and macOS (MAMP)IntroductionLAMP/WAMP/MAMP ServerTo develop PHP webapps, you need to setup Apache + MySQL + PHP under your operating system, in a so called LAMP (Linux-Apache-MySQL-PHP), WAMP (Windows-Apache-MySQL-PHP), or MAMP (macOS-Apache-MySQL-PHP) environment. There are two ways of setting up LAMP/WAMP/MAMP:
For beginners running on Windows/macOS, I certainly recommend the bundle approach for simplicity (although they might not bundled the latest releases). These are the bundles available:
I shall describe how to install and setup some of these bundles in the next section. Integrated Development Environment (IDE) and DebuggerYou also need to install an IDE, such as Eclipse PHP Development Tool (PDT) (read "How to install Eclipse PDT"), NetBeans, IntelliJ IDEA, or others. You need to setup these debugging tools and be familiar with:
Read Section "Debugging PHP Webapps". Programming LanguagesI shall assume that you have some basic knowledge on these programming languages. Otherwise, read the relevant sections.
Version Control System (Git)Set up a Version Control System, such as Git (on Github), for backup, version control and collaboration. Read "How to setup and get started with Git". LAMP/WAMP/MAMP ServersIn this section, I shall briefly describe how to install and customize some of the AMP bundles. To install individual components, read "How to install and get start with Apache", "How to install and get started with MySQL". XAMPP (For Windows/macOS/Linux)The XAMPP (@ https://www.apachefriends.org/index.html) stands for Cross-platform (X), Apache (A), MariaDB (formerly MySQL) (M), PHP (P) and Perl (P). It bundles the free and open-source Apache, MariaDB/MySQL, PHP and Perl, for Windows, Linux and macOS. It also includes PhpMyAdmin, FileZilla FTP Server, Mercury Mail Server, Tomcat Server; Webalizer and Fake Sendmail. At the time of writing (Apr 2021), XAMPP 8.0.3 bundles PHP 8.0.3, Apache 2.4.6, MariaDB 10.4.18 and PhpMyAdmin 5.1.0. See "Wiki XAMPP". Installing XAMPP on Windows
Installing XAMPP on macOS [@@To Check!!]
Starting/Stopping XAMPP ServersLaunch the "XAMPP Control Panel" (" The "XAMPP Control Panel" allows you to start/stop each of these servers: Apache HTTP Server, MySQL Database Server, FileZilla FTP Server, Mercury Mail Server, and Tomcat HTTP Server. You can also check their configurations ("Config"), logs ("Logs") and launch the administrator tools such as PhpMyAdmin for MySQL ("Admin"). Verifying the Apache/MariaDB Servers InstallationBy default, a directory called " To verify the installation, launch the "XAMPP Control Panel". Start the Apache and MariaDB/MySQL servers by clicking the "Start" buttons.
To shutdown XAMPP, stop all the services (servers) and press "Quit". Write a Hello-world PHP ScriptBy default, the Apache's document root directory is located at "
To run this PHP script, start a browser and issue URL Example "phpinfo": Write another PHP script called " Run the script by issuing URL " XAMPP Directory StructureXAMPP is organized in the sub-directories. The important ones are:
Apache ConfigurationThe Apache's main
configuration file "
PHP ConfigurationThe PHP's main configuration file " [TODO] Explanation MySQL ConfigurationThe MySQL's main configuration file "
Customizing MySQLThe default MySQL installation creates a superuser called "
You can administrate MySQL via PhpMyAdmin. See the "PhpMyAdmin" section. Start a new PHP WebappTo start a new PHP webapp, create you working directory under " For Production, configure a virtual host (in Apache) for your project. WampServer (For Windows)[TODO] Outdated! Need to Update. The cross-platform XAMPP (in the previous section) recommended. WampServer (@ http://www.wampserver.com/en/) bundles Apache, MySQL and PHP for Winodws in a single package. It also includes tools such as PhpMyAdmin (a MySQL database administration tool), SQL Buddy (an alternative to PhpMyAdmin), XDebug (a PHP Debugging Tool), WebGrind (a PHP Profiling Tool). At the time of writing (Sept 2014), WampServer 2.5 bundles Apache 2.4.9, MySQL 5.6.17, PHP 5.5.12, PhpMyAdmin 4.1.14, SqlBuddy 1.3.3 and XDbebug 2.2.5. Installing WampServerTo Install WampServer:
Starting/Stopping WampServerTo start the WampServer, choose "Start WampServer" from the "Start" menu; or run " An little icon will appear on the icon tray. "Green" indicates that all the services have started; while "Red" indicates that all the services have stopped. Click on the icon to open the "WampServer Control Panel". You could:
To shutdown the program, click "Stop All Services" on WampServer Control Panel ⇒ right-click on the WampServer icon ⇒ Exit. Verifying Apache/MySQL/PHP InstallationBy default, a directory called " To verify the installation:
Write a Hello-world PHP ScriptUse a programming editor (such as notepad++ for Windows, or gedit for Ubuntu/macOS) to write a simple PHP script called "
To run this script, start a browser and issue URL Another Example: Write another PHP script
called " Run the script by issuing URL " WampServer Directory StructureWampServer is organized in the following directory structure. The important ones are:
Apache ConfigurationThe Apache's main configuration file
"
PHP ConfigurationThe PHP's main configuration for Apache2 " [TODO] Explanation MySQL ConfigurationThe MySQL's main configuration file "
Customizing MySQLThe default MySQL installation creates a superuser "
See "PhpMyAdmin" section. Start a new PHP WebappTo start a new PHP webapp, create you working directory under " For Production, configure a virtual host (in Apache) for your project. LAMP Server (For Ubuntu)Read "How to Install LAMP Server on Ubuntu". PhpMyAdmin - PHP Apache Webapp for MySQL AdministrationPhpMyAdmin (http://www.phpmyadmin.net) is a popular open-source PHP webapp tool for administrating and manipulating MySQL/MariaDB database system. Installing PhpMyAdminPhpMyAdmin a PHP webapp which runs under the Apache Server. Hence, it is bundled with a AMP (Apache-MySQL/MariaDB-PHP) distribution, such as XAMPP. Launching PhpMyAdminPhpMyAdmin is an Apache PHP webapp. Typically, an alias called " To launch PhpMyAdmin, start Apache and MySQL servers. Then, start a browser and issue URL Setting or Changing MySQL/MariaDB root's PasswordAfter the installation, MySQL/MariaDB's superuser root has no password or has a randomly-generated password. We need to set/change the root's password immediately after installtion. Step 1: Change MySQL/MariaDB |