# PHP upgrade



## dvl@ (Apr 14, 2010)

This thread (http://forums.freebsd.org/showthread.php?p=77589) seems related, but the solution posted there was not useful here.

I've tried the upgrade process from the ports/UPDATING entry of 20100409.  Failed.

Current problem is demonstrated by:


```
# php
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/json.so' - Cannot open "/usr/local/lib/php/20090626
/json.so" in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/spl.so' - Cannot open "/usr/local/lib/php/20090626
/spl.so" in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/pcre.so' - Cannot open "/usr/local/lib/php/20090626
/pcre.so" in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/simplexml.so' - Cannot open "/usr/local/lib/php/20090626
/simplexml.so" in Unknown on line 0
```

Other issues: security/php5-filter fails to compile:


```
/bin/sh /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/libtool --mode=compile cc  -I. -I/usr/ports/security/php5-filter
/work/php-5.3.2/ext/filter -DPHP_ATOM_INC -I/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/include -I/usr/ports/security/php5-filter
/work/php-5.3.2/ext/filter/main -I/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter -I/usr/local/include/php -I/usr/local/include
/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  
-DHAVE_CONFIG_H  -O2 -pipe -fno-strict-aliasing   -c /usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/logical_filters.c -o 
logical_filters.lo
 cc -I. -I/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter -DPHP_ATOM_INC -I/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter
/include -I/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter/main -I/usr/ports/security/php5-filter/work/php-5.3.2/ext/filter -I/usr
/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext 
-I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -pipe -fno-strict-aliasing -c /usr/ports/security/php5-filter/work/php-5.3.2/ext
/filter/logical_filters.c  -fPIC -DPIC -o .libs/logical_filters.o
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:27:26: error: pcrelib/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.
[root@ngaio:/usr/ports/security/php5-filter] #
```
Ideas?  Suggestions?


----------



## DutchDaemon (Apr 14, 2010)

I would run `pkg_info -W` on the missing .so files to see which ports you need to (re)build.

I have two of them:


```
# pkg_info -W json.so
/usr/local/lib/php/20090626/json.so was installed by package php5-json-5.3.2
# pkg_info -W simplexml.so
/usr/local/lib/php/20090626/simplexml.so was installed by package php5-simplexml-5.3.2
```

The errors in your second block of data point to the missing pcre.so, so resolving the errors in the first block should clear up the other issue.


----------



## FBSDin20Steps (Apr 14, 2010)

Try deleting php5-filter-5.2.12_1 in /var/db/pkg... I've just done it. For me it compiles without errors right now.


----------



## dvl@ (Apr 14, 2010)

```
# pkg_info -W json.so
pkg_info: json.so: file is not in PATH
# pkg_info -W spl.so
pkg_info: spl.so: file is not in PATH
# pkg_info -W pcre.so
pkg_info: pcre.so: file is not in PATH
[root@ngaio:/usr/ports/security/php5-filter] # pkg_info -W simplexml.so
pkg_info: simplexml.so: file is not in PATH
[root@ngaio:/usr/ports/security/php5-filter] #
```
But, FWIW, I did something similar earlier.


```
# portupgrade -f pecl-json php5-simplexml
** Port marked as IGNORE: devel/pecl-json:
        cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 5)
```


----------



## dvl@ (Apr 14, 2010)

And, FWIW, attempts to upgrade php5-simplexml gives:


```
In file included from /usr/local/include/php/ext/spl/spl_iterators.h:27,
                 from /usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml/sxe.c:31:
/usr/local/include/php/ext/pcre/php_pcre.h:27:26: error: pcrelib/pcre.h: No such file or directory
In file included from /usr/local/include/php/ext/spl/spl_iterators.h:27,
                 from /usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml/sxe.c:31:
/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'
```


----------



## dvl@ (Apr 14, 2010)

FBSDin20Steps said:
			
		

> Try deleting php5-filter-5.2.12_1 in /var/db/pkg... I've just done it. For me it compiles without errors right now.



php5-filter is not installed.


```
# ls -l /var/db/pkg/*filter*
ls: /var/db/pkg/*filter*: No such file or directory
```


----------



## ProFTP (Apr 14, 2010)

```
portupgrade -rRfN security/php5-filter
```


----------



## dvl@ (Apr 14, 2010)

ProFTP said:
			
		

> ```
> portupgrade -rRfN security/php5-filter
> ```




```
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:27:26: error: pcrelib/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.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20100414-45279-192p2nb-0 env make
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        ! security/php5-filter  (missing header)
```


----------



## DutchDaemon (Apr 14, 2010)

dvl@ -> please format your posts (so I don't have to) -> http://forums.freebsd.org/showthread.php?t=8816


----------



## ProFTP (Apr 14, 2010)

if this error may be due to the fact that you're not updated ...
...then, you can try:

```
portupgrade -rRf php5
```

and:

```
pkg_info  | grep '^php5*' | awk '{print $1}' | xargs portupgrade -f || pkgdb -fFu && portsclean -CLPP
```
helped me...


----------



## DutchDaemon (Apr 14, 2010)

php5-json-5.3.2 and php5-simplexml-5.3.2 should not be a problem; these provide json.so and simplexml.so.

Your pcre.so should probably have been removed by step 1) of the procedure in /usr/ports/UPDATING (a pkg_delete of php5-pcre should have taken care of it).

Did you use 'make deinstall' to remove those ports, or 'pkg_delete'? The latter is always preferable, because it removes the files installed by the port when it was installed.


----------



## dvl@ (Apr 14, 2010)

pkg_delete was used.


----------



## FBSDin20Steps (Apr 14, 2010)

Got the same problem with php5-filter now. I am now portmastering php5


----------



## dvl@ (Apr 14, 2010)

ProFTP said:
			
		

> if this error may be due to the fact that you're not updated ...
> ...then, you can try:
> 
> ```
> ...



FWIW, I have upgraded PHP5 several times over the past 24 hours trying to fix this. 

It's running now.


----------



## gkontos (Apr 14, 2010)

dvl@ said:
			
		

> FWIW, I have upgraded PHP5 several times over the past 24 hours trying to fix this.
> 
> It's running now.


How did you fix it ?


----------



## dvl@ (Apr 14, 2010)

gkontos said:
			
		

> How did you fix it ?



It is not yet fixed.  By "it is running now" I meant: the portupgrade command is running now.


----------



## FBSDin20Steps (Apr 14, 2010)

Reinstalling php5 with portmaster solved it for me.


----------



## ProFTP (Apr 14, 2010)

dvl@, SUPER script to update http://forums.freebsd.org/showthread.php?t=5658 with the USSR, with the Committee of State Security ... 

... but you may be suffering in source php-filter ...


----------



## ProFTP (Apr 14, 2010)

Building for php5-filter-5.3.2 *** Error code 1


----------



## dvl@ (Apr 14, 2010)

dvl@ said:
			
		

> FWIW, I have upgraded PHP5 several times over the past 24 hours trying to fix this.
> 
> It's running now.



That just finished:


```
[Updating the pkgdb <format:dbm_hash> in /var/db/pkg ... - 698 packages found (-0 +1) . done]
--->  Skipping 'lang/php5-extensions' (php5-extensions-1.1) because a requisite package 'pecl-hash-1.3' (security/pecl-hash) failed (specify -k to force)
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        - devel/pecl-json (marked as IGNORE)
        - security/pecl-hash (marked as IGNORE)
        * lang/php5-extensions (php5-extensions-1.1)
```

and FWIW:


```
# php
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/json.so' - Cannot open "/usr/local/lib/php/20090626/json.so" in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/spl.so' - Cannot open "/usr/local/lib/php/20090626/spl.so" in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/pcre.so' - Cannot open "/usr/local/lib/php/20090626/pcre.so" in Unknown on line 0
```

But I'm about to try the second part of the suggestion from above.


----------



## dvl@ (Apr 14, 2010)

The results of the second step:


```
# pkg_info  | grep '^php5*' | awk '{print $1}' | xargs portupgrade -f || pkgdb -fFu && portsclean -CLPP
Stale dependency: php5-extensions-1.1 --> php5-simplexml-5.3.2 -- manually run 'pkgdb -F' to fix, or specify -O to force.
--->  Updating the pkgdb
[Rebuilding the pkgdb <format:dbm_hash> in /var/db/pkg ... - 698 packages found (-0 +698) . done]
--->  Checking the package registry database
Stale dependency: php5-extensions-1.1 -> php5-simplexml-5.3.2 (textproc/php5-simplexml):
php5-sockets-5.3.2 (score:37%) ? ([y]es/[n]o/[a]ll) [no] a
Fixed. (-> php5-sockets-5.3.2)
Stale dependency: php5-extensions-1.1 -> pecl-filter-0.11.0 (security/php5-filter):
pecl-json-1.2.1 (score:29%) ? ([y]es/[n]o/[a]ll) [no] a
Fixed. (-> pecl-json-1.2.1)
Cleaning out /usr/ports/*/*/work...
Delete /usr/ports/graphics/ilmbase/work
Delete /usr/ports/graphics/linux-f8-dri/work
Delete /usr/ports/security/php5-filter/work
Delete /usr/ports/security/courier-authlib-base/work
Delete /usr/ports/textproc/gnome-doc-utils/work
Delete /usr/ports/textproc/rarian/work
done.
Cleaning out /usr/ports/packages...
cd: can't cd to /usr/ports/packages/All
find: /usr/ports/packages: No such file or directory
```

But still:


```
# php
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/json.so' - Cannot open "/usr/local/lib/php/20090626
/json.so" in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/spl.so' - Cannot open "/usr/local/lib/php/20090626
/spl.so" in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/pcre.so' - Cannot open "/usr/local/lib/php/20090626
/pcre.so" in Unknown on line 0

# which php
/usr/local/bin/php
# ls -l /usr/local/bin/php
-rwxr-xr-x  1 root  wheel  2678524 Apr 14 19:23 /usr/local/bin/php
# date
Wed Apr 14 20:41:13 BST 2010
#
```

Searching, I find:


```
# find /usr/local/lib/php -name json.so
/usr/local/lib/php/20060613/json.so

# find /usr/local/lib/php -name spl.so
/usr/local/lib/php/20060613/spl.so

# find /usr/local/lib/php -name pcre.so
/usr/local/lib/php/20060613/pcre.so
```

But then it is interesting who owns those:

```
# pkg_info -W /usr/local/lib/php/20060613/json.so
/usr/local/lib/php/20060613/json.so was installed by package pecl-json-1.2.1
# pkg_info -W /usr/local/lib/php/20060613/spl.so
# pkg_info -W /usr/local/lib/php/20060613/pcre.so
#
```

spl and pcre do not belong to any package.

But it's not like I can upgrade pecl-json:


```
# portupgrade -f pecl-json
** Port marked as IGNORE: devel/pecl-json:
        cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 5)
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        - devel/pecl-json (marked as IGNORE)
```


----------



## dvl@ (Apr 14, 2010)

ProFTP said:
			
		

> Building for php5-filter-5.3.2 *** Error code 1



I tried that one first.  It is the thread mentioned in my first post.


----------



## gkontos (Apr 14, 2010)

```
pkg_delete -f php5*

cd /usr/ports/lang/php5/
make install
cp /usr/ports/lang/php5/work/php-5.3.2/ext/pcre/pcrelib/pcre.h /usr/local/include/php/ext/pcre/
make clean
cd /var/db/ports
rm -rf php5-extensions
cd /usr/ports/lang/php5-extensions/
make install clean
```

Thats what I did before.


----------



## dvl@ (Apr 15, 2010)

gkontos said:
			
		

> ```
> pkg_delete -f php5*
> 
> cd /usr/ports/lang/php5/
> ...



Tried that.  Fails:


```
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:27:26: error: pcrelib/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/lang/php5-extensions.
*** Error code 1

Stop in /usr/ports/lang/php5-extensions.
```


----------



## FBSDin20Steps (Apr 15, 2010)

You can't install php5 because php5-filter gives you the error?


----------



## dvl@ (Apr 15, 2010)

I am annoyed, but happy that this is only my development server, and not my production server.


----------



## dvl@ (Apr 15, 2010)

FBSDin20Steps said:
			
		

> You can't install php5 because php5-filter gives you the error?



php5 is installed.  I'm now trying to install php5-extensions:


```
/php-5.3.2/ext/simplexml/sxe.c -o sxe.lo
 cc -I. -I/usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml -DPHP_ATOM_INC -I/usr/ports/textproc/php5-simplexml/work/php-
5.3.2/ext/simplexml/include -I/usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml/main -I/usr/ports/textproc/php5-simplexml
/work/php-5.3.2/ext/simplexml -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include
/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include/libxml2 -I/usr/local/include -DHAVE_CONFIG_H 
-O2 -pipe -fno-strict-aliasing -c /usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml/sxe.c  -fPIC -DPIC -o .libs/sxe.o
In file included from /usr/local/include/php/ext/spl/spl_iterators.h:27,
from /usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml/sxe.c:31:
/usr/local/include/php/ext/pcre/php_pcre.h:27:26: error: pcrelib/pcre.h: No suchfile or directory
In file included from /usr/local/include/php/ext/spl/spl_iterators.h:27,
from /usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml/sxe.c:31:
/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'
*** Error code 1
1 error
*** Error code 1

Stop in /usr/ports/textproc/php5-simplexml.
*** Error code 1

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

Stop in /usr/ports/lang/php5-extensions.
[root@ngaio:/usr/ports/lang/php5-extensions] #
```

and here is what goes smoothly:


```
# pkg_info | grep -i php5
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-dba-5.3.2      The dba 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-gettext-5.3.2  The gettext shared extension for php
php5-hash-5.3.2     The hash 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-mysql-5.3.2    The mysql shared extension for php
php5-openssl-5.3.2  The openssl shared extension for php
php5-pdo-5.3.2      The pdo shared extension for php
php5-pgsql-5.3.2    The pgsql shared extension for php
php5-posix-5.3.2    The posix shared extension for php
php5-session-5.3.2  The session shared extension for php
```


----------



## FBSDin20Steps (Apr 15, 2010)

Did clean out lang/php5-extensions before installing again?


----------



## FBSDin20Steps (Apr 15, 2010)

I am reinstalling php5 on my 8.0-Stable box. See what happens...


----------



## FBSDin20Steps (Apr 15, 2010)

No issues at all.


```
The following actions were performed:
	Re-installation of php5-5.3.2
	Re-installation of php5-tokenizer-5.3.2
	Re-installation of php5-session-5.3.2
	Re-installation of php5-sqlite-5.3.2
	Re-installation of php5-ctype-5.3.2
	Re-installation of php5-gettext-5.3.2
	Re-installation of php5-zlib-5.3.2
	Re-installation of php5-filter-5.3.2
	Re-installation of php5-pdo-5.3.2
	Re-installation of php5-pdo_sqlite-5.3.2
	Re-installation of php5-iconv-5.3.2
	Re-installation of php5-hash-5.3.2
	Re-installation of php5-bz2-5.3.2
	Re-installation of php5-mysql-5.3.2
	Re-installation of php5-json-5.3.2
	Re-installation of php5-gd-5.3.2
	Re-installation of php5-openssl-5.3.2
	Re-installation of php5-posix-5.3.2
	Re-installation of php5-dom-5.3.2
	Re-installation of php5-simplexml-5.3.2
	Re-installation of php5-xml-5.3.2
	Re-installation of php5-xmlreader-5.3.2
	Re-installation of php5-xmlwriter-5.3.2
	Re-installation of php5-extensions-1.4
	Re-installation of php5-mbstring-5.3.2
	Re-installation of php5-zip-5.3.2
	Re-installation of php5-imap-5.3.2
	Re-installation of php5-xmlrpc-5.3.2
	Re-installation of php5-mcrypt-5.3.2
```

Did you clean up unused dependencies related to pcre?


----------



## dvl@ (Apr 15, 2010)

FBSDin20Steps said:
			
		

> Did you clean up unused dependencies related to pcre?



What do you mean?


----------



## dvl@ (Apr 15, 2010)

FBSDin20Steps said:
			
		

> Did clean out lang/php5-extensions before installing again?



Do you mean make clean?


----------



## FBSDin20Steps (Apr 15, 2010)

Yes. Make clean or make deinstall clean.


----------



## FBSDin20Steps (Apr 15, 2010)

dvl@ said:
			
		

> What do you mean?



Check on stale entries... remove or update. Like 
	
	



```
# portmaster --check-depends
```


----------



## dvl@ (Apr 15, 2010)

Well, at this point in time, I have no PHP ports installed (they fail), so there will be failed dependencies:


```
===>>> Checking fruity-1.0.r2_3
        ===>>> www/php5-session is listed as a dependency
        ===>>> but there is no installed version

        ===>>> Delete this dependency data? y/n [n] n
        ===>>> databases/php5-mysql is listed as a dependency
        ===>>> but there is no installed version
```

Not much value in doing that....


----------



## dvl@ (Apr 15, 2010)

Current status, which is unchanged from my original post.

The problem is: pcrelib/pcre.h: No such file or directory


```
===>  Building for php5-simplexml-5.3.2
/bin/sh /usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml/libtool --mode=compile cc  -I. -I/usr/ports/textproc/php5-simplexml
/work/php-5.3.2/ext/simplexml -DPHP_ATOM_INC -I/usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml/include -I/usr/ports/textproc
/php5-simplexml/work/php-5.3.2/ext/simplexml/main -I/usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml -I/usr/local/include/php 
-I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include
/php/ext/date/lib -I/usr/local/include/libxml2 -I/usr/local/include  -DHAVE_CONFIG_H  -O2 -pipe -fno-strict-aliasing   -c /usr/ports/textproc
/php5-simplexml/work/php-5.3.2/ext/simplexml/simplexml.c -o simplexml.lo
mkdir .libs
 cc -I. -I/usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml -DPHP_ATOM_INC -I/usr/ports/textproc/php5-simplexml/work/php-
5.3.2/ext/simplexml/include -I/usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml/main -I/usr/ports/textproc/php5-simplexml
/work/php-5.3.2/ext/simplexml -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include
/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include/libxml2 -I/usr/local/include -DHAVE_CONFIG_H 
-O2 -pipe -fno-strict-aliasing -c /usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml/simplexml.c  -fPIC -DPIC -o .libs/simplexml.o
/bin/sh /usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml/libtool --mode=compile cc  -I. -I/usr/ports/textproc/php5-simplexml
/work/php-5.3.2/ext/simplexml -DPHP_ATOM_INC -I/usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml/include -I/usr/ports/textproc
/php5-simplexml/work/php-5.3.2/ext/simplexml/main -I/usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml -I/usr/local/include/php 
-I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include
/php/ext/date/lib -I/usr/local/include/libxml2 -I/usr/local/include  -DHAVE_CONFIG_H  -O2 -pipe -fno-strict-aliasing   -c /usr/ports/textproc
/php5-simplexml/work/php-5.3.2/ext/simplexml/sxe.c -o sxe.lo
 cc -I. -I/usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml -DPHP_ATOM_INC -I/usr/ports/textproc/php5-simplexml/work/php-
5.3.2/ext/simplexml/include -I/usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml/main -I/usr/ports/textproc/php5-simplexml
/work/php-5.3.2/ext/simplexml -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include
/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include/libxml2 -I/usr/local/include -DHAVE_CONFIG_H 
-O2 -pipe -fno-strict-aliasing -c /usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml/sxe.c  -fPIC -DPIC -o .libs/sxe.o
In file included from /usr/local/include/php/ext/spl/spl_iterators.h:27,
                 from /usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml/sxe.c:31:
/usr/local/include/php/ext/pcre/php_pcre.h:27:26: error: pcrelib/pcre.h: No such file or directory
In file included from /usr/local/include/php/ext/spl/spl_iterators.h:27,
                 from /usr/ports/textproc/php5-simplexml/work/php-5.3.2/ext/simplexml/sxe.c:31:
/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'
*** Error code 1
1 error
*** Error code 1

Stop in /usr/ports/textproc/php5-simplexml.
*** Error code 1

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

Stop in /usr/ports/lang/php5-extensions.
```


----------



## DutchDaemon (Apr 15, 2010)

That's strange, because this is in lang/php5's pkg-pklist:


```
%%PCRE%%include/php/ext/pcre/pcrelib/pcre.h
```

Though it's not present on my PHP installations either.

I do have /usr/local/include/php/ext/pcre/php_pcre.h (which is also in the pkg-plist)


----------



## dvl@ (Apr 15, 2010)

There is something messed up, for sure...


----------



## fraenki (Apr 16, 2010)

dvl@ said:
			
		

> Current status, which is unchanged from my original post.
> 
> The problem is: pcrelib/pcre.h: No such file or directory



I've posted a solution to this problem in another thread.

HTH

fraenki


----------



## Elwood (Apr 16, 2010)

First, you have to delete php5-pcre. Rebuild php5-filter and php5 


```
[/usr/ports] # make quicksearch name=php5-pcre
Port:   devel/php5-pcre
Moved:  lang/php5
Date:   2010-04-09
Reason: Bundled in core php
```


----------



## DutchDaemon (Apr 16, 2010)

There is some movement on this topic:

This just showed up in the ports tree:


```
lang/php5 - 5.3.2

Add CONFLICTS to php5-pcre and php5-spl.
```


----------



## dvl@ (Apr 16, 2010)

Hah!

I found a solution:

I think I have my php issues resolved.  had to: `cd /usr/local; pkg_delete php5*; rm etc/php lib/php include/php`

=> http://docs.freebsd.org/cgi/getmsg.cgi?fetch=547062+0+current/freebsd-ports

At present, upgrading a bunch of other ports that rely upon png.  I think this can be considered SOLVED now.


----------

