# memcached.so causes an error on php startup after package update



## Fors (Mar 26, 2013)

Hi guys,

I am fed up with the same error with php and pecl-memcached packages. It is difficult to track what brings about the message upon php startup:


```
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/memcached.so' - /usr/local/lib/php/20100525/memcached.so: Undefined symbol "php_session_create_id" in Unknown on line 0
```

This library resides in the same place mentioned in the warning message. I've found out that only reinstalling of pecl-memcached package fixes this problem. But it appears again after I update php package. I also use libmemcached and memcached packages from ports.

Any solution could be found?


----------



## SirDice (Mar 26, 2013)

Fors said:
			
		

> I've found out that only reinstalling of pecl-memcached package fixes this problem. But it appears again after I update php package.


Rebuild everything that depends on PHP after the update. This includes pecl-memcached.


----------



## Fors (Mar 26, 2013)

SirDice said:
			
		

> Rebuild everything that depends on PHP after the update. This includes pecl-memcached.



Is it some kind of a bug? Why does php fails to load dynamic library after updating? I do it with [CMD="portupgrade"] -R -r [/CMD]. However portupgrade(1) will not and should not update pecl-memcached if the version is new. It seems to me appropriate behaviour.


----------



## SirDice (Mar 26, 2013)

Run `# portupgrade -r php5` next time.


----------



## Fors (Mar 26, 2013)

SirDice said:
			
		

> Run `# portupgrade -r php5` next time.


Well, I have to use `# portupgrade -r -f php5` then. Because, as I mentioned, it is very common that pecl-memcached has the latest version while php doesn't.


----------

