error use of undeclared identifier ‘ZEND_ACC_CLONE’; did you mean ‘ZEND_AST_CLONE’ – SOLVED
INSTALL SOLR php 7.2 extension on Mac OS X Mojave
So you figured out that brew dropped installing extensions for you. And you want to install php 7.2 solr extension.
You go to liip.ch because they appear to support it, but then they tell you you should not install it in Mojave.
So you stick to brew’s php7.2. You see that you can run: pear install pecl/solr, but you get an error:
error: use of undeclared identifier ‘ZEND_ACC_CLONE’; did you mean ‘ZEND_AST_CLONE’
You browse around and you see that there is some mysterious commit, that is not packaged yet, so you have no
access to the solution with pear or pecl. But the code is there right : https://github.com/php/pecl-search_engine-solr/commit/744e32915d5989101267ed2c84a407c582dc6f31
so how do you do it?
You use Git. “But, I don’t …” shh just relax, think. Exactly, got to the package main page: https://github.com/php/pecl-search_engine-solr/
read that you can actually install it there. You would want a specific commit
744e32915d5989101267ed2c84a407c582dc6f31 or later.
But let’s get the repository in our machine first and then we’ll see from there how to get the right commit.
Create a normal git blank repo.
git remote add origin https://github.com/php/pecl-search_engine-solr
git pull origin master
Now we have all the code in our machine, so let’s see if we find the right commit:
git log –oneline
We found it, and we notice that it is older than HEAD, so we might as well install the package using the latest version, which we
already have in our machine.
vim README.md read it. But if you really want it chewed.
The steps are simple:
make && make install
# We need to activate the extension in php.ini
# add this one line in php.ini:
sudo apachectl restart