valet-plus icon indicating copy to clipboard operation
valet-plus copied to clipboard

Bug: Valet secure <sitename> switches php version

Open dipsaus9 opened this issue 5 years ago • 6 comments

  • [x] I've checked the issue queue and could not find anything similar to my bug.
  • [x] I'm on the latest version of valet-plus (valet --version): 1.0.29
  • [x] I've run valet fix and valet install after updating and before submitting my issue/feature.

What is the problem? Enabling ssl for your site switches php cause it is turning off all the settings and restarting your system. After restarting your pc this problem is solved again.

What was supposed to happen? After enabling ssl the php version should stay the same.

What actually happened? I uses valet use 7.2 then valet secure website. After this my php version turned back to 7.1

How to reproduce this? I uses valet use 7.2 then valet secure website. After this my php version turned back to 7.1

What is the solution? Restarting the right php version.

Sources Terminal says php version was 7.2 while my phpinfo() said 7.1

dipsaus9 avatar Jan 30 '20 14:01 dipsaus9

This generally happens when you PATH variable is already pointing towards another PHP version.

Can you check or leave your entire PATH variable here?

Neodork avatar Feb 03 '20 13:02 Neodork

export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export PATH="/usr/local/opt/[email protected]/sbin:$PATH"

dipsaus9 avatar Feb 03 '20 15:02 dipsaus9

I've made a mistake. The export PATH was defined but was closed earlier. This means it works when switching but it resets after every change. Sorry.

dipsaus9 avatar Feb 05 '20 08:02 dipsaus9

Reopening issue as the problem did not resolve after restart of my computer.

I restarted my computer and created some new projects with valet. But after valet secure valet was using php 7.1 again, even though my terminal gave me the 7.2 version.

export PATH="/usr/local/git/bin:/sw/bin:/usr/local/bin:/usr/local:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export PATH="/usr/local/opt/[email protected]/sbin:$PATH"
export PATH="$PATH:$HOME/.composer/vendor/bin"

This is my PATH export in my bash_profile.

dipsaus9 avatar Feb 12 '20 07:02 dipsaus9

@dipsaus9 Please join slack so we can go over this.

Neodork avatar Feb 12 '20 13:02 Neodork

Is this still an issue? I can't reproduce it.

mischabraam avatar Feb 21 '22 15:02 mischabraam