{"id":637,"date":"2012-03-19T11:46:36","date_gmt":"2012-03-19T11:46:36","guid":{"rendered":"http:\/\/jjamwal.in\/blog\/?p=637"},"modified":"2012-03-19T11:46:36","modified_gmt":"2012-03-19T11:46:36","slug":"problems-php-5-integration-apache2","status":"publish","type":"post","link":"https:\/\/jjamwal.in\/yayavar\/problems-php-5-integration-apache2\/","title":{"rendered":"PHP5 installation &#038; integration with Apache2"},"content":{"rendered":"<p>This tutorial is meant for people who are want PHP5 on their Ubuntu computer along with Apache2, but can&#8217;t seem to make it happen. I&#8217;ll just explain it all as it happened to me.<\/p>\n<p>I have an old pc running BackTrack 4 R2 which is used as a MySQL server. It&#8217;s Ubuntu version is Intrepid, which isn&#8217;t officially supported anymore. As it happened, we needed to run a small webserver on it with PHP support. Although Apache2 is installed and running fine, server wouldn&#8217;t handle PHP files and will just offer them as download instead of processing them.<br \/>\nNow the first step is to install PHP.<\/p>\n<p>Now, as I said before, my Ubuntu version is old and not supported, I had to manually change my repository list at\u00a0<strong><em>\/etc\/apt\/sources.list<\/em><\/strong> and add the following lines:<!--more--><\/p>\n<p><em>deb http:\/\/old-releases.ubuntu.com\/ubuntu\/ intrepid main restricted universe multiverse<\/em><br \/>\n<em>deb http:\/\/old-releases.ubuntu.com\/ubuntu\/ intrepid-updates main restricted universe multiverse<\/em><br \/>\n<em>deb http:\/\/old-releases.ubuntu.com\/ubuntu\/ intrepid-security main restricted universe multiverse<\/em><br \/>\n<em>deb-src http:\/\/old-releases.ubuntu.com\/ubuntu\/ intrepid main restricted universe multiverse <\/em><br \/>\n<em>deb http:\/\/us.archive.ubuntu.com\/ubuntu intrepid main restricted\u00a0<\/em><br \/>\n<em>deb-src http:\/\/old-releases.ubuntu.com\/ubuntu\/ intrepid-updates main restricted multiverse universe<\/em><\/p>\n<p>That enables updates and installs via aptitude, apt-get way. Then \u00a0 I install php5 via command<\/p>\n<p><strong><em>apt-get install php5\u00a0<\/em><\/strong><\/p>\n<p>but the process doesn&#8217;t work due to some missing dependencies errors and what not. There are other commands like<\/p>\n<p><strong><em>apt-get install libapache2-mod-php5<\/em><\/strong><\/p>\n<p>and some others to install missing dependencies, but they don&#8217;t work. At this time, I came across <a href=\"https:\/\/help.ubuntu.com\/community\/EOLUpgrades\">this link<\/a> and upgraded Ubuntu version by running these commands: (click on link to read what each command does in detail)<\/p>\n<p>&nbsp;<\/p>\n<p><strong><em>sudo aptitude install update-manager-core update-manager\u00a0<\/em><\/strong><\/p>\n<p><strong><em>sudo aptitude install linux-image-generic linux-headers-generic\u00a0<\/em><\/strong><\/p>\n<p><strong><em>sudo aptitude update &amp;&amp; sudo aptitude safe-upgrade\u00a0<\/em><\/strong><\/p>\n<p><strong><em>sudo do-release-upgrade\u00a0<\/em><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>After a reboot I ran<em> apt-get update<\/em> command just in case<\/p>\n<p>Installing php5 using apt-get wasn&#8217;t working even then, so I had to download the setup archive from <a href=\"http:\/\/php.net\/downloads.php\">this link<\/a> and install using commands in following order:<\/p>\n<p><strong><em>configure<\/em><\/strong><\/p>\n<p><strong><em>make<\/em><\/strong><\/p>\n<p><strong><em>make test<\/em><\/strong> \u00a0 and<\/p>\n<p><strong><em>make install<\/em><\/strong><\/p>\n<p>Now, starting apache2 using command \u00a0gave error:<\/p>\n<p>&nbsp;<\/p>\n<p><strong>\/etc\/init.d\/apache2 start<\/strong><br \/>\n<em>Starting web server: apache2apache2: Syntax error on line 185 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: libdb-4.8.so: cannot open shared object file: No such file or directory<\/em><br \/>\n<em> failed!\u00a0<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>Disabling php5 using command <strong><em>a2dismod php5\u00a0<\/em><\/strong>is helpful in a way, as the Apache starts normally, but enabling it using<strong><em> a2enmod php5<\/em><\/strong> \u00a0brings up the same problem again. Analysing the error message, I realised that it had something to do with file libdb-4.8.so. \u00a0I had versions 4.7 and 4.6 on my PC, but not version 4.8. So, I downloaded the file from <a href=\"http:\/\/elders.princeton.edu\/data\/puias\/computational\/6\/i386\/db48-4.8.30-2.puias6.i686.rpm\">this link<\/a> . Trouble is that it&#8217;s in RPM format and I had to install another program called rpm2cpio using apt-get, then run:<\/p>\n<p>&nbsp;<\/p>\n<p><em><strong>rpm2cpio db48-4.8.30-2.puias6.i686.rpm | cpio -idmv<\/strong><\/em><\/p>\n<p>which copied libdb-4.8.so files in<\/p>\n<p><em>.\/lib\/libdb-4.8.so<\/em><br \/>\n<em>.\/usr\/lib\/libdb-4.8.so<\/em><\/p>\n<p>Then run<\/p>\n<p><em><strong>\/etc\/init.d\/apache2 restart<\/strong><\/em><br \/>\n<em>Restarting web server: apache2apache2: Could not reliably determine the server&#8217;s fully qualified domain name, using 127.0.1.1 for ServerName<\/em><br \/>\n<em> &#8230; waiting apache2: Could not reliably determine the server&#8217;s fully qualified domain name, using 127.0.1.1 for ServerName<\/em><br \/>\n.<\/p>\n<p>&nbsp;<\/p>\n<p>It worked !<br \/>\n&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial is meant for people who are want PHP5 on their Ubuntu computer along with Apache2, but can&#8217;t seem to make it happen. I&#8217;ll just explain it all as it happened to me. I have an old pc running BackTrack 4 R2 which is used as a MySQL server. It&#8217;s Ubuntu version is Intrepid,&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[77,80],"tags":[228,304],"class_list":["post-637","post","type-post","status-publish","format-standard","hentry","category-linux-2","category-tutorial-2","tag-linux","tag-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PHP5 installation &amp; integration with Apache2 - \u0905\u0930\u0947 \u092f\u093e\u092f\u093e\u0935\u0930 \u0930\u0939\u0947\u0917\u093e \u092f\u093e\u0926?<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jjamwal.in\/yayavar\/problems-php-5-integration-apache2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP5 installation &amp; integration with Apache2 - \u0905\u0930\u0947 \u092f\u093e\u092f\u093e\u0935\u0930 \u0930\u0939\u0947\u0917\u093e \u092f\u093e\u0926?\" \/>\n<meta property=\"og:description\" content=\"This tutorial is meant for people who are want PHP5 on their Ubuntu computer along with Apache2, but can&#8217;t seem to make it happen. I&#8217;ll just explain it all as it happened to me. I have an old pc running BackTrack 4 R2 which is used as a MySQL server. It&#8217;s Ubuntu version is Intrepid,...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jjamwal.in\/yayavar\/problems-php-5-integration-apache2\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0905\u0930\u0947 \u092f\u093e\u092f\u093e\u0935\u0930 \u0930\u0939\u0947\u0917\u093e \u092f\u093e\u0926?\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/jjamwalin\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/jjamwalin\" \/>\n<meta property=\"article:published_time\" content=\"2012-03-19T11:46:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jjamwal.in\/yayavar\/wp-content\/uploads\/2022\/01\/jjamwalin-logo-2-small.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"200\" \/>\n\t<meta property=\"og:image:height\" content=\"200\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jaidev Jamwal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@JaidevJamwal\" \/>\n<meta name=\"twitter:site\" content=\"@JaidevJamwal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jaidev Jamwal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/problems-php-5-integration-apache2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/problems-php-5-integration-apache2\\\/\"},\"author\":{\"name\":\"Jaidev Jamwal\",\"@id\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/#\\\/schema\\\/person\\\/4b29cbc0fe18a86ec09a7c01177deac4\"},\"headline\":\"PHP5 installation &#038; integration with Apache2\",\"datePublished\":\"2012-03-19T11:46:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/problems-php-5-integration-apache2\\\/\"},\"wordCount\":570,\"publisher\":{\"@id\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/#\\\/schema\\\/person\\\/4b29cbc0fe18a86ec09a7c01177deac4\"},\"keywords\":[\"Linux\",\"tutorial\"],\"articleSection\":[\"linux\",\"Tutorial\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/problems-php-5-integration-apache2\\\/\",\"url\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/problems-php-5-integration-apache2\\\/\",\"name\":\"PHP5 installation & integration with Apache2 - \u0905\u0930\u0947 \u092f\u093e\u092f\u093e\u0935\u0930 \u0930\u0939\u0947\u0917\u093e \u092f\u093e\u0926?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/#website\"},\"datePublished\":\"2012-03-19T11:46:36+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/problems-php-5-integration-apache2\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/problems-php-5-integration-apache2\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/problems-php-5-integration-apache2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP5 installation &#038; integration with Apache2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/#website\",\"url\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/\",\"name\":\"\u0905\u0930\u0947 \u092f\u093e\u092f\u093e\u0935\u0930 \u0930\u0939\u0947\u0917\u093e \u092f\u093e\u0926?\",\"description\":\"Travel, Defence, Books &amp; Photography\",\"publisher\":{\"@id\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/#\\\/schema\\\/person\\\/4b29cbc0fe18a86ec09a7c01177deac4\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/#\\\/schema\\\/person\\\/4b29cbc0fe18a86ec09a7c01177deac4\",\"name\":\"Jaidev Jamwal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/jjamwalin-logo-2-small.jpg\",\"url\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/jjamwalin-logo-2-small.jpg\",\"contentUrl\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/jjamwalin-logo-2-small.jpg\",\"width\":200,\"height\":200,\"caption\":\"Jaidev Jamwal\"},\"logo\":{\"@id\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/jjamwalin-logo-2-small.jpg\"},\"sameAs\":[\"http:\\\/\\\/jjamwal.in\",\"https:\\\/\\\/www.facebook.com\\\/jjamwalin\",\"https:\\\/\\\/www.instagram.com\\\/jamwal.jaidev\\\/\",\"https:\\\/\\\/x.com\\\/JaidevJamwal\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCuqw1ikTDrd3Lzf6RivuR6Q\"],\"url\":\"https:\\\/\\\/jjamwal.in\\\/yayavar\\\/author\\\/jaidev\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP5 installation & integration with Apache2 - \u0905\u0930\u0947 \u092f\u093e\u092f\u093e\u0935\u0930 \u0930\u0939\u0947\u0917\u093e \u092f\u093e\u0926?","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jjamwal.in\/yayavar\/problems-php-5-integration-apache2\/","og_locale":"en_US","og_type":"article","og_title":"PHP5 installation & integration with Apache2 - \u0905\u0930\u0947 \u092f\u093e\u092f\u093e\u0935\u0930 \u0930\u0939\u0947\u0917\u093e \u092f\u093e\u0926?","og_description":"This tutorial is meant for people who are want PHP5 on their Ubuntu computer along with Apache2, but can&#8217;t seem to make it happen. I&#8217;ll just explain it all as it happened to me. I have an old pc running BackTrack 4 R2 which is used as a MySQL server. It&#8217;s Ubuntu version is Intrepid,...","og_url":"https:\/\/jjamwal.in\/yayavar\/problems-php-5-integration-apache2\/","og_site_name":"\u0905\u0930\u0947 \u092f\u093e\u092f\u093e\u0935\u0930 \u0930\u0939\u0947\u0917\u093e \u092f\u093e\u0926?","article_publisher":"https:\/\/www.facebook.com\/jjamwalin","article_author":"https:\/\/www.facebook.com\/jjamwalin","article_published_time":"2012-03-19T11:46:36+00:00","og_image":[{"width":200,"height":200,"url":"https:\/\/jjamwal.in\/yayavar\/wp-content\/uploads\/2022\/01\/jjamwalin-logo-2-small.jpg","type":"image\/jpeg"}],"author":"Jaidev Jamwal","twitter_card":"summary_large_image","twitter_creator":"@JaidevJamwal","twitter_site":"@JaidevJamwal","twitter_misc":{"Written by":"Jaidev Jamwal","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jjamwal.in\/yayavar\/problems-php-5-integration-apache2\/#article","isPartOf":{"@id":"https:\/\/jjamwal.in\/yayavar\/problems-php-5-integration-apache2\/"},"author":{"name":"Jaidev Jamwal","@id":"https:\/\/jjamwal.in\/yayavar\/#\/schema\/person\/4b29cbc0fe18a86ec09a7c01177deac4"},"headline":"PHP5 installation &#038; integration with Apache2","datePublished":"2012-03-19T11:46:36+00:00","mainEntityOfPage":{"@id":"https:\/\/jjamwal.in\/yayavar\/problems-php-5-integration-apache2\/"},"wordCount":570,"publisher":{"@id":"https:\/\/jjamwal.in\/yayavar\/#\/schema\/person\/4b29cbc0fe18a86ec09a7c01177deac4"},"keywords":["Linux","tutorial"],"articleSection":["linux","Tutorial"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jjamwal.in\/yayavar\/problems-php-5-integration-apache2\/","url":"https:\/\/jjamwal.in\/yayavar\/problems-php-5-integration-apache2\/","name":"PHP5 installation & integration with Apache2 - \u0905\u0930\u0947 \u092f\u093e\u092f\u093e\u0935\u0930 \u0930\u0939\u0947\u0917\u093e \u092f\u093e\u0926?","isPartOf":{"@id":"https:\/\/jjamwal.in\/yayavar\/#website"},"datePublished":"2012-03-19T11:46:36+00:00","breadcrumb":{"@id":"https:\/\/jjamwal.in\/yayavar\/problems-php-5-integration-apache2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jjamwal.in\/yayavar\/problems-php-5-integration-apache2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jjamwal.in\/yayavar\/problems-php-5-integration-apache2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jjamwal.in\/yayavar\/"},{"@type":"ListItem","position":2,"name":"PHP5 installation &#038; integration with Apache2"}]},{"@type":"WebSite","@id":"https:\/\/jjamwal.in\/yayavar\/#website","url":"https:\/\/jjamwal.in\/yayavar\/","name":"\u0905\u0930\u0947 \u092f\u093e\u092f\u093e\u0935\u0930 \u0930\u0939\u0947\u0917\u093e \u092f\u093e\u0926?","description":"Travel, Defence, Books &amp; Photography","publisher":{"@id":"https:\/\/jjamwal.in\/yayavar\/#\/schema\/person\/4b29cbc0fe18a86ec09a7c01177deac4"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jjamwal.in\/yayavar\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/jjamwal.in\/yayavar\/#\/schema\/person\/4b29cbc0fe18a86ec09a7c01177deac4","name":"Jaidev Jamwal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jjamwal.in\/yayavar\/wp-content\/uploads\/2022\/01\/jjamwalin-logo-2-small.jpg","url":"https:\/\/jjamwal.in\/yayavar\/wp-content\/uploads\/2022\/01\/jjamwalin-logo-2-small.jpg","contentUrl":"https:\/\/jjamwal.in\/yayavar\/wp-content\/uploads\/2022\/01\/jjamwalin-logo-2-small.jpg","width":200,"height":200,"caption":"Jaidev Jamwal"},"logo":{"@id":"https:\/\/jjamwal.in\/yayavar\/wp-content\/uploads\/2022\/01\/jjamwalin-logo-2-small.jpg"},"sameAs":["http:\/\/jjamwal.in","https:\/\/www.facebook.com\/jjamwalin","https:\/\/www.instagram.com\/jamwal.jaidev\/","https:\/\/x.com\/JaidevJamwal","https:\/\/www.youtube.com\/channel\/UCuqw1ikTDrd3Lzf6RivuR6Q"],"url":"https:\/\/jjamwal.in\/yayavar\/author\/jaidev\/"}]}},"_links":{"self":[{"href":"https:\/\/jjamwal.in\/yayavar\/wp-json\/wp\/v2\/posts\/637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jjamwal.in\/yayavar\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jjamwal.in\/yayavar\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jjamwal.in\/yayavar\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jjamwal.in\/yayavar\/wp-json\/wp\/v2\/comments?post=637"}],"version-history":[{"count":0,"href":"https:\/\/jjamwal.in\/yayavar\/wp-json\/wp\/v2\/posts\/637\/revisions"}],"wp:attachment":[{"href":"https:\/\/jjamwal.in\/yayavar\/wp-json\/wp\/v2\/media?parent=637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jjamwal.in\/yayavar\/wp-json\/wp\/v2\/categories?post=637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jjamwal.in\/yayavar\/wp-json\/wp\/v2\/tags?post=637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}