-
-
Notifications
You must be signed in to change notification settings - Fork 48
Installation Guide
Keramat Jokar edited this page Oct 7, 2024
·
4 revisions
First, download Laragon from the following link:
- Open the downloaded installer (
laragon-wamp.exe
). - Follow the installation steps:
- Choose the installation path for Laragon.
- Accept the default settings (or customize if necessary).
- Click Install to begin the installation process.
- After installing Laragon, navigate to the installation directory (e.g.,
C:\laragon
). - Go to the
bin\php
folder. - Download PHP 8.3 from PHP website.
- Extract the contents of the downloaded file into a folder named
php-8.3.x
inside thebin\php
directory. - To switch to PHP 8.3 in Laragon:
- Open Laragon.
- Go to Menu > PHP and select PHP 8.3 from the list.
- Navigate to
C:\laragon\bin\apache
. - Download Apache 2.4.62 (win64) from Apache Lounge.
- Extract the contents of the downloaded file into a folder named
httpd-2.4.62-win64-VS17
inside thebin\apache
directory. - To switch to Apache 2.4.62 in Laragon:
- Open Laragon.
- Go to Menu > Apache and select Apache 2.4.62 from the list.
- After making the changes, restart Laragon.
- You should now be able to use PHP 8.3 and Apache 2.4.62.
- To verify that everything is set up correctly, you can check the PHP and Apache versions from Laragon’s Terminal:
- To check the PHP version: run the command
php -v
. - To check the Apache version: run the command
httpd -v
.
- To check the PHP version: run the command
Now your Laragon setup is ready with PHP 8.3 and Apache 2.4.62!
To install Apache on a Linux system (such as Ubuntu or Debian), follow these steps:
-
Update the package list:
sudo apt update
-
Install Apache:
sudo apt install apache2 -y
-
Start and enable Apache to run on boot:
sudo systemctl start apache2 sudo systemctl enable apache2
- Verify Apache installation: Open your web browser and navigate to http://localhost. You should see the Apache default page.
-
To install PHP 8.3:
sudo add-apt-repository ppa:ondrej/php sudo apt update
-
Enable the PHP 8.3 module for Apache:
sudo a2enmod php8.3
-
Restart Apache to apply changes:
sudo systemctl restart apache2
To enable the following PHP extensions: mysqli
, curl
, openssl
, soap
, mbstring
, json
, zip
, gd
, intl
, and gmp
, follow these steps:
- Navigate to your PHP installation directory (e.g.,
C:\laragon\bin\php\php-8.3.x
). - Open the
php.ini
file using a text editor (e.g., Notepad). - Search for the extensions you need to enable by finding lines similar to the following:
;extension=mysqli ;extension=curl ;extension=openssl ;extension=soap ;extension=mbstring ;extension=json ;extension=zip ;extension=gd ;extension=intl ;extension=gmp
- Remove the semicolon ; from the beginning of the lines to uncomment and enable the extensions:
extension=mysqli extension=curl extension=openssl extension=soap extension=mbstring extension=json extension=zip extension=gd extension=intl extension=gmp
- Save the php.ini file and restart your web server (Laragon, Apache, or Nginx) for the changes to take effect.
To enable the following Apache modules: mod_rewrite
, mod_headers
, mod_expires
, mod_deflate
, and mod_filter
, follow these steps:
- Navigate to the Apache installation directory (e.g.,
C:\laragon\bin\apache\httpd-2.4.62-win64-VS17
). - Open the
httpd.conf
file using a text editor. - Search for the following modules:
#LoadModule rewrite_module modules/mod_rewrite.so #LoadModule headers_module modules/mod_headers.so #LoadModule expires_module modules/mod_expires.so #LoadModule deflate_module modules/mod_deflate.so #LoadModule filter_module modules/mod_filter.so
- Remove the # at the beginning of the lines to enable the modules:
LoadModule rewrite_module modules/mod_rewrite.so LoadModule headers_module modules/mod_headers.so LoadModule expires_module modules/mod_expires.so LoadModule deflate_module modules/mod_deflate.so LoadModule filter_module modules/mod_filter.so
- Save the httpd.conf file and restart Apache to apply the changes.
Now your Apache setup is configured with the required modules. Open your domain.