{"id":1764,"date":"2012-02-27T10:29:30","date_gmt":"2012-02-27T14:29:30","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=1764"},"modified":"2013-03-20T08:44:20","modified_gmt":"2013-03-20T12:44:20","slug":"ubuntu-php-libphp5-so-missing-cannot-open-shared-object-file","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/ubuntu-php-libphp5-so-missing-cannot-open-shared-object-file","title":{"rendered":"Ubuntu: PHP libphp5.so missing: cannot open shared object file"},"content":{"rendered":"<p>If Apache2 service fails to start with a &#8220;<strong>libphp5.so: cannot open shared object file<\/strong>&#8221; message, it indicates that <strong>libphp5.so is missing on your Ubuntu server<\/strong>.<\/p>\n<blockquote>\n<pre>Apache2 has detected a syntax error in your configuration files:\r\nSyntax error on line 1 of \/etc\/apache2\/mods-enabled\/php5.load:\r\nCannot load \/usr\/lib\/apache2\/modules\/libphp5.so into server:\r\n\/usr\/lib\/apache2\/modules\/libphp5.so: cannot open shared object file:\r\nNo such file or directory<\/pre>\n<\/blockquote>\n<p>Apache configuration calls the php5.load file which includes the path to the libphp5.so module. The php5.load cannot load libphp5.so file if it is missing from the \/usr\/lib\/apache2\/modules\/ directory. See if it exists:<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># ls -la \/usr\/lib\/apache2\/modules\/libphp5.so<\/span>\r\n ls: cannot access \/usr\/lib\/apache2\/modules\/libphp5.so:\r\n No such file or directory<\/pre>\n<\/blockquote>\n<p>See if the libphp5.so module is installed elsewhere on the server using the find and locate command<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># find \/ -name libphp5.so<\/span>\r\n<span style=\"color: #0000ff;\"># locate libphp5.so<\/span><\/pre>\n<\/blockquote>\n<p>if it is, copy it to \/usr\/lib\/apache2\/modules\/ directory and restart Apache.<\/p>\n<p>If the file is not present,<strong> install the &#8216;libapache2-mod-php5&#8217; package, the PHP5 module for Apache2<\/strong>. It adds the required FilesMatch directives to the Apache configuration.<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># apt-get install libapache2-mod-php5<\/span><\/pre>\n<\/blockquote>\n<p>The &#8216;libapache2-mod-php5&#8217; package will create the libphp5.so file under the modules directory and apache2 will restart successfully<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># \/etc\/init.d\/apache2 restart<\/span><\/pre>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>If Apache2 service fails to start with a &#8220;libphp5.so: cannot open shared object file&#8221; message, it indicates that libphp5.so is missing on your Ubuntu server.<\/p>\n<p>Apache2 has detected a syntax error in your configuration files:<br \/>\nSyntax error on line 1 of \/etc\/apache2\/mods-enabled\/php5.load:<br \/>\nCannot load \/usr\/lib\/apache2\/modules\/libphp5.so into server:<br \/>\n\/usr\/lib\/apache2\/modules\/libphp5.so: cannot open shared object file:<br \/>\nNo such file or directory<\/p>\n<p>Apache configuration calls the php5.load file which includes the path to the libphp5.so module. The php5.load cannot load libphp5.so file if it is missing from the \/usr\/lib\/apache2\/modules\/ directory. See if it exists:<\/p>\n<p># ls -la \/usr\/lib\/apache2\/modules\/libphp5.so<br \/>\n ls: [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[1349,1351,1352,1353,1350],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1764"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=1764"}],"version-history":[{"count":13,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1764\/revisions"}],"predecessor-version":[{"id":1773,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1764\/revisions\/1773"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=1764"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=1764"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=1764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}