“installer PHP Windows 10” Réponses codées

installer PHP Windows 10

1. Download Thread safe 32/64 bit zip package PHP8 from 
   https://windows.php.net/download#php-8.0
2. Extract the zip package and paste the extracted folder onto your 
    desired drive( Drive C:\ for example)
3. Rename the folder to php8( or any name that you like)
4. One this folder and look for php.ini-development file
5. Make a copy of this file and rename copy version to php.ini
6. Open php.ini file with your preferred text editor and uncomment PHPIniDir “ext”
7. Save the file and close the editor.

## Set PHP 8 to System's Path
1. Open php8 folder and copy and folder path
2. Press Windows Key on your keyboard and type 'variable' and hit Enter
3. Click Environment Variables
4. Click Edit and Click NEW on the right
5. Paste the php8 folder path
6. Click OK, OK, OK

## Installing composer
Run the following commands
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '795f976fe0ebd8b75f26a6dd68f78fd3453ce79f32ecb33e7fd087d39bfeb978342fb73ac986cd4f54edd0dc902601dc') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

QUICK QUESTION: Have you heard of Windows SubSystem for Linux (wsl)? 
Check it out
Bug Killer

installer php

To install laravel v9 you will need apache2, php8 and composerv2 (Ubuntu 20.04/Ubuntu 18.04)
sudo apt update
sudo apt upgrade

Install and start apache2
sudo apt install apache2
sudo service apache2 start
Open: http://localhost:80
sudo service apache2 stop

Install php8
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update
sudo apt-get install php8.0 php8.0-cli php8.0-common php8.0-xml php8.0-curl
php -v

Enable mods
sudo a2enmod php8.0
sudo a2enmod headers
sudo a2enmod rewrite

Install composerv2
cd /home/user
curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
compsoer -V

Install laravel project
composer create-project laravel/laravel example-app
php artisan key:generate --ansi
php artisan serve

Configuration file for apache2 example
cd /etc/apache2
sudo a2dissite 000-default.conf
cd /sites-available
sudo touch appName.conf

sudo nano appName.conf
Copy, paste and configurate:
---------------------------------------------------------------------------------
<VirtualHost *:80>
	ServerName name.local

    // If project is based on multiple env (admin/frontend)
	SetEnv ACTIVE_MODULE frontend
	
	DocumentRoot "pathDirectory/laravel/public"
	<Directory "pathDirectory/laravel/public">
	    Options Indexes FollowSymLinks MultiViews
	    AllowOverride All
	    Require all granted
	    Order allow,deny
	    Allow from all
	</Directory>

	ErrorLog /var/log/apache2/fileName.err
	CustomLog /var/log/apache2/fileName combined
</VirtualHost>
---------------------------------------------------------------------------------

sudo a2ensite appName.conf
sudo service apache2 restart
or
sudo service apache2 start
calyCoder

Comment télécharger PHP pour Windows 10

If you are (probably) downloading it for development environment,
Use "Laragon". Simple, performant and best batteries-included software 
with PHP, MySQL,MariaDB, Python, Java, and more...

laragon.org
Spotverge

Réponses similaires à “installer PHP Windows 10”

Questions similaires à “installer PHP Windows 10”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code