I've been messing around with pkg install, installing / removing both php5-5.4.29 and php55-5.5.13.

But when I run php from the command line, it will give me an error like this:

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

If I try the 5.5.13 version, the error is this:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20121212/posix.so' - Cannot open "/usr/local/lib/php/20121212/posix.so" in Unknown on line 0

Anyone have some tips how I can clean the mess I've made and do a fresh install of php55-5.5.13 ?

EDIT: I also noticed that an old php version from the ports is installed, which seems to be conflicting with the pkg one. But trying to (re)install from ports will give me:

PHP xx doesn't install the Apache module anymore: update your OPTIONS and build www/mod_php5 port instead

  • Try creating that folder first. – schaiba Jun 30 '14 at 11:08
  • made no difference – Oli Jun 30 '14 at 11:32
  • Run php-config and check your --extension-dir path. You may need to change the installation directory with ./configure --prefix=DIR or something. There's a really good guide here. phpinternalsbook.com/build_system/building_php.html Just realized how old this question is. – iyrin Feb 14 '15 at 7:47

pkg install mod_php5 should take care of it.

  • I get a long list of warnings like these: pkg: WARNING: locally installed php55-5.5.13 conflicts on /usr/local/man/man1/phpize.1.gz with: - php5-5.4.29 – Oli Jul 7 '14 at 9:07
  • Sorry, it wasn't clear from your question which version of PHP you were actually wanting to use. If you want php 5.4, install mod_php5. If you want php 5.5, install mod_php55. I would not try to install both. – Steve Wills Jul 7 '14 at 20:25
  • Well the installing is no problem, it's getting rid of the old PHP that's the problem it seems (the one once installed by ports collection) – Oli Jul 8 '14 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.