Installing PECL extension error - php

I downloaded a PECL extension and executed:
$ phpize
$ ./configure
The following command generated dozens of errors:
$ make
I suspect that the first two errors lead to the others:
/Users/afilina/Downloads/APC-3.1.9/apc.h:61:17: error: php.h: No such file or directory
/Users/afilina/Downloads/APC-3.1.9/apc.h:62:30: error: main/php_streams.h: No such file or directory
Here is an example of the dozens of syntax errors:
/Users/afilina/Downloads/APC-3.1.9/apc.h:69: error: syntax error before 'TSRMLS_DC'
Does anyone have pointers as to what might have happened? Installing using the "pecl" command is not an option as my PEAR installation is corrupted.

You need the PHP headers. Depending the Distro, or OS these may be found in a different manner.
In debian you need install "php5-dev":
apt-get install php5-dev
Realy i don't know how install it in Mac.

Related

Error on installing Mediawiki 1.38 for personal use in MacOS. Error message : Installing some PHP extensions is required. Please install: intl

I'm using MacOS Big Sur 11.4 and XAMPP 7.4.29. I have only basic knowledge on php and html. I want to go through mediawiki installion on my Mac for personal use. I encounter error message like screenshot below which basically I need to install intl extention in my PHP
I followed the instruction given here
Brew install autoconf
Change the path PATH=”/Applications/XAMPP/xamppfiles/bin:${PATH}”
Go inside the folder cd ext/intl/
Build /Applications/XAMPP/bin/phpize
I encounter error message
Cannot find config.m4. Make sure that you run '/Applications/XAMPP/bin/phpize' in the top level source directory of the module
After that I found a stackoverflow pages here addressing the issue of config.m4 and suggesting to
Install xdebug-2.6.1 (which was written 9 years ago and I can not find in internet)
Finding the file ls config* which I try and fail too
After that, I try to find other way to install the missing extention of php. I found this stackoverflow article. I followed the instruction
brew install icu4c
sudo pecl update-channels
sudo pecl install intl . In this step I put the path of ICU /opt/homebrew/opt/icu4c/
I stucked with an error message like below
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/pear/temp/intl/php_intl.h:33:10: fatal error: 'unicode/ubrk.h' file not found
#include <unicode/ubrk.h>
^~~~~~~~~~~~~~~~
1 error generated.
make: *** [php_intl.lo] Error 1
ERROR: `make' failed
So that's all the thing that I have tried so far. My question since from the beginning has not been solved. How can I install the missing PHP extention so that I can proceed with the installation of mediawiki?
Thank you in advance

Error installing PECL expect package for PHP on Mint

Hello people of the internet
I am new to Linux.
I'm moving over from Windows.
I'm trying to install the PECL expect package for PHP: https://pecl.php.net/package/expect
I've followed the instructions on these pages.
But both give me errors, which I've details below:
https://www.php.net/manual/en/install.pecl.phpize.php
$ cd extname
$ phpize
$ ./configure
$ make
# make install
When I get to the ./configure, the last two lines in the terminal say:
checking specify path to Tcl needed by expect... yes, shared
checking for tcl version... configure: error: not found
I have Tcl installed, and it's the latest version.
When I try the make command it says:
make: *** No targets specified and no makefile found. Stop.
I can't find a makefile, only a Makefile.global, Makefile.fragments, and Makefile.objects
https://www.php.net/manual/en/install.pecl.pear.php
sudo pecl install expect
The last line in the terminal say:
ERROR: `/tmp/pear/temp/expect/configure --with-php-config=/usr/bin/php-config' failed
I looked on the net, and installed every dependency that others recommended, but it still doesn't work.
I've downloaded so many dependencies now, that my machine is probably not safe anymore...
Does anybody know what else I need to do to install the package?
I'm using Linux Mint 19.3.
Thanks.

How To Install PECL YAML Extension on Mac?

My goals is to be able to use the PHP functions for parsing YAML detailed in the PHP docs:
http://php.net/manual/en/ref.yaml.php
To install the PECL yaml extension I've opened Terminal and typed:
brew install libyaml
Then
sudo /usr/local/php5/bin/pecl install pecl_http
Then
sudo /usr/local/php5/bin/pecl install yaml
But I think it fails to install the PECL yaml extension. It says:
3 warnings and 16 errors generated.
make: *** [yaml.lo] Error 1
ERROR: `make' failed
And when I try to use yaml_parse_file() in my program, it says:
Fatal error: Call to undefined function yaml_parse_file()
How do I properly install the PECL yaml extension so I can use the PHP functions for parsing YAML?
I had similar issue and below steps helped me.
First be sure you have installed yaml extension (as I know since brew will not help us for packages so better to use pecl)
Even though some errors (such as failed for mkdir) occurred during installation it was completed.
pecl install yaml
Next open your php.ini file and add this line according to your path to yaml.so file.
extension=/usr/local/Cellar/php70-yaml/2.0.0/yaml.so
Hope it helps..

How can I install ID3 support for PHP on Debian?

I tried apt-get install php-getid3 and it installs, but when I restart lighttpd and use id3_get_tag() in my script I get the following error
Fatal error: Call to undefined function id3_get_tag() in x.php on line 3
I thought this was odd since usually the packages are php5-gd or php5-mysql and not just php-
I even tried installing the package id3 as well and restarting lighttpd but that didn't work either.
I'd rather not have to compile PHP myself if it can be avoided.

Installing Solr in a XAMPP server in a LINUX server

I try to install Solr PHP extension to my webserver. I already have an XAMPP server and I'm using PECL to install solr
$ cd /opt/lampp/bin
$ sudo ./pecl install solr-1.0.1
But I got the following error:
checking libxml2 install dir... /usr/lib
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.
ERROR: `/tmp/pear/temp/solr/configure --enable-solr=yes --enable-solr-debug=no --with-curl=
/usr --with-libxml-dir=/usr/lib' failed
During the installation it prompts me to input a path:
libxml2 install prefix [/usr] :
I have tried with enter and the /usr/lib
What shall I input there to not get an error? Or how shall I install to not get an error?
Now I have libxml2 installed through yum install libxml2-devel. But I got some wierd errors now. Here are just a few of them, it ends with:
no such parameter
/tmp/pear/temp/solr/solr_types.h:388: error: declaration for parameter 'client_count' but no such parameter
/tmp/pear/temp/solr/solr_types.h:386: error: declaration for parameter 'document_count' but no such parameter
/tmp/pear/temp/solr/solr_types.h:384: error: declaration for parameter 'request_count' but no such parameter
/tmp/pear/temp/solr/php_solr.c:1185: error: expected '{' at end of input
make: *** [php_solr.lo] Error 1 ERROR: `make' failed
If you're using RHEL/Fedora/CentOS/Scientific linux then you need to install libxml2-devel
yum install libxml2-devel
I could easily install PECL Solr via my systems package manager, probably this works for you as well. I found it very easy so probably worth to share (Fedora 14):
$ sudo yum install php-pecl-solr
A little later I got php-pecl-solr-0.9.11-1.fc14.x86_64 installed, the package's fedora homepage is here.
I could locate the libxml2 version with this command:
$ locate libxml2.so
probably this is helpful as well.
Some useful links:
http://projects.mediashelf.us/projects/8/wiki/Setting_up_Fedora_and_Solr_for_use_with_ActiveFedora#Install-Solr
http://oxfordrepo.blogspot.com/2008/01/populating-search-engine-apache-solr.html

Categories