I have php5 installed on my macbook then I tried to update it, to php7 after I successfully installed the php7, I tried to check the installed version using php -v. But to my surprise it shows I still have php5 running on my system. After that I tried to move my php7 to my php5 directory /bin/usr/ but failed. Then I tried to run php-v but the response I got was -bash: command not found. Please how can I solve this both on my terminal and VSCode?
Related
MacOS 12.1 After successfully installing php 8.1 with homebrew (along with apache/mySQL and phpmyadmin) I am trying unsuccessfully to install/link php 7.4. After following instructions to install, unlink, link, php -v returns 7.4 but phpinfo() shows 8.1. What am I doing wrong?
Strange enough, using a full name such as "shivammathur/php/php#8.1" for the link command is what worked for me.
Eg:
brew link --overwrite --force shivammathur/php/php#7.4
Also, don't forget to close your terminal completely and reopen it before checking the version with php -v.
It looks as if I never successfully killed the included MacOS Apache. I uninstalled home-brew and the server was still running (with PHP8.1!). Not sure what went wrong.
I run php7.2 on mac os mojave. I recently noticed when I run php -v in terminal I get this error
I am not sure what caused it because I noticed it today. uninstalling openssl using homebrew & installing again didn't work.
I installed new php version, php7.72 , it fixed the issue for me.
I have uninstalled XAMPP because recently I found that php comes install by default in macOS. My MacOs version is Catalina. So whenever I fire any php command from cli it gives me Library not loaded but strange thing is it returns XAMP path.
I installed Xampp on Ubuntu 16 to work with Laravel.
I ran my Laravel code and got this error : Mcrypt PHP extension required.
After that I tried to install Mcrypt on PHP.
I have done these :
sudo apt-get install mcrypt
sudo phpenmod mcrypt
I have also done this : Link
I also restart the all services from Xampp after every change but I still get error on Laravel.
Any idea ?
My PHP version is 7.0.22 and Ubuntu version is 16.04.1 .
Thank you .
Edit 1
I did this and I still see the error.
After trying to many things. I just got rid of this shit by installing both version on my computer.
First I installed php 7.1.19 version.
Secondly I installed php 7.2.15 version
Now I am working perfectly with my project.
when i tried to install composer with php 5.6.3 that return message said i have to install php 5.6.4 at least
so i just download xampp package that support php 7 to be able to install composer and laravel and when i tried to install composer after that the composer show me that Error :
The PHP exe file you specified did not run correctly [exit code 1]:
E:\xampp\php\php.exe
The php.ini used by your command-line PHP is: E:\xampp\php\php.ini
A setting in your php.ini could be causing the problem: Either the 'extension_dir' value is incorrect or the dll does not exist.
I also had this problem. Try install Xampp 5.6.24 / PHP 5.6.24 (Not the latest Xampp 7.0.9 / PHP 7.0.9)