Replies: 7 comments 8 replies
-
See my blog post: How to update the PHP version in Laragon |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
To install multiple versions of PHP, you can use a tool like phpbrew or multiple PHP-FPM instances. |
Beta Was this translation helpful? Give feedback.
-
Is there any way to use a different PHP version for each project using |
Beta Was this translation helpful? Give feedback.
-
How to manually pin Apache to a set version of PHP. Thanks to RobiNN1 for his reply above and SO: Setting PHP Include Path on a per site basis? I have found a way to manually pin one site to a fixed PHP version, while Laragon can still switch PHP to another version and Apache will automatically use Laragon's PHP. There are some caveats:
Download and install the required NTS version of PHP see: How to update the PHP version in Laragon, if the PHP version is 'legacy' see the archive Update the Windows host file with a different TLD than Laragon. e.g. app.stranding.local
Create an Apache conf file for the site: e.g. manual.app.stranding.local.conf in sites_enabled (Laragon menu > Apache > dir: conf) double click sites-enabled
Edit the file paths and names in the first four lines:
Laragon can be restarted, the site will be pinned. You can now switch to a different PHP version in Laragon, for other sites. When you have finished pinning the PHP version either rename the file so it doesn't end .conf or delete it. I hope this helps. |
Beta Was this translation helpful? Give feedback.
-
It's working now. You are champion. Thanks a lot. I think the problem I have is I should not have 2 copy of php in TS. Once I delete the other one, it works. Both websites in 2 different php version can run at the same time. Thanks Bro |
Beta Was this translation helpful? Give feedback.
-
how to install multiple versions PHP?
Beta Was this translation helpful? Give feedback.
All reactions