{"id":603,"date":"2010-04-06T21:35:25","date_gmt":"2010-04-07T02:35:25","guid":{"rendered":"http:\/\/75.134.27.61:8101\/wordpress\/?p=603"},"modified":"2012-08-14T20:48:20","modified_gmt":"2012-08-15T01:48:20","slug":"weird-php-error-after-freebsd-port-upgrade","status":"publish","type":"post","link":"https:\/\/icesquare.com\/wordpress\/weird-php-error-after-freebsd-port-upgrade\/","title":{"rendered":"Weird PHP Error after FreeBSD port upgrade (PHP Warning:  PHP Startup: Unable to load dynamic library)"},"content":{"rendered":"<p>Today I upgraded the port on my FreeBSD box using portmaster tools:<\/p>\n<pre>portmaster -Dai\r\n<\/pre>\n<p>After that, I found that the PHP gave the following weird error:<\/p>\n<pre>php -v\r\n\r\nPHP Warning:  PHP Startup: Unable to load dynamic library '\/usr\/local\/lib\/php\/20060613\/memcached.so' - \/usr\/local\/lib\/php\/20060613\/memcached.so: Undefined symbol \" php_session_create_id\" in Unknown on line 0\r\n\r\nPHP Warning:  PHP Startup: Unable to load dynamic library '\/usr\/local\/lib\/php\/20060613\/mysql.so' - Cannot open \"\/usr\/local\/lib\/php\/20060613\/mysql.so\" in Unknown on line 0\r\n\r\nPHP 5.2.12 with Suhosin-Patch 0.9.7 (cli) (built: Apr  6 2010 15:50:36)\r\nCopyright (c) 1997-2009 The PHP Group\r\nZend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies\r\n<\/pre>\n<p>In order to solve this problem, you will need to rebuild the port. In my situation, I need to clean up, uninstall, rebuild and install the affected ports:<\/p>\n<p>Memcached: <strong>\/usr\/ports\/databases\/pecl-memcached<\/strong><\/p>\n<p>MySQL: <strong>\/usr\/ports\/databases\/php5-mysql<\/strong><\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n<strong>Update on 2010.04.13:<\/strong><br \/>\nYour situation may be different from mine. The tricky part is to rebuild the port at the right location. For example, if your PHP complains about pdo.so, you can rebuild the port at the affected location:<\/p>\n<p>\/usr\/ports\/database\/php5-pdo<\/p>\n<p>If you are not sure where does the port locate, you can search it on Google or find it with the following command:<\/p>\n<pre>find \/usr\/ports\/ -name \"*pdo*\"\r\n<\/pre>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>In each affected port, run the following commands:<\/p>\n<pre>make clean\r\nmake deinstall\r\nmake\r\nmake install &amp;&amp; sync\r\nmake clean\r\n<\/pre>\n<p>After that, restart the PHP by restarting Apache:<\/p>\n<pre>sudo apachectl restart\r\n<\/pre>\n<p>and run the php command again:<\/p>\n<pre>php -v\r\n<\/pre>\n<p>The error should be gone:<\/p>\n<pre>PHP 5.2.12 with Suhosin-Patch 0.9.7 (cli) (built: Apr  6 2010 15:50:36)\r\nCopyright (c) 1997-2009 The PHP Group\r\nZend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies\r\n<\/pre>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I upgraded the port on my FreeBSD box using portmaster tools: portmaster -Dai After that, I found that the PHP gave the following weird error: php -v PHP Warning: <a class=\"more-link\" href=\"https:\/\/icesquare.com\/wordpress\/weird-php-error-after-freebsd-port-upgrade\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[94,7,144,6],"tags":[171,172],"class_list":["post-603","post","type-post","status-publish","format-standard","hentry","category-computer-problems-computer-help-pc-support","category-freebsd","category-sever-problem","category-technology","tag-freebsd","tag-php"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p1sqzr-9J","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":3596,"url":"https:\/\/icesquare.com\/wordpress\/shared-object-libsqlite3-so-8-not-found\/","url_meta":{"origin":603,"position":0},"title":"Shared object &#8220;libsqlite3.so.8&#8221; not found","author":"Derrick","date":"July 1, 2014","format":false,"excerpt":"I noticed some weird thing on my server today. When I ran some PHP code, I got the following error: PHP Warning: PHP Startup: Unable to load dynamic library '\/usr\/local\/lib\/php\/20121212-zts\/pdo_sqlite.so' - Shared object \"libsqliteo_sqlite.so\" in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library '\/usr\/local\/lib\/php\/20121212-zts\/pdo_sqlite.so' - Shared\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2502,"url":"https:\/\/icesquare.com\/wordpress\/freebsdproblem-to-update-php-port\/","url_meta":{"origin":603,"position":1},"title":"[FreeBSD]Problem to update PHP port","author":"Derrick","date":"January 12, 2012","format":false,"excerpt":"A new version of PHP (5.3.9) was available in FreeBSD today. Since it contained a lot of security fixes and enhancements, I decided to give it a try. After testing the new PHP in couple test servers, I think it is ready to upgrade the PHP on the production server.\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1489,"url":"https:\/\/icesquare.com\/wordpress\/php-warning-php-startup-unable-to-load-dynamic-library-usrlocallibphp20090626tokyo_tyrant-so-usrlocallibphp20090626tokyo_tyrant-so-undefined-symbol-ps_globals-in-unknown-on-l\/","url_meta":{"origin":603,"position":2},"title":"PHP Warning:  PHP Startup: Unable to load dynamic library &#8216;\/usr\/local\/lib\/php\/20090626\/tokyo_tyrant.so&#8217; &#8211; \/usr\/local\/lib\/php\/20090626\/tokyo_tyrant.so: Undefined symbol &#8220;ps_globals&#8221; in Unknown on line 0","author":"Derrick","date":"August 23, 2011","format":false,"excerpt":"Every time I upgrade the PHP and related extensions, I always run into the same problem with some PHP-PECL modules. Recently with the new release of PHP 5.3.7, there is no exception for the trouble. So what kind of trouble I have today? The Tokyo Tyrant (The middleman between my\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"\/wordpress\/wp-content\/uploads\/2011\/08\/tokyocabinet.png","width":350,"height":200},"classes":[]},{"id":2777,"url":"https:\/\/icesquare.com\/wordpress\/solvedproblem-to-update-openldap-in-freebsd\/","url_meta":{"origin":603,"position":3},"title":"[Solved]Problem to Update OpenLDAP in FreeBSD","author":"Derrick","date":"April 29, 2012","format":false,"excerpt":"Recently, I found the following error message when updating my FreeBSD system regarding to the OpenLDAP: ===> Installing for openldap-client-2.4.31 ===> Generating temporary packing list ===> Checking if net\/openldap24-client already installed ===> Creating users and\/or groups. Using existing group `ldap'. Creating user `ldap' with uid `389'. pw: user 'ldap' already\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3514,"url":"https:\/\/icesquare.com\/wordpress\/freebsdphp-does-not-work-after-upgrading-apache-to-2-2-27\/","url_meta":{"origin":603,"position":4},"title":"[FreeBSD]PHP does not work after upgrading Apache to 2.2.27","author":"Derrick","date":"April 11, 2014","format":false,"excerpt":"I upgraded the Apache to 2.2.27 on my FreeBSD box via portmaster. The upgrade went very smooth. After the upgrade, I found that Apache no longer rendered the PHP page correctly. In the other words, it displayed the source code of the PHP files instead of executing the code. Before\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2792,"url":"https:\/\/icesquare.com\/wordpress\/phpfreebsd-the-databasesphp5-sqlite-port-has-been-deleted-removed-from-core-php-aborting-update\/","url_meta":{"origin":603,"position":5},"title":"[PHP\/FreeBSD]===>>> The databases\/php5-sqlite port has been deleted: Removed from core php ===>>> Aborting update","author":"Derrick","date":"May 17, 2012","format":false,"excerpt":"[ad#adbrite] When PHP 5.4 was available few months ago, I was hesitated to upgrade my FreeBSD box to upgrade to 5.4, because it comes with lots of big changes, including removing LOTS of old stuffs that were available in 5.3 or earlier versions. Today PHP 5.4.3 becomes available in FreeBSD\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/comments?post=603"}],"version-history":[{"count":18,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/603\/revisions"}],"predecessor-version":[{"id":2911,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/603\/revisions\/2911"}],"wp:attachment":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/media?parent=603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/categories?post=603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/tags?post=603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}