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

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

Related

Fatal error: 'ext/standard/php_smart_str.h' file not found

I downloaded MacOS Mojave and did a clean installation on my mid 2012 macbook Pro. Installed XCode with command line tools. Got native Apache and PHP working, with PEARL, PECL and last version of ICU (63.1) for later use of Intl extension.
But every attempt of Intl instalation has failed. Before the clean instalation, i found a intl.so on a pen drive and used ICU version 54, but isn't the best way to get things working for a development enviroment.
In the end, i'm stuck with PECL incapable of finish intall of Intl because can't find php_smart_str.h file.
I've reinstalled the developer tools header files too:
$ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
Is it possible to have a development enviroment without Homebrew?
When i run at the terminal:
sudo pecl install intl
Returns the following:
/private/tmp/pear/install/intl/intl_error.h:24:10: fatal error: 'ext/standard/php_smart_str.h' file not found
Right after creating libtool and running: make.
Ok, instead of using homebrew, i really wanted to use only native apache and php pre-installed on my MacBook Pro with Mac OS Mojave, trying to maintain the most clean development environment possible for CakePHP use.
So, on Pecl Official site ( https://pecl.php.net/package/intl ), it's clear that Intl package is not maintained anymore and has been superseded. Since PHP 5.3.0 you don't need to use Pecl to install intl extension, it's bundled with PHP.
But, it's missing on native instalation of PHP 7.1.24 on Mac OS Mojave.
Then i downloaded PHP 7.1 from php.net, installed XCode Command Line Tools, ICU (http://site.icu-project.org/), Autoconf, reinstalled the developer tools header files, and finally installed Intl extension using phpize.
Important: you'll have to disable SIP.

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 install memcached via homebrew due to deprecation. PECL doesn't work either

So our friends at Homebrew have gone and changed things. They've deprecated Homebrew/PHP. That's fine, that's what we developers do. I was able to successfully install PHP 5.6 using Homebrew on a fresh installation of OS X High Sierra. I'm trying now to install memcached and mcrypt, but with the Homebrew change I understand this needs to be done through Pear/PECL. However when I trying to use PECL, I get the following error message:
$ sudo pecl install memcached
pecl/memcached requires PHP (version >= 7.0.0), installed version is 5.6.36
I'm wondering now what my options are. I need to stay with PHP 5.6 for now because that's what I need to code against until I can get our stuff up to PHP 7.x.
I'm going to go with Docker. I'm learning it now and it is a breath of fresh air. I'm certain it will work.

Install mcrypt extension for php with Homebrew in Mac High Sierra

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

Installing PHP 7.2 thread-safe on a mac

I'm trying to install PHP 7.2 thread-safe on a mac (Sierra 10.13).
I've tried:
with homebrew, using the --with-thread-safety option, but it's not recognized anymore
recompiling PHP with the --with-tsrm-pthreads option passed to ./configure, but failed
brew install php72 --with-thread-safety Warning: php: this formula has no --with-thread-safety option so it will be ignored!
Any suggestion?
In the end, I solved installing it through phpbrew.
Homebrew has started a migration of PHP related formulaes a while ago, so most of the parameters on most of the guides will not work anymore until someone will add support for them to the formulae.
Also, for most of the packages from now on Brew team recommends to use PECL.
You can try to build with flag --enable-maintainer-zts that should enable thread safety, it actually has worked out for me.

Categories