<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>David Pratt &#187; server</title> <atom:link href="http://daipratt.co.uk/tag/server/feed/" rel="self" type="application/rss+xml" /><link>http://daipratt.co.uk</link> <description>Concerned about Website Construction &#38; SEO</description> <lastBuildDate>Thu, 17 May 2012 19:14:00 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>How to set up a local server on Windows</title><link>http://daipratt.co.uk/how-to-set-up-a-local-server-on-windows/</link> <comments>http://daipratt.co.uk/how-to-set-up-a-local-server-on-windows/#comments</comments> <pubDate>Mon, 11 May 2009 18:46:33 +0000</pubDate> <dc:creator>David Pratt</dc:creator> <category><![CDATA[Tech]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[php]]></category> <category><![CDATA[server]]></category> <category><![CDATA[wordpress]]></category> <guid
isPermaLink="false">http://localhost/wordpress/?p=1</guid> <description><![CDATA[Instructions on how to setup a local server manually on a windows box; running Apache, MySQL and PHP.]]></description> <content:encoded><![CDATA[<p>Have you ever wondered how to set up a local server on your windows box running with Apache, MySQL and PHP?  I have. Here&#8217;s how I did it.</p><h3>Mission 1: Download everything</h3><p>Create a folder on your desktop and put the following downloads in it:</p><ul><li><a
href="http://httpd.apache.org/download.cgi">Apache</a> &#8211; <a
href="http://apache.mirror.anlx.net/httpd/binaries/win32/apache_2.2.11-win32-x86-no_ssl.msi">direct</a></li><li><a
href="http://dev.mysql.com/downloads/mysql/5.1.html">MySQL</a> &#8211; Get the windows installer</li><li><a
href="http://www.php.net/downloads.php">PHP</a> &#8211; <a
href="http://uk.php.net/get/php-5.2.8-win32-installer.msi/from/this/mirror">direct</a></li><li><a
href="http://www.libgd.org/Downloads">Module &#8211; GD</a> &#8211; <a
href="http://www.libgd.org/releases/gd-2.0.35.tar.gz">direct</a></li><li><a
href="#">Module &#8211; Mail Server</a> &#8211; <a
href="#">direct</a></li><li><a
href="http://www.phpmyadmin.net/home_page/downloads.php">PHPMyAdmin</a> &#8211; <a
href="http://prdownloads.sourceforge.net/phpmyadmin/phpMyAdmin-3.1.1-english.zip?download#!md5!64f77187056154e044bf9596728127a3">direct</a></li></ul><h3>Mission 2: Install everything with default settings</h3><p>Install the applications in the order that I have listed.</p><p>Apart from PHPMyAdmin. Park that.</p><p>Make sure that you write down with a pen and paper all of your paired usernames and passwords &#8211; you do not want to be in a situation where you end up sitting there wondering whether the default username was root, admin, guest and whether you paired it with your usual password, a special easy one or no password at all!</p><p>So, if you do cock up and can&#8217;t remember your username and password (as I did for MySQL) then you&#8217;ll need to uninstall it with a special tool as the windows one will keep you locked out on reinstall.  You&#8217;ll need <a
href="http://www.revouninstaller.com/revo_uninstaller_free_download.html">Revo univstaller</a> unless you fancying hitting F3 about 50 times in regedit.</p><h3>Mission 3: Configure Apache</h3><p>Unfortunately everything doesn&#8217;t work and play nice straight out of the box. It needs some love (as most things tech do).</p><h4>Enable Apache mod_rewrite module</h4><p>This is the feature that allows sexxy clean urls (permalinks in WordPress) with none of this .php?foo=blah rubbish.</p><ol><li>Open your httpd.conf configuration file (C:Program FilesApache Software FoundationApache2.2confhttpd.conf) with Notepad.</li><li>Remove the # on the #LoadModule rewrite_module modules/mod_rewrite.so line so it becomes LoadModule rewrite_module modules/mod_rewrite.so only.</li><li>Save httpd.conf .</li></ol><h4>Enable AllowOverride for web directory folder (htdocs)</h4><p>This allows the rule set in .htaccess file to over-ride the main one. A bit like upping the specificity in CSS if thats your thing&#8230;</p><ol><li>Open your httpd.conf configuration file (C:Program FilesApache Software FoundationApache2.2confhttpd.conf) with Notepad.</li><li>Under the directory C:Program FilesApache Software FoundationApache2.2htdocs section, change the line that says &#8220;AllowOverride None&#8221; to &#8220;AllowOverride All&#8221;.</li><li>Save your httpd.conf .</li></ol><h3>Mission 4: Create and run info.php</h3><p>Create a file called <strong>info.php</strong>, place it in the directory <span>C:Program FilesApache Software FoundationApache2.2htdocs</span> and put the following code in it:</p><pre class="javascript">&lt;?php
phpinfo();
phpinfo(INFO_MODULES);
?&gt;</pre><p>Now fire up your web browser and type in the url <a
href="http://localhost/info.php">http://localhost/info.php</a> and the page should render with a load of information.  On it you should see that &#8220;rewrite module&#8221; is enabled and gd library is active, zend php is working.</p><h3>Mission 5: Get PHP to talk to MySQL</h3><p>Now that we know PHP works we can configure it to work with MySQL, but first we need to do a quick restart of Apache &#8211; double click on the Apache system tray icon and click restart.</p><p>Next it is time to find PHPMyAdmin.zip you have sitting in that desktop folder, unzip it to this location: C:Program FilesApache Software FoundationApache2.2htdocsphpmyadmin</p><p>Open your browser and navigate to <a
href="http://localhost/phpmyadmin/">http://localhost/phpmyadmin/</a></p><p>Enter all of the details that you wrote down on that piece of paper from earlier.</p><p>And do restart you local Apache web server. Now your can enable the pretty permalink structure from the WordPress dashboard and it will work nicely after that.</p><p>There you have it;  One local server that doesn&#8217;t do a lot. You could have just installed <a
href="http://www.apachefriends.org/en/xampp.html">this</a> if you want the easy option! I&#8217;ll do a follow up post about some of the things that you might want to do with your local server soon&#8230;</p> ]]></content:encoded> <wfw:commentRss>http://daipratt.co.uk/how-to-set-up-a-local-server-on-windows/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
