go to bug id or search bugs for
pecl install filter seems not to work with Ubuntu 6.10.
"pecl install filter" fails with...
u80759076@bit3426:~$ sudo pecl install filter
downloading filter-0.11.0.tgz ...
Starting to download filter-0.11.0.tgz (25,946 bytes)
.........done: 25,946 bytes
8 source files, building
PHP Api Version: 20041225
Zend Module Api No: 20050922
Zend Extension Api No: 220051025
building in /var/tmp/pear-build-root/filter-0.11.0
gcc -I. -I/tmp/pear/cache/filter-0.11.0 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/filter-0.11.0/include -I/var/tmp/pear-build-root/filter-0.11.0/main -I/tmp/pear/cache/filter-0.11.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/cache/filter-0.11.0/logical_filters.c -fPIC -DPIC -o .libs/logical_filters.o
/tmp/pear/cache/filter-0.11.0/logical_filters.c:25:31: error: ext/pcre/php_pcre.h: No such file or directory
/tmp/pear/cache/filter-0.11.0/logical_filters.c: In function 'php_filter_validate_regexp':
/tmp/pear/cache/filter-0.11.0/logical_filters.c:451: error: 'pcre' undeclared (first use in this function)
drwxr-xr-x 12 root root 4096 2006-09-08 10:53 .
drwxr-xr-x 7 root root 4096 2006-09-08 10:53 ..
drwxr-xr-x 3 root root 4096 2006-11-03 12:55 date
drwxr-xr-x 2 root root 4096 2006-11-03 12:55 dom
drwxr-xr-x 2 root root 4096 2006-11-03 12:55 gd
drwxr-xr-x 2 root root 4096 2006-11-03 12:55 hash
drwxr-xr-x 2 root root 4096 2006-11-03 12:55 iconv
drwxr-xr-x 2 root root 4096 2006-11-03 12:55 libxml
drwxr-xr-x 3 root root 4096 2006-09-08 10:53 mbstring
drwxr-xr-x 2 root root 4096 2006-11-03 12:55 session
drwxr-xr-x 2 root root 4096 2006-11-03 12:55 standard
drwxr-xr-x 2 root root 4096 2006-11-03 12:55 xml
Now, i don't know if this is a ubuntu bug or something that should be checked in filter (or in both?)
Add a Patch
Add a Pull Request
Same error when running:
pecl install filter-beta
I'm using Centos ( 4.4 ) php 5.1.6
at the risk of saying "me too"...
we get exactly the same on 2 CentOs 4.4 boxes and a Redhat RHEL ES 4 box. CentOS boxes have PHP 5.1.6 and Redhat box has PHP 5.2.0. All have pcre.h and preposix.h available (pcre-devel package has been installed) but darned if I can find a php_pcre.h file anywhere. Seems that the pecl process has same issue! Also tried downloading the tgz file from PECL and doing the phpize, ./configure, make etc. manually but get *exactly* the same error at the make stage...Help!
and exactly the same error on Kubuntu Feisty...
Doesn't like these new pcre headers
Going back to an earlier version (pre PCRE) does work:
sudo pecl install channel://pecl.php.net/filter-0.9.2
Works for me on php 5.2.2 mac os x, intel core 2 duo.. pecl upgrade filter-beta went just fine, install as well.
Requires a new release.
I don't know how applicable this will be to your situations.
I'm using PHP 5.1.2 on Ubuntu.
However I had the exact same problem:
# pecl install filter-0.11.0
fails, ultimately looking for source files in /usr/include/php5/ext/pcre
For me "pcre" did not exist in /usr/include/php5/ext
or, you may be missing php_pcre.h
After downloading PHP 5.2.2 source (my version was not available) and extracting the ext/pcre directory and putting it in /usr/include/php5/ext/
I was able to successfully build filter-0.11.0
How it will work.... we'll see.
I'm having the same problem on CentOS 5 with PHP 5.16 and PEAR version 1.4.9.
Does anyone have a patch to work-around this?
I don't understand why this module was written to compile against another extension. If anyone could shed some light on that, please feel free to email me.
Got same error at FreeBSD 6.2 stable box...
Looks like pcre struct went undefined, but I had checked out an "#include ext/pcre/php_pcre.h" availability and it's on right place in my system (/usr/local/include/php/ext/pcre/php_pcre.h)...
What have I to do next?
Assuming that the Debian/Ubuntu chaps actually used the core code for pcre to compile the php5.1.2 package, we can follow the following to install filter on an ubuntu box using the 5.1.2 deb:
1)Download the source code and headers from the 5.1.2 snapshot from here: http://www.php.net/releases/
3) Find the ext directory in the source-tree for 5.1.2 (should be in the root of the tarball). Inside here you should find the pcre directory with all the C source and headers and things. Copy this directory to this location on 6.06/10 Ubuntu box: /usr/include/php5/ext/
4) Proceed with your pecl/local compile of filter.
NOTE: I completed the install of Filter 0.10.0 this way on Ubuntu 6.06 LTS using phpize and ./configure with a tarball of Filter, but I guess it would work the same way using pecl as long as the pcre directory from the source was popped inside.
That's definitively the way to go until I found a way to get releases done more often through pecl. But somehow this package has some political issues and I'm not able to release it as much as I would like, or not at all :)
a goal for the next year ;)
The fix on CentOS5 is to first get yum or apt on the system, followed by gcc-devel and gcc, then get the latest tarball from here:
and then follow the instructions at php.net here:
The key being to find out with 'find' command where your 'php_pcre.h' is hiding and then edit the filter-0.11.0/logical_filters.c to use this path instead of 'ext/pcre/php_pcre.h'. And then those instructions tell you do the usual phpize, ./configure, make, make install.
This may or may not work with your version of Linux.
filter is now only maintained in core.