php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57452 pecl install filter error: ext/pcre/php_pcre.h: No such file or directory
Submitted: 2006-12-22 06:51 UTC Modified: 2013-01-08 08:12 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: saschagros at bluewin dot ch Assigned: pajoye (profile)
Status: Wont fix Package: filter (PECL)
PHP Version: 5.1.6 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-12-22 06:51 UTC] saschagros at bluewin dot ch
Description:
------------
pecl install filter seems not to work with Ubuntu 6.10.

"pecl install filter" fails with...

u80759076@bit3426:~$ sudo pecl install filter
Password:
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
running: phpize
Configuring for:
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
running: /tmp/pear/cache/filter-0.11.0/configure
...
 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)


xx@xx:/usr/include/php5/ext$ ll
insgesamt 48
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?)



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-01 13:26 UTC] miki at epoch dot co dot il
Same error when running:
pecl install filter-beta

I'm using Centos ( 4.4 ) php 5.1.6
 [2007-04-17 08:38 UTC] alex at reefnet dot co dot uk
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!
 [2007-04-17 08:44 UTC] alex at reefnet dot co dot uk
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
 [2007-05-15 16:44 UTC] davidc at agoraproduction dot com
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.
 [2007-05-16 13:08 UTC] pierre dot php at gmail dot com
Requires a new release.
 [2007-05-21 21:45 UTC] techneck at goldenpath dot org
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.
 [2007-07-20 14:10 UTC] john dot dunlap at exceter dot com
I'm having the same problem on CentOS 5 with PHP 5.16 and PEAR version 1.4.9.
 [2007-08-14 19:53 UTC] jslife at projectmoonlight dot com
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.
 [2007-09-16 18:11 UTC] rymkus at inbox dot ru
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?
 [2007-12-11 16:44 UTC] si at tinypla dot net
UBUNTU Help:

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/

2) Extract 

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. 

HTH,


Si
 [2007-12-11 16:47 UTC] pierre dot php at gmail dot com
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 ;)
 [2008-06-21 03:19 UTC] reachmike at hotpop dot com
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:

http://pecl.php.net/package/filter

and then follow the instructions at php.net here:

http://us.php.net/manual/en/function.filter-var.php#76700

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.
 [2013-01-08 08:12 UTC] pajoye@php.net
-Status: Assigned +Status: Wont fix
 [2013-01-08 08:12 UTC] pajoye@php.net
filter is now only maintained in core.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 03:01:29 2024 UTC