Skip to content

Instantly share code, notes, and snippets.

@ajcastro
Forked from BARNZ/Laragon + PHP 8.1
Created May 10, 2022 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajcastro/8bd8ca530295d34773663ac8e12e1627 to your computer and use it in GitHub Desktop.
Save ajcastro/8bd8ca530295d34773663ac8e12e1627 to your computer and use it in GitHub Desktop.
My notes for upgrading laragon to work with latest apache and php8.1
Update to laragon 5:
- Stop all running services in laragon
- Make sure laragon itself is properly closed
- Download the latest laragon.exe and overwrite your original laragon.exe
https://github.com/leokhoa/laragon/releases/download/5.0.0/laragon.exe
Update to latest apache
- Download the latest apache 2.4 VS16 for windows (Apache 2.4.x OpenSSL 1.1.1 VS16):
https://www.apachehaus.com/cgi-bin/download.plx?dli=QYu9WeUlXW41ERJFDU6ZkVNlnRUNlVSZEcER2SOJTV
- Extract contents of download. Move+rename the "Apache24" folder to laragon/bin/apache/httpd-2.4.51-o111l-x64-vs16 (same setup as your other versions of apache)
- Make 2 edits to conf/httpd.conf
- Comment out #Define SRVROOT "/Apache24" and add below it: Define SRVROOT "/laragon/bin/apache/httpd-2.4.51-o111l-x64-vs16" (just path if necessary)
- In the same file also comment out the line: #Include conf/extra/httpd-ahssl.conf
- You also need the latest Mod FCGID for Apache
https://www.apachehaus.com/cgi-bin/download.plx?dli=Tt2cyMFMBVjTUt2ahZ0YzokVOpkVFVVckhkVvZ1Z
- Extract and copy+rename "mod_fcgid.so" into laragon/etc/apache2/modules/mod_fcgid-2.3.9-Win64-vs16.so
- Edit laragon/etc/apache2/fcgid.conf and comment out #LoadModule fcgid_module
- Below it add: LoadModule fcgid_module "C:/laragon/etc/apache2/modules/mod_fcgid-2.3.9-Win64-vs16.so" (adjust path if necessary)
- Enable the latest apache from laragons quick menu
Download the latest php 8.1 Non Thread Safe (NTS) version
- https://windows.php.net/download/ (select the zip download option)
- Download and extract into your laragon/bin/php folder
- Update any environment variable to use this new version of php if necessary
- Enable this version of php in your laragon quick menu (it will create a php.ini file)
- Copy any prior settings and extensions from your old php as required
- You'll probably want the latest php8.1 sqlserver drivers: https://github.com/microsoft/msphpsql/releases (extract extensions to php/ext dir and enable as needed)
Ensure both latest apache and php running in laragon. Hopefully no error when starting apache!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment