# PHP Extensions Port Preventing Update



## tuaris (Jan 30, 2009)

I'm following the instructions as said here:
20081211:
  AFFECTS: users of lang/php5
  AUTHOR: pav@FreeBSD.org, itetcu@FreeBSD.org, ale@FreeBSD.org

  As of php 5.2.7, pcre extension is distributed with the core php5 package,
  and not as a standalone module anymore.  Follow these steps to update your
  installation:

  Portupgrade users:
   pkg_delete -f php5-pcre-5.2.6
   pkgdb -F
   portupgrade as usual

  Portmaster users:
   pkg_delete -f php5-pcre\*
   portmaster php5\*

But it fails with this:

===>>> Creating a backup package for old version php5-extensions-1.1
Segmentation fault (core dumped)
===>  Installing for php5-extensions-1.2
===>   Generating temporary packing list
===>  Checking if lang/php5-extensions already installed
===>   php5-extensions-1.2 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of lang/php5-extensions
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

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

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

===>>> A backup package for php5-extensions-1.1 should
       be located in /usr/ports/packages/portmaster-backup

===>>> Installation of php5-extensions-1.2 (lang/php5-extensions) failed
===>>> Aborting update

===>>> Update for php5-extensions-1.1 failed
===>>> Aborting update

===>>> The following actions were performed:
	Re-installation of php5-simplexml-5.2.8
	Re-installation of php5-gd-5.2.8
	Re-installation of php5-ctype-5.2.8
	Re-installation of php5-pdo_sqlite-5.2.8
	Re-installation of php5-posix-5.2.8
	Re-installation of php5-sqlite-5.2.8
	Re-installation of php5-pspell-5.2.8
	Re-installation of php5-dom-5.2.8
	Re-installation of php5-pdo-5.2.8
	Re-installation of php5-xml-5.2.8
	Re-installation of php5-extensions-1.2
	Re-installation of php5-mbstring-5.2.8

[root@saturn /usr/ports/lang/php5-extensions]#


----------



## MarS (Jan 30, 2009)

```
cd /usr/ports/lang/php5-extensions
make deinstall
make reinstall
```

Then try again.


----------



## tuaris (Jan 30, 2009)

Oops, forgot to include the actual problem:

[root@saturn /usr/ports/lang/php5-extensions]# make deinstall
===>  Deinstalling for lang/php5-extensions
===>   Deinstalling php5-extensions-1.1
Segmentation fault (core dumped)
*** Error code 139

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


----------



## r-c-e (Jan 30, 2009)

Try tracing the issue to see if you can find any reasons why it is segfaulting:


```
[CODE]mount -t procfs /proc /proc; truss make deinstall
```
[/code]


----------



## tuaris (Jan 30, 2009)

I attached the output as a text file.


----------



## tuaris (Jan 31, 2009)

I would really like not to have to uninstall everything PHP, but if it's the only way.  Then please tell me how to do it.


----------



## tuaris (Feb 3, 2009)

Can some one please help? My PHP is broken.


----------



## danger@ (Feb 3, 2009)

`# pkg_delete -f php5-\*`


----------



## tuaris (Feb 3, 2009)

That did not work:

pkg_delete -f php5-\*
pkg_delete: package 'php5-bz2-5.2.8' is required by these other packages
and may not be deinstalled (but I'll delete it anyway):
phpMyAdmin-3.1.2
Segmentation fault: 11 (core dumped)


----------



## danger@ (Feb 3, 2009)

your system is broken, I don't know what's going on...
would be helpful to know what's dumping core for you...


----------



## tuaris (Feb 3, 2009)

I was finally able to get this fixed, and it wasn't pretty.

I had do go to each php5 port, delete it from /var/db/pkgdb, do a "make install" then a "make deinstall" until everything PHP was removed.  I rebuilt the ports db with "pkgdb -fu" and ran "portmaster -aud" to make sure everything is up to date.

After that, I was able to ahead and reinstall my PHP ports as needed.

My only question now is what happened? why did the command I first posted destroy my system?


----------



## mecano (Feb 6, 2009)

Have similar problem but with automake, have a read here http://www.nabble.com/pkg_delete-core-dump-td20546143.html
and here
http://forums.freebsd.org/showthread.php?t=2014


----------

