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.
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 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?
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.
OK, so (retrospectively, quite stupidly), I upgraded my mac osx PHP version (not mamp php) from 5.3.28 to 5.4.10, to try and install composer. Now my MAMP sites don't seem to be loading. (I am not a backender.)
1. I upgraded mamp
At the end of the upgrade the final messages in terminal were as follows:
Create symlink /usr/local/php5/entropy-php.conf /etc/apache2/other/+php-osx.conf
Restarting Apache
httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.0.2 for ServerName
Syntax OK
But when I checked the php version in terminal, it still said 5.3.28.
2. MAMP start page loaded, sites didn't work
Suddenly none of my MAMP sites were working. I have set the virtual hosts in httpd-vhosts.conf (and using sudo vim /etc/hosts). These have been working for like 3 years with no problem.
MAMP still loads the start page, but when I load a site I get:
Not Found
The requested URL / was not found on this server.
Apache/2.2.26 (Unix) PHP/5.4.41 DAV/2 Server at domain.dev Port 80
3. Reinstalled MAMP
So I then uninstalled and reinstalled MAMP, and restored all my settings, which again still loads up fine (the MAMP php version is now 5.6.7).
4. Tried downgrading mac php back to 5.3.28
I then tried to downgrade back to PHP 5.3.28, but that wouldn't work when I tried to use:
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.3.28
So I just used:
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.3
And it appears to have downgraded to 5.3.29, but with the following error at the end:
Executing post-install script /tmp/5.3-frontenddev-post-install
Restarting Apache
httpd: Syntax error on line 665 of /private/etc/apache2/httpd.conf: Syntax error on line 8 of /etc/apache2/other/+php-osx.conf: Cannot load /usr/local/php5/libphp5.so into server: dlopen(/usr/local/php5/libphp5.so, 10): Symbol not found: _libiconv\n Referenced from: /usr/local/php5/lib/libintl.8.dylib\n Expected in: /usr/lib/libiconv.2.dylib\n in /usr/local/php5/lib/libintl.8.dylib
When I check the php version, it still says '5.3.28' :(
5. Someone save me
The exact same problem persists. I have no idea what's gone wrong or how to fix it. Any help would be super appreciated!
Running Mac Lion 10.7.5
OK. So MAMP then stopped working completely. But against all odds, I managed to fix it.
I followed this guide and reinstalled PHP 5.3:
http://benedmunds.com/php/2014/10/16/fixing-homebrew-php-apache-after-yosemite/
I got an error when I got to this line:
$ brew reinstall php53 --with-mysql --with-pgsql --with-apache
So I followed the beginning of this guide:
https://rtcamp.com/tutorials/mac/osx-brew-php-mysql-nginx/
Until I got to the install line tried it again to install 5.3:
brew search php
brew tap josegonzalez/php
brew tap homebrew/dupes
brew options php53
brew reinstall php53 --with-mysql --with-pgsql --with-apache
Took a little while, finished up. Restarted MAMP, and everything works again.
Phew.
Update
Had issues loading the MAMP start page too afterwards. Solved them by stopping OSX apache from running. It must have been taking over or something...
sudo apachectl stop
Recently, I wanted to upgrade my php on a mac from 5.4 to 5.5 [latest version], I did it successful with the php-osx's [http://php-osx.liip.ch/] one Line installation.
But however in the terminal when I did php -v, I could see the older version, then tried to uninstall php installed by phposx following their uninstall method.
Later I felt that I had to compile php from the source. I headed to php.net and downloaded 5.5, tar -zxvf, ./configure, make, sudo make install.
Now i feel like i'm going crazy as I have the older version when I issue php -v, also in the /usr/local/bin/php -v is the 5.5 version, and some packages installed with php-osx still available.
I need help with uninstalling the php compiled from source, and also totally remove some packages that where installed with php-osx, so that i just again install that latest version from the one line installer of php-osx and then just symlink it.
Thanks in advance!