{"id":918,"date":"2012-02-22T13:38:44","date_gmt":"2012-02-22T18:38:44","guid":{"rendered":"http:\/\/it.thelibrarie.com\/weblog\/?p=918"},"modified":"2012-02-22T13:38:44","modified_gmt":"2012-02-22T18:38:44","slug":"apache-prompts-to-download-php","status":"publish","type":"post","link":"https:\/\/it.thelibrarie.com\/weblog\/2012\/02\/apache-prompts-to-download-php\/","title":{"rendered":"Apache Prompts to Download PHP"},"content":{"rendered":"<p>I had just run some simple patching on a test webserver and had some issues with PHP.  Ran a few more commands and the problem went away.  Until I decided to patch a production server as well.<\/p>\n<p>Basically the update included an apache update, which wrecked the php modules.  How do I know this?<\/p>\n<p>Running Ubuntu 10.04.03 LTS<br \/>\n<code>apt-get update<\/code><br \/>\n<code>apt-get dist-upgrade<\/code><br \/>\nLoad website and it prompts to download\/save the PHP file instead of displaying the PHP file.  Great.<\/p>\n<p>Check if the PHP5 module is activated:<br \/>\n<code>a2enmod php5<\/code><br \/>\n<code>apache2ctl restart<\/code><\/p>\n<p>Only the restart yielded this:<\/p>\n<blockquote><p>apache2: Syntax error on line 204 of \/etc\/apache2\/apache2.conf: Syntax error on line 1 of \/etc\/apache2\/mods-enabled\/php5.load: Cannot load \/usr\/lib\/apache2\/modules\/libphp5.so into server: \/usr\/lib\/apache2\/modules\/libphp5.so: cannot open shared object file: No such file or directory<\/p><\/blockquote>\n<p>So just install the module libraries for PHP5:<br \/>\napt-get install libapache2-mod-php5<\/p>\n<p>This should automatically restart apache, but just for good measure you can do it again to verify there are no more errors:<br \/>\n<code>apache2ctl restart<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had just run some simple patching on a test webserver and had some issues with PHP. Ran a few more commands and the problem went away. Until I decided to patch a production server as well. Basically the update included an apache update, which wrecked the php modules. How do I know this? Running &hellip; <a href=\"https:\/\/it.thelibrarie.com\/weblog\/2012\/02\/apache-prompts-to-download-php\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Apache Prompts to Download PHP<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-918","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/918","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/comments?post=918"}],"version-history":[{"count":1,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/918\/revisions"}],"predecessor-version":[{"id":919,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/918\/revisions\/919"}],"wp:attachment":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/media?parent=918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/categories?post=918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/tags?post=918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}