From: Beor on
Digging around te link sent by indi, I found the solution:
1. Hack-style solution:
cd /usr/ports/lang/php5/
make extract
cp /usr/ports/lang/php5/work/php-5.3.2/ext/pcre/pcrelib/pcre.h /usr/local/include/php/ext/pcre/
I tested it and it works, but it might not work of future upgrades of php
2. This is probably the proper solution, but I was too impatient to test it:
Compile lang/php5 with WITH_BUNDLED_PCRE="YES".
Would have been nice to have this mentioned in UPDATING...
Thank all for helping.



On 2010-05-13, Beor <gabi(a)beor.homeip.net> wrote:
> Hello,
> I am trying to upgrade php5-filter on a fresh FBSD 8.0 on AMD64 and I start
> having problems below. I have a working instalation of php 5.3. The only way I
> could install php5-filter was to use a package (portinstall -PP php5-filter).
> I have almost the same problem with php5-zip.
> I would appreciate if anyone can give me some hints about installing this port.
>
>=======
> In file included from /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:25:
> /usr/local/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory
> In file included from /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:25:
> /usr/local/include/php/ext/pcre/php_pcre.h:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
> /usr/local/include/php/ext/pcre/php_pcre.h:38: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
> /usr/local/include/php/ext/pcre/php_pcre.h:44: error: expected specifier-qualifier-list before 'pcre'
> /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c: In function 'php_filter_validate_regexp':
> /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: 'pcre' undeclared (first use in this function)
> /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: (Each undeclared identifier is reported only once
> /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: for each function it appears in.)
> /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:412: error: 're' undeclared (first use in this function)
> /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:413: error: 'pcre_extra' undeclared (first use in this function)
> /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c: In function 'php_filter_validate_email':
> /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:500: error: 'pcre' undeclared (first use in this function)
> /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:500: error: 're' undeclared (first use in this function)
> /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:501: error: 'pcre_extra' undeclared (first use in this function)
> *** Error code 1
> 1 error
> *** Error code 1
>=======
>
> After which the upgrade proces fails with the so-ever-helpful message
> "** Fix the problem and try again." and
>
>=======
> ** Listing the failed packages (-:ignored / *:skipped / !:failed)
> ! security/php5-filter (php5-filter-5.2.11) (missing header)
>=======
From: Spam on

On Thu, 13 May 2010, Beor wrote:
> Digging around te link sent by indi, I found the solution:
> 1. Hack-style solution:
> cd /usr/ports/lang/php5/
> make extract
> cp /usr/ports/lang/php5/work/php-5.3.2/ext/pcre/pcrelib/pcre.h /usr/local/include/php/ext/pcre/
> I tested it and it works, but it might not work of future upgrades of php
> 2. This is probably the proper solution, but I was too impatient to test it:
> Compile lang/php5 with WITH_BUNDLED_PCRE="YES".
> Would have been nice to have this mentioned in UPDATING...
> Thank all for helping.

If you are supporting any kind of complicated web environment, PHP builds
are confusing, to say the least, but the magic is primarily in the
configure stage ... For example, the following is necessary to compile
PHP 5.3.2 source (from the PHP project not a port) on FreeBSD 8.x to support:

apache22
PDO_
sqlite3
mysql
postgresql
gd with freetype

but of course, YMMV ... oh, and of course zlib, jpeg, png, gd, freetype,
sqlite, postgresql, mysql, and apache22 all had to installed first, and
IIRC, PCRE is loaded by default.

.../configure \
--with-apxs2=/usr/local/sbin/apxs \
--enable-mbstring \
--with-pgsql=/usr/local/pgsql \
--with-pdo-pgsql=/usr/local/pgsql/bin/pg_config \
--with-pdo-sqlite=/usr/local/lib/libsqlite3.so \
--with-pdo-mysql=/usr/local/bin/mysql_config \
--with-mysql=mysqlnd \
--with-sqlite \
--enable-shared \
--with-gd \
--with-jpeg-dir=/usr/local/lib \
--with-png-dir=/usr/local/lib \
--with-zlib-dir=/usr/local/lib \
--with-freetype-dir=/usr/local/lib \
--enable-gd-native-ttf

make all test

From: Helmut Schneider on
Beor wrote:

> Digging around te link sent by indi, I found the solution:
> 1. Hack-style solution:
> cd /usr/ports/lang/php5/
> make extract
> cp /usr/ports/lang/php5/work/php-5.3.2/ext/pcre/pcrelib/pcre.h
> /usr/local/include/php/ext/pcre/ I tested it and it works, but it
> might not work of future upgrades of php 2. This is probably the
> proper solution, but I was too impatient to test it: Compile
> lang/php5 with WITH_BUNDLED_PCRE="YES". Would have been nice to have
> this mentioned in UPDATING... Thank all for helping.

There is no "WITH_BUNDLED_PCRE" because pcre is now part of php core.
Your ports-tree might be out-of-date. And/Or the removal of
php5-pcre-5.2.x failed.

Helmut

--
No Swen today, my love has gone away
My mailbox stands for lorn, a symbol of the dawn
From: Beor on
On 2010-05-15, Helmut Schneider <jumper99(a)gmx.de> wrote:
> Beor wrote:
>
>> Digging around te link sent by indi, I found the solution:
>> 1. Hack-style solution:
>> cd /usr/ports/lang/php5/
>> make extract
>> cp /usr/ports/lang/php5/work/php-5.3.2/ext/pcre/pcrelib/pcre.h
>> /usr/local/include/php/ext/pcre/ I tested it and it works, but it
>> might not work of future upgrades of php 2. This is probably the
>> proper solution, but I was too impatient to test it: Compile
>> lang/php5 with WITH_BUNDLED_PCRE="YES". Would have been nice to have
>> this mentioned in UPDATING... Thank all for helping.
>
> There is no "WITH_BUNDLED_PCRE" because pcre is now part of php core.
> Your ports-tree might be out-of-date. And/Or the removal of
> php5-pcre-5.2.x failed.
>
> Helmut
>
One would think so, and indeed this is what I assumed too. But this is
a FRESH install of FBSD 8.0, with the ports updated two days ago. Yet
php5 did not extract the required pcre.h file. I never installed any php
5.2x port.