<?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>Jason Rowe &#187; Apache</title>
	<atom:link href="http://jasonrowe.com/category/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://jasonrowe.com</link>
	<description></description>
	<lastBuildDate>Tue, 03 Aug 2010 23:10:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>PHP MySql Setup</title>
		<link>http://jasonrowe.com/2007/08/07/php-mysql-setup/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=php-mysql-setup</link>
		<comments>http://jasonrowe.com/2007/08/07/php-mysql-setup/#comments</comments>
		<pubDate>Tue, 07 Aug 2007 04:28:00 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[MySql]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://rowejason.com/?p=98</guid>
		<description><![CDATA[Here is my idiots guid to working with PHP 5, MySql, and Apache on a windows server. This assumes you have downloaded all of the above mentioned apps and have them installed. If not you can get them here: (PHP &#8230; <a href="http://jasonrowe.com/2007/08/07/php-mysql-setup/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here is my idiots guid to working with PHP 5, MySql, and Apache on a windows server.</p>
<p>This assumes you have downloaded all of the above mentioned apps and have them installed. If not you can get them here: (<a href="http://www.php.net/downloads.php">PHP </a>, <a href="http://dev.mysql.com/downloads/">MySQL</a>)</p>
<p><strong>Configure PHP 5 to start talking to MySql.</strong></p>
<p>UPDATE with php 5.2.6 and Apache 2.2 I had to use these instructions &#8211; <a href="http://www.php.ph/2008/07/16/windows-installing-php-526-on-apache-229-manually/">http://www.php.ph/2008/07/16/windows-installing-php-526-on-apache-229-manually/</a></p>
<ol>
<li>open your php.ini file because you have to add a few entries. (example C:\php\php.ini)</li>
<li>Once open search for Windows Extensions</li>
<li>Then add this line &#8220;extension=php_mysql.dll &#8221; after it and do not put the ignore &#8220;;&#8221; in front of it like the others that might already be in the config</li>
<li>While in the php.ini file search for &#8220;extension_dir&#8221; and make sure it has a correct path. (example:extension_dir = &#8220;c:\php\ext&#8221;)</li>
<li>Double check that mysql is running in your services.</li>
<li>Restart Apache and check the <a href="http://us2.php.net/phpinfo">phpinfo() </a>page to make sure you now have a mysql section before moving on to the next steps.</li>
<li>Restart apache</li>
<li>Now setup a test php script page with the following</li>
</ol>
<pre class="brush: php; ">

&lt; ?php // we connect to example.com and port 3306 which is the default

$link = mysql_connect(&#039;localhost:3306&#039;, &#039;root&#039;, &#039;password&#039;);

if (!$link) { die(&#039;Could not connect: &#039; . mysql_error()); }

echo &#039;Connected successfully&#039;; mysql_close($link);
</pre>
<p>Hopefully you get the following response on the page when you view it. &#8220;Connected successfully&#8221;</p>
<p>Troubleshooting Tips:</p>
<ul>
<li>You can use telnet to see if the service is running. start &gt; run &gt; telnet localhost 3306 should give you some sort of response.</li>
<li>Check (C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf) for the following entries : PHPIniDir &#8220;C:/PHP/&#8221; and LoadModule php5_module &#8220;C:/PHP/php5apache2_2.dll&#8221;</li>
]]></content:encoded>
			<wfw:commentRss>http://jasonrowe.com/2007/08/07/php-mysql-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
