Install mcrypt extension for php with Homebrew in Mac High Sierra - php

I've been trying to install mcrypt extension for php 5.6 with the next commands:
brew install php56-mcrypt
with no results, I'm getting this error:
No available formula with the name "php56-mcrypt"
taken from questions like these:
Installing mcrypt on OSX 10.8.2 - PHP 5.3.15 with homebrew
According with this issue opened at Github:
https://github.com/Homebrew/homebrew-php/issues/4721
this way seemed was valid until March 2018, and now there's a new formula that I haven't been able to figure out.
Any advice will be appreciated

Related

"env: php: No such file or directory" on new mac OS Monterey

i've updated my mac os to Monterey (12) and then I can not use composer command or php command and get this error
env: php: No such file or directory
macOS 12 (Monterey) removes the system provided PHP and you will need to install it yourself.
It is easy to install if you have brew installed. Simply run the following:
brew install php#7.4 brew-php-switcher
brew link php#7.4
This will install the latest version of PHP 7.4 as well as a handy utility for switching between PHP versions if you need to.
PHP has been removed from MacOS since v12 (Monterey), so you first need to install it on your own to use it. From my POV, the easiest way to do this is using Homebrew
run brew install php , it will take php last version, then you will be be able to use php on your mac

Issues installing pgsql extension for PHP 7.3.24 on Mac Big Sur using homebrew

Does anyone know the commands to get the pgsql extension installed on a Mac? Trying to use Homebrew but no luck. I suspect the commands or way I'm trying to get the extension are incorrect.
I tried:
brew install php#7.3-pgsql
brew install php--with-pgsql[=DIR]
brew install php#7.3-pdo-pgsql
Current version of PHP: 7.3.24
Mac: Big Sur
Specifically need pdo_pgsql extension.
UPDATE: ISSUE SOLVED After Big Sur update homebrew needs upgrade (see article below):
https://getgrav.org/blog/macos-bigsur-apache-upgrade-homebrew

How to download PHP -thread safe now that Homebrew no longer support --with-thread-safety?

I need to use PHP pthreads on Mac OS High Sierra, but Homebrew is no longer supporting downloads of PHP --with-thread-safety.
How do I get and install a thread safe version of PHP for Mac OS, Php v7.1.16 without homebrew?
If it is going to have to be some sort of manual install - does anyone have step by step directions for the mac or know where I can get instructions?
I have been looking on the internet for instructions for 5 hours now. I'm tired and can't believe that no one has any posted info on this.
I was able to get PHP 7.2.5 installed on Mac OS HighSierra with ZTS/Thread safety by using phpbrew.
Install Steps I took:
Downloaded phpbrew from http://phpbrew.github.io/phpbrew/ and installed with their directions. Please note at the end of the installation, they give you further instructions for setting up your ~/.bashrc to load phpbrew, look for them at the terminal.
Once you have phpbrew running you are ready to install php with zts by using the command below (of course you can install all of the extensions that you like by checking the installation for extension instruction)
phpbrew install php-7.2.5 +openssl='/usr/local/opt/openssl/' -- --enable-maintainer-zts --with-curl=/usr/local/
It is important to have openssl and curl already installed before installing php and you must point to their location on your computer at the install line as I have done above. You can add all the extensions you need, but you must have the openssl and curl because I had a ton of problems with installation without them. But you could try omitting.
For those of you who are using PHP ZTS so that you can go on to install pthreads --ONLY PHP 7.2 and above works with Krakjoes pthread-master which you can download and follow the installation at https://github.com/krakjoe/pthreads

Unable to find pcntl on homebrew in mac high sierra

I have been trying to install pcntl extension using homebrew in MacOS High sierra using command
brew install homebrew/php/php71-pcntl
brew install homebrew-php/php71-pcntl
Also tried with php54, 55, 56, 70
I m getting error
Updating Homebrew...
Error: No available formula with the name "homebrew/php/php7-pcntl"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/php is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/php)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
==> Searching local taps...
Error: No similarly named formulae found.
Why its not finding the formulae on my Mac I have php 7.1.14 on my mac
In February and March 2018 the PHP formulas for the currently supported PHP versions (5.6, 7.0, 7.1, 7.2 at the moment of this writing) were moved to the core Homebrew tap and in April 2018 the PHP tap has been archived.
To install the current PHP version (7.2) use:
$ brew install php
To install one of the other supported versions use:
$ brew install php#5.6
(replace 5.6 with 7.0 or 7.1 for the other versions).
All the formulas installed this way contain the pcntl extension, there is no need for anything else.

How to install PHP extension 'pcntl' on my Mac OSX without brew

So, I'm trying to install the pcntl extension on my MacBook Pro (High Sierra 10.13.4).
I tried following the guides that I can find online, but they are all outdated, since Homebrew decided to move all php packages to their core, and delete some of them in the process.
(https://github.com/Homebrew/homebrew-php, WTF Homebrew?!)
The pcntl php extension is one of those packages.
This was done the end of March, so very recently. Nobody asked this question since then.
Is there any other way to install the pcntl extension on a Mac?
They didn't drop the extension they decided on compiling it with php by default.
While according to this brew formular it should be available in php71 it only is available starting with php72

Categories