# Reinstalling PHP5 with all of the extensions



## Anon (Oct 28, 2012)

I just reinstalled PHP5 but unfortunately it did not install all my extensions, now my extensions are not loading. How would I allow PHP5 installation to let me select all the extensions I want?


----------



## Anon (Oct 28, 2012)

```
# /usr/local/etc/rc.d/php-fpm restart
Stopping php_fpm.
Waiting for PIDS: 47704.
Starting php_fpm.
[28-Oct-2012 14:19:28] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/calendar.so' - Cannot open "/usr/local/lib/php/20100525/calendar.so" in Unknown on line 0


<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/calendar.so' - Cannot open "/usr/local/lib/php/20100525/calendar.so" in <b>Unknown</b> on line <b>0</b>

[28-Oct-2012 14:19:28] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/ctype.so' - Cannot open "/usr/local/lib/php/20100525/ctype.so" in Unknown on line 0


<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/ctype.so' - Cannot open "/usr/local/lib/php/20100525/ctype.so" in <b>Unknown</b> on line <b>0</b>

[28-Oct-2012 14:19:28] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/dom.so' - Cannot open "/usr/local/lib/php/20100525/dom.so" in Unknown on line 0


<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/dom.so' - Cannot open "/usr/local/lib/php/20100525/dom.so" in <b>Unknown</b> on line <b>0</b>

[28-Oct-2012 14:19:28] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/exif.so' - Cannot open "/usr/local/lib/php/20100525/exif.so" in Unknown on line 0


<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/exif.so' - Cannot open "/usr/local/lib/php/20100525/exif.so" in <b>Unknown</b> on line <b>0</b>

[28-Oct-2012 14:19:28] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/fileinfo.so' - Cannot open "/usr/local/lib/php/20100525/fileinfo.so" in Unknown on line 0


<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/fileinfo.so' - Cannot open "/usr/local/lib/php/20100525/fileinfo.so" in <b>Unknown</b> on line <b>0</b>

[28-Oct-2012 14:19:28] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/filter.so' - Cannot open "/usr/local/lib/php/20100525/filter.so" in Unknown on line 0


<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/filter.so' - Cannot open "/usr/local/lib/php/20100525/filter.so" in <b>Unknown</b> on line <b>0</b>

[28-Oct-2012 14:19:28] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/gd.so' - Cannot open "/usr/local/lib/php/20100525/gd.so" in Unknown on line 0


<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/gd.so' - Cannot open "/usr/local/lib/php/20100525/gd.so" in <b>Unknown</b> on line <b>0</b>

[28-Oct-2012 14:19:28] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/gettext.so' - Cannot open "/usr/local/lib/php/20100525/gettext.so" in Unknown on line 0


<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/gettext.so' - Cannot open "/usr/local/lib/php/20100525/gettext.so" in <b>Unknown</b> on line <b>0</b>

[28-Oct-2012 14:19:28] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/hash.so' - Cannot open "/usr/local/lib/php/20100525/hash.so" in Unknown on line 0


<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/hash.so' - Cannot open "/usr/local/lib/php/20100525/hash.so" in <b>Unknown</b> on line <b>0</b>

[28-Oct-2012 14:19:28] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/iconv.so' - Cannot open "/usr/local/lib/php/20100525/iconv.so" in Unknown on line 0


<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/iconv.so' - Cannot open "/usr/local/lib/php/20100525/iconv.so" in <b>Unknown</b> on line <b>0</b>

[28-Oct-2012 14:19:28] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/json.so' - Cannot open "/usr/local/lib/php/20100525/json.so" in Unknown on line 0


<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/json.so' - Cannot open "/usr/local/lib/php/20100525/json.so" in <b>Unknown</b> on line <b>0</b>

[28-Oct-2012 14:19:28] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/mbstring.so' - Cannot open "/usr/local/lib/php/20100525/mbstring.so" in Unknown on line 0


<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/mbstring.so' - Cannot open "/usr/local/lib/php/20100525/mbstring.so" in <b>Unknown</b> on line <b>0</b>

[28-Oct-2012 14:19:28] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/mcrypt.so' - Cannot open "/usr/local/lib/php/20100525/mcrypt.so" in Unknown on line 0


<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/mcrypt.so' - Cannot open "/usr/local/lib/php/20100525/mcrypt.so" in <b>Unknown</b> on line <b>0</b>

[28-Oct-2012 14:19:28] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/mysql.so' - Cannot open "/usr/local/lib/php/20100525/mysql.so" in Unknown on line 0


<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/mysql.so' - Cannot open "/usr/local/lib/php/20100525/mysql.so" in <b>Unknown</b> on line <b>0</b>

[28-Oct-2012 14:19:28] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/mysqli.so' - Cannot open "/usr/local/lib/php/20100525/mysqli.so" in Unknown on line 0


<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/mysqli.so' - Cannot open "/usr/local/lib/php/20100525/mysqli.so" in <b>Unknown</b> on line <b>0</b>

[28-Oct-2012 14:19:28] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/pdo.so' - Cannot open "/usr/local/lib/php/20100525/pdo.so" in Unknown on line 0
etc....
```


----------



## mamalos (Oct 28, 2012)

Without being extremely sure about it, if I remember correctly I run *make clean* on /usr/ports/lang/php5-extensions directory, then *make config* to select the new extensions *and disselect the already installed ones* and then *make install*. If you don't disselect the already isntalled ones, I think you'll get you an error that these extensions are already installed.

To be honest, I am also curious if there is a more "proper" way of doing this, cause this way you get to "forget" your configuration options. (OK, of course you can infer them by seing you installed packages list, but...)


----------



## Anon (Oct 28, 2012)

Issues solved by portupgrade, thanks wblock. Thanks for the response by the way, mamalos.


----------

