How to install x-cache on max os? - php

I have installed already php 5.6 and memcached using http://php-osx.liip.ch/. Now I need x-cache and I don't know how to install and turn module on for php. Please, help. Thank's in advance.

I would suggest you installed Homebrew, fire up a Terminal and run brew install php56-xcache. You might need to run brew tap homebrew/dupes && brew tap homebrew/versions && brew tap homebrew/homebrew-php before you're able to run it.
Also, Homebrew will probably install a new version of PHP 5.6, but it's seriously worth it as easy as a brew install php56-mcrypt if you wanted to install mcrypt (or any other package).

Related

Error upgrading PHP 7.4 on MAC after Brew installation

I have a Mac Air with Ventura OS.
I just installed Brew and after that I can't upgrade PHP anymore.
I get the following error:
Error: php#7.4 has been disabled because it is a versioned formula!
How can I solve it?
New to MacOS and Brew.
Thanks
Fabio
No clue what to do at this point.
The message tells you that PHP 7.4 is outdated. You can either install PHP8
brew install php
or link a 3rd party repository and install 7.4 from there.
For example:
brew tap shivammathur/php
brew install shivammathur/php/php#7.4
brew link php#7.4

Install php72 on MacOS using brew

I'm trying to install php72 using brew.
Actually when I do brew install php72 it's downloading "https://homebrew.bintray.com/bottles/php-7.3.0.mojave.bottle.tar.gz".
So when I check php version it's showing me PHP 7.3.0 (cli).
How can I install exactly php72 and not php73 ?
I found the solution.
Instead of installing php72 you must specify version like this php#7.2.
brew unlink [your actual php version linked]
brew install php#7.2
brew link php#7.2
Installing PHP 7.2 on Mac using Homebrew
Check version
php -v
check brew is up to date
brew update
brew upgrade
Unlink php version which is installed in the system
brew unlink php71
Now final step to download**
brew install php72
export PATH=/usr/local/php5/bin:$PATH
This worked for me
brew upgrade
brew unlink php71
brew install php72
then in your ~/.bash_profile
export PATH=/usr/local/Cellar/php\#7.2/7.2.26/bin/:$PATH
brew tap homebrew/homebrew-php
brew unlink php71
brew install php72 --with-argon2
brew install php72-xdebug
For more info follow url https://murze.be/how-to-upgrade-from-php-71-to-72-on-macos-using-homebrew
Note older version's of Mac OS are not supported, I'm trying with docker which also doesn't support older versions of Mac OS completely (no desktop version). Trying with just docker machine as follows;
base=https://github.com/docker/machine/releases/download/v0.16.0 &&
curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/usr/local/bin/docker-machine &&
chmod +x /usr/local/bin/docker-machine

OSX Sierra - How to Install PHP7 and leave 5.6 as default in Terminal

short question - how to install php7.1 on OS X Sierra and keep 5.6 as default.
I only want to run php 7.1 in terminal using php7 - and when using php the original 5.6 should be used ...
thanx in advance
tom
There are a number of ways to achieve this. I would install PHPBrew, since that allows you install as many PHP versions as you want without touching the system's PHP version.
I would also install Homebrew as it's likely there will be dependencies you need to resolve with specific extensions.
Another option would be to install PHP7 via Homebrew and alias it to php7. Or you could compile it from source. However, if you plan on having one or more PHP versions readily available alongside the system version then PHPBrew is probably the most flexible option.
Install PHP 5.6:
brew install php56
Install PHP 7.0:
php70
Switch to php5.6 in terminal:
brew unlink php70
brew link php56
Switch to php7.0 in terminal:
brew unlink php56
brew link php70
Source: Switching PHP version on mac with homebrew
maybe someone other is searching for a very clean solution too - here is what finally worked for me perfectly. this is based on the hints and tips from matthew daly and surfer 190 - thanx again!
takes just 5 minutes - here we go ...
first install xcode command line tools (just 160mb instead 4.5gb):
xcode-select --install
then install homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
short test if anything up to here is fine:
brew doctor
install php 7.1:
brew install php71
i found that some have problems with the above direct php install - this resolves these problems - and then try again the php install:
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
make a symlink to the original php-binary that came with osx:
ln -s /usr/bin/php /usr/local/bin/php5
here is the result - now php 7.1 is the default php version - and using php5 will use the old php-binary that came with your osx preinstalled:
php -v
php5 -v

mcrypt after homebrew install

I'm attempting to put together a new laravel application and tried to run php artisan to get the list of commands and it says MCrypt extention required. I am running on OSX Mavericks and ran the mrypt installation from homebrew. So now I"m stuck trying to figure out what I need to do. I am trying to get it ready so I can start messing with Vagrant.
I did go through the commands here through terminal:
brew install libjpeg
brew install pcre
brew install libxml2
brew install mcrypt
So now I'm trying to figure out why its not letting me run other commands and needing mycrpt enabled even though I already installed it.
I did the suggestions below and still when I try and run php artisan it says mycrypt php extention required.
Any ideas?
Assuming php 5.5:
brew install php55-mcrypt
If it doesn't find it:
brew tap josegonzalez/php
brew install php55-mcrypt
If it complains about not having zlib:
brew tap homebrew/dupes
brew tap josegonzalez/php
brew install php55-mcrypt
If you're on a different version of php, just change the php55 to match (php 5.3? brew install php53-mcrypt)

Missing PHP53 or PHP54 from homebrew-php

With this command
$ brew install josegonzalez/php/composer
I get this message
Missing PHP53 or PHP54 from homebrew-php. Please install one or the other before continuing
Error: An unsatisfied requirement failed this build.
I have MacOsX 10.7 with MAMP. Can someone help me?
If you have already php installed, you can ignore the dependencies by --ignore-dependencies parameter in example:
brew install composer --ignore-dependencies
Or if you don't have php, you'll have to install first via:
brew install php55
I use OSX 10.9 and use XAMPP.
I also have this problem.
But I use brew install php, and then install composer successfully.
brew install php54
update
or
brew install php55
Are you seeing this warning?
Warning: No developer tools installed.
Install the Command Line Tools:
xcode-select --install
If so, it might fix your issue:
xcode-select --install
brew install php55
brew install composer
It worked for me. Warning, the xcode-select install takes a long time.
I had this issue when doing brew intsall php-cs-fixer I upgraded PHP from 5.4.14 to 5.4.16 via Homebrew (maybe try reinstalling if you are already up-to-date) and removed multiple paths to PHP in my PATH Environment variable. Not sure which bit fixed it for me, but it now works correctly.
Also I was advised to try brew install --env-std php-cs-fixer in the Homebrew IRC channel, it did not work for me, but might do for others.
Hope that helps anyone with the same issue!
I get the same problem with brew, I suggest to install it manually with:
$ curl -s https://getcomposer.org/installer | php
$ php composer.phar

Categories