{"id":17,"date":"2006-02-25T16:25:00","date_gmt":"2006-02-25T16:25:00","guid":{"rendered":"http:\/\/codeinmybug.wordpress.com\/2006\/02\/25\/apache-mysqlphp-installation-configuration-tutorial-for-beginners\/"},"modified":"2012-02-20T01:27:23","modified_gmt":"2012-02-19T19:57:23","slug":"apache-mysqlphp-installation-configuration-tutorial-for-beginners","status":"publish","type":"post","link":"https:\/\/projectbee.org\/blog\/archive\/apache-mysqlphp-installation-configuration-tutorial-for-beginners\/","title":{"rendered":"Apache-MySQLPHP Installation &#038; Configuration Tutorial for Beginners :)"},"content":{"rendered":"<p><strong><span style=\"color: #808000;\"><em><span style=\"color: #ff0000;\">Note:<\/span><\/em> This article still seems to attract a fair bit of traffic. Just wanted to let you guys know that this is a pretty old article. PHP development environment has come a long way since then. You may want to download and use any of the following packaged environments instead: <a href=\"http:\/\/www.wampserver.com\/en\/\" target=\"_blank\"><span style=\"color: #808000;\">WAMP<\/span><\/a> or <a href=\"http:\/\/www.apachefriends.org\/en\/xampp.html\" target=\"_blank\"><span style=\"color: #808000;\">XAMPP<\/span><\/a> on Windows, or <a href=\"http:\/\/www.mamp.info\/en\/index.html\" target=\"_blank\"><span style=\"color: #808000;\">MAMP<\/span><\/a> on OS X<\/span><\/strong><\/p>\n<p><strong><span style=\"color: #808000;\">In case you have any other queries, feel free to drop a note in the comments. I&#8217;ll try to answer.<\/span><\/strong><\/p>\n<hr \/>\n<p><span style=\"font-family: Verdana;\">This article is a very \u201cnarrow\u201d tutorial aimed for complete beginners and dummies, who want to start off coding with AMP (Apache-MySQL-PHP) but do not want to read manual for installing and configuring them.<\/span><br \/>\n<span style=\"font-family: Verdana;\">This write up is very specifically targeted and applies for Windows platform.<\/span><\/p>\n<p><span style=\"font-family: Verdana;\">Note: To get the real and complete understanding, spend some time with the manuals. They are the best source of information.<\/span><\/p>\n<p><strong><span style=\"text-decoration: underline;\"><span style=\"font-family: Verdana;\">Installing and Configuring PHP5 with Apache<\/span><\/span><\/strong><\/p>\n<ol>\n<ol>\n<li><span style=\"font-family: Verdana;\">Select the most appropriate mirror for you from the following: <\/span><a href=\"http:\/\/www.apache.org\/dyn\/closer.cgi\/httpd\/binaries\/win32\/\">http:\/\/www.apache.org\/dyn\/closer.cgi\/httpd\/binaries\/win32\/<\/a><span style=\"font-family: Verdana;\"> (for Apache), and <\/span><a href=\"http:\/\/www.php.net\/downloads.php\">http:\/\/www.php.net\/downloads.php<\/a><span style=\"font-family: Verdana;\"> for PHP.<\/span><\/li>\n<li><span style=\"font-family: Verdana;\">Download <\/span><em><span style=\"font-family: Verdana;\">apache_1.3.x-win32-x86-no_src.exe <\/span><\/em><span style=\"font-family: Verdana;\">and PHP 5.1.2 zip package (names <\/span><em><span style=\"font-family: Verdana;\">PHP-5.x-win32<\/span><\/em><span style=\"font-family: Verdana;\">).<\/span>\n<ul>\n<ul>\n<li>DO NOT use Apache 2.x with PHP.<\/li>\n<\/ul>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li>If you use PHP 4.x, make proper changes in the some of the steps given below.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/ol>\n<p><span style=\"font-family: Verdana;\">Note:<\/span><\/p>\n<ol>\n<li><span style=\"font-family: Verdana;\">Install Apache by simply clicking on the exe file. The default path is C:\\Program Files\\Apache Group\\Apache.<\/span><\/li>\n<li><span style=\"font-family: Verdana;\">Unzip the PHP file to <\/span><strong><span style=\"font-family: Verdana;\">C:\\PHP<\/span><\/strong><span style=\"font-family: Verdana;\">.<\/span><\/li>\n<li><span style=\"font-family: Verdana;\">Add <\/span><strong><span style=\"font-family: Verdana;\">C:\\PHP <\/span><\/strong><span style=\"font-family: Verdana;\">to system path.<\/span><\/li>\n<li><span style=\"font-family: Verdana;\">Backup and rename php.ini.dist to php.ini.<\/span><\/li>\n<li><span style=\"font-family: Verdana;\">Copy <\/span><strong><span style=\"font-family: Verdana;\">php5ts.dll <\/span><\/strong><span style=\"font-family: Verdana;\">and <\/span><strong><span style=\"font-family: Verdana;\">php.ini <\/span><\/strong><span style=\"font-family: Verdana;\">to %systemroot%.<\/span><\/li>\n<li><span style=\"font-family: Verdana;\">Copy <\/span><strong><span style=\"font-family: Verdana;\">php5apache.dll <\/span><\/strong><span style=\"font-family: Verdana;\">to <\/span><strong><span style=\"font-family: Verdana;\">C:\\Program Files\\Apache Group\\Apache<\/span><\/strong><span style=\"font-family: Verdana;\">.<\/span><\/li>\n<li><span style=\"font-family: Verdana;\">Open cmd (command prompt) and run net stop apache (to obviously stop the server).<\/span><\/li>\n<li><span style=\"font-family: Verdana;\">Backup <\/span><strong><span style=\"font-family: Verdana;\">httpd.conf<\/span><\/strong><span style=\"font-family: Verdana;\">, located in <\/span><strong><span style=\"font-family: Verdana;\">C:\\Program Files\\Apache Group\\Apache\\conf<\/span><\/strong><span style=\"font-family: Verdana;\">, and then open it in an editor to add the following lines:<\/span>\n<ul>\n<li><em><span style=\"font-family: Verdana;\">LoadModule php5_module php5apache.dll<\/span><\/em><\/li>\n<li><em><span style=\"font-family: Verdana;\">AddType application\/x-httpd-php .php<\/span><\/em><\/li>\n<li><em><span style=\"font-family: Verdana;\">AddModule mod_php5.c <\/span><\/em><span style=\"font-family: Verdana;\">[<\/span><span style=\"font-family: Verdana;\">If<\/span><span style=\"font-family: Verdana;\"> you face any problems, remove this line and check again]\n<\/span><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"font-family: Verdana;\">Net start Apache.<\/span><\/li>\n<li><span style=\"font-family: Verdana;\">To check if all everything is in place, write the following code in a notepad and save it as \u201cphpinfo.php\u201d (with inverted quotes).<\/span><\/li>\n<\/ol>\n<blockquote><p><strong><span style=\"font-family: Verdana;\">&lt;?php<\/span><br \/>\nphpinfo();<br \/>\n?&gt;<\/strong><\/p><\/blockquote>\n<ol>\n<li><span style=\"font-family: Verdana;\">Place the file in your DocumentRoot directory. The default path is <\/span><strong><span style=\"font-family: Verdana;\">C:\/Program Files\/Apache Group\/Apache\/htdocs.<\/span><\/strong><\/li>\n<li><span style=\"font-family: Verdana;\">Start your Mozilla Firefox browser (it\u2019s not mandatory, just a recommendation :P), and type <\/span><strong><em><span style=\"font-family: Verdana;\">http:\/\/localhost\/phpinfo.php<\/span><\/em><\/strong><span style=\"font-family: Verdana;\">. <\/span><\/li>\n<li><span style=\"font-family: Verdana;\">If everything\u2019s fine, we\u2019ll see something like this:<\/span><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" src=\"http:\/\/projectbee.org\/blog\/wp-content\/uploads\/2008\/02\/phpinfo.jpg\" alt=\"phpinfo.jpg\" \/><\/div>\n<p><strong><span style=\"text-decoration: underline;\"><span style=\"font-family: Verdana;\">Installing MySQL<\/span><\/span><span style=\"font-family: Verdana;\">:<\/span><\/strong><\/p>\n<ol>\n<li><span style=\"font-family: Verdana;\">We can find it in three shapes and sizes :D, <\/span><em><span style=\"font-family: Verdana;\">The Complete Package, The Essentials Package and The Noinstall Archive. <\/span><\/em><span style=\"font-family: Verdana;\">We\u2019d go for the complete package named <\/span><strong><span style=\"font-family: Verdana;\">mysql-[version]-win32.<\/span><\/strong><\/li>\n<li><span style=\"font-family: Verdana;\">The installation part is <\/span><em><span style=\"font-family: Verdana;\">click next type.<\/span><\/em><\/li>\n<li><span style=\"font-family: Verdana;\">At the end of the installation, click to configure and choose the options as per your choice or as given below:<\/span>\n<ul>\n<li><em><span style=\"font-family: Verdana;\">Detailed Configuration&gt;Next<\/span><\/em><\/li>\n<li><em><span style=\"font-family: Verdana;\">Developer Machine&gt;Next<\/span><\/em><\/li>\n<li><em><span style=\"font-family: Verdana;\">Multifunctional Database&gt;Next<\/span><\/em><\/li>\n<li><em><span style=\"font-family: Verdana;\">&gt;Next<\/span><\/em><\/li>\n<li><em><span style=\"font-family: Verdana;\">Manual Settings (choose 5)&gt;Next<\/span><\/em><\/li>\n<li><em><span style=\"font-family: Verdana;\">Enable TCP\/IP (leave default port as 3306)&gt;Next<\/span><\/em><\/li>\n<li><em><span style=\"font-family: Verdana;\">Add to both, windows services and ssytem path&gt;Next<\/span><\/em><\/li>\n<li><em><span style=\"font-family: Verdana;\">Choose root password&gt;Next<\/span><\/em><\/li>\n<li><em><span style=\"font-family: Verdana;\">Execute.<\/span><\/em><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><em><\/em><br \/>\n<strong><span style=\"text-decoration: underline;\"><span style=\"font-family: Verdana;\">Configuring MySQL &amp; PHP<\/span><\/span><span style=\"font-family: Verdana;\">:<\/span><\/strong><\/p>\n<ol>\n<li><span style=\"font-family: Verdana;\">Open <\/span><em><span style=\"font-family: Verdana;\">php.ini, <\/span><\/em><span style=\"font-family: Verdana;\">located in %systemroot%, in and editor and uncomment the following line by removing the semicolon at the beginning of the line:<\/span><\/li>\n<li><em><span style=\"font-family: Verdana;\">extension=php_mysql.dll<\/span><\/em><\/li>\n<li><span style=\"font-family: Verdana;\">Copy <\/span><em><span style=\"font-family: Verdana;\">php_mysql.dll <\/span><\/em><span style=\"font-family: Verdana;\">and <\/span><em><span style=\"font-family: Verdana;\">libmysql.dll <\/span><\/em><span style=\"font-family: Verdana;\">from <\/span><strong><span style=\"font-family: Verdana;\">C:\\PHP\\ext <\/span><\/strong><span style=\"font-family: Verdana;\">to <\/span><strong><span style=\"font-family: Verdana;\">C:\\PHP.<\/span><\/strong><\/li>\n<li><span style=\"font-family: Verdana;\">To verify the configuration and administer MySQL, one may use <\/span><strong><span style=\"font-family: Verdana;\">phpmyadmin<\/span><\/strong><span style=\"font-family: Verdana;\">, found at <\/span><a href=\"http:\/\/www.phpmyadmin.net\/home_page\/index.php\">http:\/\/www.phpmyadmin.net\/home_page\/index.php<\/a><span style=\"font-family: Verdana;\">. However, do make sure not to publish it along with the site :P.<\/span><\/li>\n<li><span style=\"font-family: Verdana;\">That\u2019s it. Happy Coding (. For anymore queries, either leave your comments or refer to the manuals.<\/span><\/li>\n<\/ol>\n<p><a href=\"http:\/\/digg.com\/submit?phase=2&amp;url=http:\/\/codeinmybug.wordpress.com\/2006\/02\/25\/apache-mysqlphp-installation-configuration-tutorial-for-beginners\/\"> <img decoding=\"async\" src=\"http:\/\/www.digg.com\/img\/little-digg.gif\" alt=\"\" border=\"0\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note: This article still seems to attract a fair bit of traffic. Just wanted to let you guys know that this is a pretty old article. PHP development environment has come a long way since then. You may want to download and use any of the following packaged environments instead: WAMP or XAMPP on Windows, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/projectbee.org\/blog\/archive\/apache-mysqlphp-installation-configuration-tutorial-for-beginners\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Apache-MySQLPHP Installation &#038; Configuration Tutorial for Beginners :)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":6,"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_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":[3,18,23,37,43],"tags":[11,28,31],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-apache","category-education","category-guide","category-mysql","category-php","tag-configure","tag-install","tag-lamp"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pf2XR-h","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/projectbee.org\/blog\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/projectbee.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/projectbee.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/projectbee.org\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/projectbee.org\/blog\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":3,"href":"https:\/\/projectbee.org\/blog\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"predecessor-version":[{"id":254,"href":"https:\/\/projectbee.org\/blog\/wp-json\/wp\/v2\/posts\/17\/revisions\/254"}],"wp:attachment":[{"href":"https:\/\/projectbee.org\/blog\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/projectbee.org\/blog\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/projectbee.org\/blog\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}