PHP5 upgrade problems - php5-pcre

Hello All,

I've done a few php upgrades in the past and never had any real issues. This time I was upgrading and there seemed to be quite a few problems. I keep seeing it complain about php5-pcre which I guess was moved into the core of php5.

I deinstalled and reinstalled php5 and that seems okay. It only complains when installing the extentsions. It stops on php5-filter.

Here's the output

Code:
In file included from /usr/local/include/php/main/../main/php_config.h:2764,
                 from /usr/local/include/php/Zend/zend_config.h:1,
                 from /usr/local/include/php/Zend/zend.h:51,
                 from /usr/local/include/php/main/SAPI.h:24,
                 from /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/php_filter.h:25,
                 from /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c:22:
/usr/local/include/php/ext/php_config.h:3:29: error: ext/pcre/config.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: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

Stop in /usr/ports/security/php5-filter.
*** Error code 1

Stop in /usr/ports/security/php5-filter.
*** Error code 1

Stop in /usr/ports/lang/php5-extensions.
*** Error code 1

Stop in /usr/ports/lang/php5-extensions.
*** Error code 1

any help would be great
 
From
/usr/ports/UPDATING

20100409:
AFFECTS: users of lang/php5
AUTHOR: ale@FreeBSD.org

As of php 5.3, a few extensions were removed from or included into the core
php5 package. Follow the steps below to update your installation.

1) Delete the following packages (if installed):
- php5-dbase
- php5-ncurses
- php5-pcre
- php5-spl
- php5-ming
- php5-mhash

2) Rebuild php5 and all ports depending on it.
 
Hello,

I've followed the section in /usr/ports/UPDATING and I still get errors regarding pcre when trying to install php5-zip. Strangely, all the other php5-* ports that failed prior to performing what is outlined in /usr/ports/UPDATING rebuilt without a problem.

Any ideas?
 
To add to my previous reply (sorry I don't have an edit button), here are the php packages currently installed:

Code:
php5-5.3.2          PHP Scripting Language
php5-bz2-5.3.2      The bz2 shared extension for php
php5-ctype-5.3.2    The ctype shared extension for php
php5-dom-5.3.2      The dom shared extension for php
php5-gd-5.3.2       The gd shared extension for php
php5-iconv-5.3.2    The iconv shared extension for php
php5-json-5.3.2     The json shared extension for php
php5-mbstring-5.3.2 The mbstring shared extension for php
php5-mcrypt-5.3.2   The mcrypt shared extension for php
php5-mysql-5.3.2    The mysql shared extension for php
php5-openssl-5.3.2  The openssl shared extension for php
php5-pspell-5.3.2   The pspell shared extension for php
php5-readline-5.3.2 The readline shared extension for php
php5-session-5.3.2  The session shared extension for php
php5-simplexml-5.3.2 The simplexml shared extension for php
php5-xml-5.3.2      The xml shared extension for php
php5-zlib-5.3.2     The zlib shared extension for php
 
I was running into a similar issue as t0ken where I ran # portupgrade -f php5 but still ran into issues when trying to run # portupgrade -a that any of my php5 extensions resulted in a message of
Code:
error: ext/pcre/config.h: No such file or directory
I then decided to uninstall php5, move /usr/local/include/php/ext/php_config.h to a different location, reinstall php5 and then try rebuilding the php5 extensions again and that did work. It turns out that simply running # portupgrade -f php5 doesn't do everything I needed and there are some residual traces of the old install still found on the system.

I'm not sure I had to uninstall php5 to get this to work, I could have probably just moved /usr/local/include/php/ext/php_config.h then run # portupgrade -f php5 but at least the rest of my # portupgrade -a upgrades are completing without errors.
 
nice Nice trick with /usr/local/include/php/ext/php_config.h !

todayToday i I waste[d] so mach much time upgrading php5-5.2 to php5-5.3 with similar errors and only youк your solution deleting this file and reinstall php with libs help me.

thank Thank you!
 
I've been struggling with my php install for a few days, found out I had some extensions that were not upgraded.. anyways great trick thanks for the post :)
 
Back
Top