How do i force php 7.3 in a virtualhost

How can i force a virtualhost to use php 7.3

I added it, but it still says v5

Also tried to add this in htaccess AddHandler application/x-httpd-php73 .php

You wish on a star.

Or, if you want help, you maybe start by telling us exactly what you did to add it, and what “still says v5”.

this is my configuration in vhost
image

i am trying to host a laravel php project on it.

And what is telling you that you’re still on v5?

when we run php -v it says 5.4

And what makes you think that has anything to do with the version of PHP that would be used in the virtual host?

i see i ran the wrong command

instead of running <?php echo phpInfo(); ?> on the vhost, we checked the php version on the server, which is defaulted to 5

More precisely, you ran the php binary, which (as is typical of CentOS) stays at 5.4.whatever. The software collections installations don’t replace it. A phpinfo(); page in the relevant vhost is the appropriate way to check this.

3 Likes