Apache Php Windows 10



  1. Apache Mysql Php Windows 10
  2. Apache 2.4 Install Windows 10

By installing WAMP server on your windows you can run Apache, PHP, and MySql under a single package. Run sample PHP and MySql script.

How To Install PHP On Your Windows Computer? Now its time to install PHP, so keep following our steps carefully 1) Visit php.net and click on downloads. 2) Click on “Windows downloads” (because, we want for windows) 3) Now choose ZIP file of latest stable verison of PHP, according to your windows compatibility. 4) Download it & Extract the ZIP in a folder. 5) Now go to create a folder named PHP in. In this video, I show you how to install PHP on Windows 10 with the Apache Web server already installed.@CodyHelscel. Windows 10 Apache 2.4 PHP 7 MySQL 5.7 installation tutorial Time:2020-4-22 Recently, I have been tossing over the installation process of PHP environment under win10. Troubleshooting PHP on Windows; Installation on old Windows systems; Installing PHP on modern Microsoft Windows systems and recommended configuration with common web servers. Note: If you are looking for information about older systems, such as Windows XP, 2003, 98 or Apache 1.x, see the Legacy Info section. The Official releases of PHP on.

In traditional web development environment to run PHP and MySQL on your machine, you need to install Apache, PHP and MySQL servers as a separate entity so that most of the time you’ll end up in seeing errors.

Rather than installing each server separately, how about installing a single package which contains all 3 servers? Yes, that is were WAMP comes into the picture.

WAMP is an open source web development package which in turn stands for Windows Apache MySql and PHP. WAMP is a package for the only windows environment, for any other platform like Linux, Apple OS you can use XAMP.

Advantages of using WAMP or XAMP

  • No need to install Apache, PHP and MySql servers separately.
  • Easy to manage and configure all functionality under a single menu.

Installing WAMP for Windows 10 and 7

The whole process is automatic and WAMP will take care of all major steps for you. Let’s see where I can find WAMP and what changes are necessary during installation.

  • Download the latest version of wamp server from wamp server website.
  • Run the installer, after accepting their agreement you will prompt to WAMP server location usually c:/wamp/. keep it as it is and click on next for all subsequent windows.
  • You may ask for set your preferred browser and text-editor. leave default if you like else, change it.
  • Finally, it will ask you to run wamp server or not. Make sure run wamp checkbox checked and click on the button below to run wamp server.

If everything is going well, you see a green wamp icon running on your system tray.

Error: Usually after the application launch, wamp icon color changes from red to green state(wait for some seconds).Even after waiting if you see a color of wamp icon other than green like red or orange, then there may be some errors. Find wamp server possible errors at the end of this article.

Setup MySql database

  • Click on wamp server icon on your system tray and go to phpMyAdmin.
  • you get a browser window asking for username and password. Type root as username and don’t enter anything in the password field(by default phpMyAdmin comes with root as MySQL username), Click on the login button to log in. You may set the password after login, under general settings → change password. Set root as password if you like.
Apache Php Windows 10

You are done with setting up MySQL database, Now it’s time to run some simple PHP programs.

Sample program to test

Download

1. Simple Hello world! program.

  • Create test.php file inside c:/wamp/www/ folder.
  • Copy the below code, paste it there and save the file.
  • Now, open your web browser and type http://localhost/test.php you see the output as below.

2. Sample program to fetch data from database.

Here is the step by step procedure to create database and tables.

Adding database and tables into MySQL from phpMyAdmin.

Goto wamp icon → phpMyAdmin. From the left menu of phpMyAdmin page click on New button. Type the database name as “test” and click on create to create a new database.

After creating a database it will automatically prompt a window to create a table into it. Type table name as tbl_test, number of fields as 3 and click on create to create the table.

Further, it will ask for datatype and size. Enter data shown in below image and click on go.

Inserting values into the table.

With table selected in left menu click on insert button(tabbed menu on top) and enter the data as shown in below image. Click on go button to add your first row to the table.
You are done with adding data into the table. Now, will see how to fetch those data from PHP.

Fetching data from MySql using PHP

    • Create test_db.php file inside c:/wamp/www/ folder.
    • Copy the below code, paste it there and save the file.
  • Now, open your web browser and type http://localhost/test_db.php to run the program.

The below portion of the article is only for one who finds an error while installing WAMP.

Possible errors while installing WAMP

1. Missing VCRUNTIME140.dll error

This error can be solved by downloading a newer version of visual c++ redistribution from Microsoft. Below is the link for visual c++ 2015 redistribution package, download and install it(both 32bit and 64bit versions available and make sure you are downloaded the same version you are running in).

Uninstall WAMP and Reinstall.

2. Missing MSVCR110.dll error

Solved by installing visual c++ 2012 redistribution from Microsoft. Below is the link for visual c++ 2012 redistribution package, download and install it(both 32bit and 64bit versions available and make sure you are downloaded the same version you are running in).

Uninstall WAMP and Reinstall.

3. Port used by Microsoft IIS Server

Apache 2.4 install windows 10

This is the very common issue in Windows 10 and 7. Even after proper installation wamp icon does not turn to green. The reason is the port which is assigned to apache server is used by some other services on your PC(usually IIS Server).

Let’s check which service is using port 80. Go to wamp icon → Test the port 80.

If the port is used by IIS server here is the fix. Go to Services(Go to start menu of your windows
and start typing services to search for it), scroll to the bottom and find World Wide Web Publishing Services right click on it and disable.

Apache Mysql Php Windows 10

Now exit your wamp from the tray by Right click and exit then run it again.

Related Posts:


Apache Php Windows 10

Apache 2.4 Install Windows 10

PHP 5.2.9.2 Install on XP Pro IIS 5.1 - phpinfo( ) results incorrect
Testing Date: 05.15.09
Background:
For several days now I, as a newbie, have been unsure if I had installed PHP correctly, or not. No matter what I did phpinfo( ) reported 'Configuratin File Path' as: “C:WINDOWS”. I was left to wonder what was wrong.
To help resolve the phpinfo() “issue”, I conducted a series of tests using two scripts:
The first is “test-php-ini-loaded.php”; it is stored in c:inetpubwwwroot, and has the following code:
<?php
$inipath
= php_ini_loaded_file();
if (
$inipath) {
echo
'Loaded php.ini: ' . $inipath;
} else {
echo
'A php.ini file is not loaded';
}
?>

The second script is simply calls phpinfo( ). It is named test.php, is stored in “c:inetpubwwroot”, and has the following code:
<?php phpinfo( ); ?>

My Dev Environment:
1. Windows XP Pro SP3
2. IIS 5.1 / MMC 3.0
3. PHP 5.2.9.2 – phpMyAdmin not yet installed
4. (plus MySQL 5.1, etc.)
5. Install location is on my local E: drive
The Tests:
Test 1:
a. PHPRC environment variable and IniFilePath Registry left in place and active
b. Verified no other copies of php.ini exist on the system other than in my E:PHP folder
c. Renamed php.ini to hold-php.ini
d. Stopped and started IIS (“net stop iisadmin” and “net start w3svc”)
e. Ran “test-php-ini-loaded.php” to check whether my php.ini is loaded. It is not.
f. Ran 'test.php'. “Loaded Configuration File” was empty, while “Configuration File (php.ini) Path” showed: C:WINDOWS.
Test 2:
a. Moved php.ini from E:PHP to C:WINDOWS
b. Stopped and started IIS
c. Ran 'test-php-ini-loaded.php' to check if my php.ini is loaded. It is not, which surprised me.
d. Ran 'test.php'. My php.ini is apparently not loaded, or found, by phpinfo( ), even though “Configuration File (php.ini) Path” reports it as being in C:WINDOWS.
e. Note: Per PHP’s “The configuration file” note, PHP's search order includes: “Windows directory (C:windows or C:winnt) (for Windows), ...”; but it apparently doesn’t or php.ini would have been found and displayed at “Loaded Configuration File”.
Test 3:
a. Left the solo copy of my php.ini in C:WINDOWS
b. Disabled PHPRC environment variable by renaming it to “Ex-PHPRC and saving the settings (note: for this test I left the Registry entry for PHP IniFilePath intact)
c. Stopped and started IIS
d. Ran 'test-php-ini-loaded.php' to check whether my php.ini is loaded. Predictably it is not found.
e. Ran the 'test.php'. Again, my php.ini file is reported as not found in C:WINDOWS though “Configuration File (php.ini) Path” reports it as being there.
Test 4:
a. To be thorough and eliminate all possible sources of “mis-direction” I deleted the PHP IniFilePath Registry entry (after backing up the Registry). The PHPRC environment variable was left disabled.
b. Stopped and started IIS
c. Ran 'test-php-ini-loaded.php' to check whether my php.ini is loaded. Predictably it is not.
d. Ran 'test.php'. Again, no change. My php.ini file is not found “Configuration File (php.ini) Path” reports it as being there.
Conclusions:
The first conclusion I came to is that, in the default download version of phpinfo( ), “Configuration File (php.ini) Path” is hard-wired to report C:WINDOWS whether php.ini is there or not. Further, that C:WINDOWS is not a default search location (at least not on XP).
However, given an otherwise “proper” setup, phpinfo() reporting C:WINDOWS as the value for “Configuration File (php.ini) Path” is merely misleading and is not actually harmful or indicative of a failed installation.
Thanks go to Peter Guy of www.peterguy.com who suggested the testing, and to Daniel Brown of www.php.net for some initial guidance.
P.S. This note is not meant to take anything away from PHP. It is a fine tool. The sole purpose of the testing was to confirm that my installation of PHP was correct.