I'm a bit confused by virtphp's documentation on Github.
I have one server: CentOS 7. The default PHP version for the server is 7.0.18 (this is aside from phpbrew).
Application #1 needs to run 7.0.18.
Application #2 needs to run 5.3.22.
Both versions are attainable via phpbrew. No problem there.
Using virtphp I've set up two environments:
So I can activate, deactivate, no problem.
Say I activate 5.3.22 in a folder. Run
php -v
and it shows 5.3.22. But How to keep that version persistent for that particular application?
Reason being I've been assigned a really oldschool wordpress site that needs to be maintained and have been explicitly told not to upgrade anything related to it: deprecated mysql functions, php version, wordpress version, etc.
If there is something I'm overlooking here, please let me know.
Any and all input is appreciated. Thank you.
I think virtphp is not a best choice for that (Maybe you're looking for Docker). Anyway, perhaps adding alias (in ~/.bash_alias) can help you to avoid multiple cmd before running your server :
So you just run
run_app2
in terminal and you're good with the right php version.Hope this help