Skip to content

Select different PHP Versions in different Projects #416

Answered by asif-ca
kazanove asked this question in Q&A
Discussion options

You must be logged in to vote

Amazingly, this worked for me! However, images were not loading correctly, especially .svg files, which failed to appear on the page.

The issue occurred because, after setting SetHandler application/x-httpd-php70-cgi, every file was being served by CGI as PHP.

I resolved this by configuring the CGI handler to apply only to PHP files in .htaccess file:

Handle PHP files using this specific CGI handler

<FilesMatch "\.php$">
    SetHandler application/x-httpd-php70-cgi
</FilesMatch>

Now even laragon has php 8 by defualt in my case but my projects can use php7 (or any specified version by sethandler) without switching php version in laragon.

Replies: 7 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@RobiNN1
Comment options

@tomerof
Comment options

@asif-ca
Comment options

Answer selected by alxndr-w
Comment options

You must be logged in to vote
3 replies
@Ringoinmel
Comment options

@Ringoinmel
Comment options

@Pen-y-Fan
Comment options

Comment options

You must be logged in to vote
3 replies
@Pen-y-Fan
Comment options

@Pen-y-Fan
Comment options

@Pen-y-Fan
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
docs Issues that are related to documentation
9 participants