<?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"
	>

<channel>
	<title>Tech.Bitez</title>
	<atom:link href="http://www.mwasif.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mwasif.com</link>
	<description>Get yourself ready for your own site</description>
	<pubDate>Sun, 06 Jul 2008 14:47:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Count number of words in a MySQL column</title>
		<link>http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/</link>
		<comments>http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 17:36:15 +0000</pubDate>
		<dc:creator>Wasif</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/</guid>
		<description><![CDATA[A function to count number of words in a column separated by space, comma, semicolon or any character.]]></description>
			<content:encoded><![CDATA[<p>It is a common requirement to count number of words in a column of a MySQL database table. But MySQL does not have any built in function to count number of words as it usually has for number of purposes. </p>
<p>But you can do it without it with a simple trick e.g. you have a column <em>name</em> and want to count number of words in it. This query will return number of words separated with space in a column </p>
<pre class="mysql"><span style="color: #993333; font-weight: bold;">SELECT</span> SUM<span style="color: #66cc66;">&#40;</span> <span style="color: #993333; font-weight: bold;">LENGTH</span><span style="color: #66cc66;">&#40;</span>name<span style="color: #66cc66;">&#41;</span> - <span style="color: #993333; font-weight: bold;">LENGTH</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>name, <span style="color: #ff0000;">' '</span>, <span style="color: #ff0000;">''</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #cc66cc;">+1</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">FROM</span> table</pre>
<p>If you want to count number of words separated by some other string for example comma (,) or semicolon (;), simply replace <em>space</em> with your required character.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MySQL GUI Tools</title>
		<link>http://www.mwasif.com/2008/6/mysql-gui-tools/</link>
		<comments>http://www.mwasif.com/2008/6/mysql-gui-tools/#comments</comments>
		<pubDate>Thu, 01 May 2008 10:31:45 +0000</pubDate>
		<dc:creator>Wasif</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[MySQL GUIs]]></category>

		<guid isPermaLink="false">http://www.mwasif.com/2008/6/mysql-gui-tools/</guid>
		<description><![CDATA[A wide variety of MySQL GUIs tools are available in the market. Most of them are free but some are paid as well. This is a list of MySQL GUI tools.]]></description>
			<content:encoded><![CDATA[<p>I am creating a list of MySQL GUI tools. I hope you will contribute this list.</p>
<p>A wide variety of MySQL GUI tools are available in the market. Most of them are free but some are paid as well. We can divide GUIs in 2 categories i.e. desktop and web based applications. Here is the list of popular MySQL GUI tools I have heard of </p>
<ol>
<li>Desktop Application
<ul>
<li><a href="http://dev.mysql.com/downloads/gui-tools/5.0.html/">Official MySQL GUI Tools</a></li>
<li><a href="http://www.heidisql.com/">HeidiSQL</a></li>
<li><a href="http://www.navicat.com/">Navicat</a> (Linux, Windows, Mac OS X)</li>
<li><a href="http://www.webyog.com/en/">SQLyog</a></li>
<li><a href="http://cocoamysql.sourceforge.net/">CocoaMySQL</a> (Mac OS X)</li>
<li><a href="http://www.sql-front.com/">SQL-Front</a></li>
<li><a href="http://www.quest.com/toad-for-mysql/">Toad for MySQL</a></li>
</ul>
</li>
<li>Web Based Application
<ul>
<li><a href="http://www.phpmyadmin.net/">phpMyAdmin</a></li>
<li><a href="http://www.mysqlquickadmin.com/">MySQL Quick Admin</a></li>
</ul>
</li>
</ol>
<p>If you know any good GUI Tool, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mwasif.com/2008/6/mysql-gui-tools/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Should we use template engines in PHP?</title>
		<link>http://www.mwasif.com/2008/10/should-we-use-template-engines-in-php/</link>
		<comments>http://www.mwasif.com/2008/10/should-we-use-template-engines-in-php/#comments</comments>
		<pubDate>Thu, 01 May 2008 08:50:40 +0000</pubDate>
		<dc:creator>Wasif</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[smarty template engine]]></category>

		<category><![CDATA[template engines]]></category>

		<guid isPermaLink="false">http://www.mwasif.com/2008/10/should-we-use-template-engines-in-php/</guid>
		<description><![CDATA[A forums discussion on using template engines in PHP]]></description>
			<content:encoded><![CDATA[<p>I came across <a href="http://www.sitepoint.com/forums/showthread.php?t=67849">this</a> discussion today on pros and cons of using template engines in PHP.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mwasif.com/2008/10/should-we-use-template-engines-in-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>child pid 2299 exit signal File size limit exceeded (25)</title>
		<link>http://www.mwasif.com/2008/9/signal-file-size-limit-exceeded/</link>
		<comments>http://www.mwasif.com/2008/9/signal-file-size-limit-exceeded/#comments</comments>
		<pubDate>Sun, 30 Mar 2008 15:30:44 +0000</pubDate>
		<dc:creator>Wasif</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://www.mwasif.com/2008/9/child-pid-2299-exit-signal-file-size-limit-exceeded-25/</guid>
		<description><![CDATA[Apache does not work properly when there is large log (2GB) file(s).]]></description>
			<content:encoded><![CDATA[<p>Today I found that Apache on my server was very slow and a lot of <em>child pid xxxx exit signal File size limit exceeded (25)</em> errors in error_log.</p>
<p>I simply searched for large (2gb) log files and deleted them. Everything became normal.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mwasif.com/2008/9/signal-file-size-limit-exceeded/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Increasing file upload limit in PHP</title>
		<link>http://www.mwasif.com/2008/8/increasing-file-upload-limit-in-php/</link>
		<comments>http://www.mwasif.com/2008/8/increasing-file-upload-limit-in-php/#comments</comments>
		<pubDate>Fri, 14 Mar 2008 19:10:40 +0000</pubDate>
		<dc:creator>Wasif</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.mwasif.com/2008/8/increasing-file-upload-limit-in-php/</guid>
		<description><![CDATA[Increasing file upload limit in PHP, Apache (php.ini and .htaccess).]]></description>
			<content:encoded><![CDATA[<p>There are different options to increase file upload limit in PHP. First is changing PHP configuration file (php.ini) and restarting webserver or overwriting the php.ini value in .htacces (this option is available if you are running Apache).</p>
<p>There are 2 directives which affect upload limit i.e. upload_max_filesize and post_max_size.</p>
<p>Now we look at the first method. First you have to find out where the php.ini is. To find out the location, make a .php file containing only this code and place it in your webroot and point your browser to this file.</p>
<pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <a href="http://www.php.net/phpinfo"><span style="color: #000066;">phpinfo</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
<p>In the page output you can find <em>Configuration File Path</em>. Open this file and change the values for upload_max_filesize and post_max_size according to your requirement e.g. to set 10MB upload limit, the values will be<br />
<strong>upload_max_filesize = 10M<br />
post_max_size = 10M</strong></p>
<p><span id="more-8"></span><br />
After changing the values, save php.ini and restart the webserver. If you open up the above PHP file again, you'll see the updated values of upload_max_filesize and post_max_size.</p>
<p>In case you don't have access to php.ini (in shared hosting environment) or don't want to restart the webserver then the best option is to use .htaccess. </p>
<p>The syntax for .htaccess as follows<br />
<strong>php_value upload_max_filesize 10M<br />
php_value post_max_size 10M</strong></p>
<p><a href="http://httpd.apache.org/">Apache</a> supports .htaccess. I am not sure if you can overwrite these settings in .htaccess with <a href="http://www.lighttpd.net/">lighttpd</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mwasif.com/2008/8/increasing-file-upload-limit-in-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Saving images in MySQL with PHP</title>
		<link>http://www.mwasif.com/2007/4/save-image-in-mysql-with-php/</link>
		<comments>http://www.mwasif.com/2007/4/save-image-in-mysql-with-php/#comments</comments>
		<pubDate>Wed, 18 Jul 2007 18:33:53 +0000</pubDate>
		<dc:creator>Wasif</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.mwasif.com/2007/4/save-image-in-mysql-with-php/</guid>
		<description><![CDATA[This is a short description how to save images in MySQL using PHP.]]></description>
			<content:encoded><![CDATA[<p>People have different opinions on saving images in database. Some says, "Why bother database if we can handle this by saving images to disk". I am agree with this;).</p>
<p>Most of the requirements can be fulfilled by saving the images to disk. This reduces the unnecessary load on MySQL.</p>
<p>Here is the small code to save the image in MySQL with the help of PHP.<br />
<span id="more-4"></span></p>
<p>Images are saved in MySQL as BINARY data. BINARY data can not be saved in varchar or char data types, for this purpose we need a data type which can handle binary data. <a href="http://dev.mysql.com/doc/refman/5.0/en/blob.html">BLOB</a> columns are treated as binary strings (byte strings). The following table is fulfilling our requirements for a simple test with a BLOB field.</p>
<pre class="mysql"><span style="color: #993333; font-weight: bold;">CREATE TABLE</span> `images` <span style="color: #66cc66;">&#40;</span>
  `id` <span style="color: #aa9933; font-weight: bold;">INT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span> <span style="color: #aa3399; font-weight: bold;">NOT NULL</span> <span style="color: #aa3399; font-weight: bold;">AUTO_INCREMENT</span>,
  `image` <span style="color: #aa9933; font-weight: bold;">BLOB</span> <span style="color: #aa3399; font-weight: bold;">NOT NULL</span>,
  <span style="color: #993333; font-weight: bold;">PRIMARY KEY</span>  <span style="color: #66cc66;">&#40;</span>`id`<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span> ENGINE=MyISAM;</pre>
<p>Now we have a MySQL table ready to store the image. Next steps are easy i.e.</p>
<ol>
<li>Read the image</li>
<li>Encode the image data</li>
<li>Save binary data in DB</li>
</ol>
<p>These 3 steps are performed with the following PHP code</p>
<pre class="php"><span style="color: #0000ff;">$image</span> = <a href="http://www.php.net/chunk_split"><span style="color: #000066;">chunk_split</span></a><span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/base64_encode"><span style="color: #000066;">base64_encode</span></a><span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/file_get_contents"><span style="color: #000066;">file_get_contents</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;image.jpg&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0000ff;">$query</span> = <span style="color: #ff0000;">&quot;INSERT INTO images (image) VALUES('$image')&quot;</span>;
<a href="http://www.php.net/mysql_query"><span style="color: #000066;">mysql_query</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$query</span><span style="color: #66cc66;">&#41;</span> or <a href="http://www.php.net/die"><span style="color: #000066;">die</span></a><span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/mysql_error"><span style="color: #000066;">mysql_error</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;Image id is &quot;</span>.<a href="http://www.php.net/mysql_insert_id"><span style="color: #000066;">mysql_insert_id</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>Now we have saved the image in database successfully. The next step is to display the image.</p>
<pre class="php"><span style="color: #808080; font-style: italic;">// showimage.php</span>
<a href="http://www.php.net/header"><span style="color: #000066;">header</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Content-type: image/jpeg'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0000ff;">$query</span> = <span style="color: #ff0000;">&quot;SELECT image from images where id=1&quot;</span>;
<span style="color: #0000ff;">$rs</span> = <a href="http://www.php.net/mysql_fetch_array"><span style="color: #000066;">mysql_fetch_array</span></a><span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/mysql_query"><span style="color: #000066;">mysql_query</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$query</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <a href="http://www.php.net/base64_decode"><span style="color: #000066;">base64_decode</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$rs</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;image&quot;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>Ohhh!!! You wanted to display the image in HTML page. No problem, call this file as a image in &lt;img&gt; .e.g.</p>
<pre class="html4strict"><span style="color: #009900;"><a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">&lt;html&gt;</span></a></span>
<span style="color: #009900;"><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">&lt;head&gt;</span></a></span>
<span style="color: #009900;"><a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">&lt;title&gt;</span></a></span>Image Test<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head&gt;</span></span>
&nbsp;
<span style="color: #009900;"><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">&lt;body&gt;</span></a></span>
<span style="color: #009900;"><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">&lt;h1&gt;</span></a></span>Displaying image from database<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h1&gt;</span></span>
&nbsp;
<span style="color: #009900;"><a href="http://december.com/html/4/element/img.html"><span style="color: #000000; font-weight: bold;">&lt;img</span></a> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;showimage.php&quot;</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body&gt;</span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html&gt;</span></span></pre>
<p>Let me know if you need some more info on this topic.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mwasif.com/2007/4/save-image-in-mysql-with-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Download data as csv using PHP</title>
		<link>http://www.mwasif.com/2007/5/download-data-csv-using-php/</link>
		<comments>http://www.mwasif.com/2007/5/download-data-csv-using-php/#comments</comments>
		<pubDate>Sat, 30 Jun 2007 23:05:50 +0000</pubDate>
		<dc:creator>Wasif</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.mwasif.com/2007/5/download-data-in-csv-format-using-php/</guid>
		<description><![CDATA[This is a very simple example to download data in csv format using PHP and MySQL. I have used a table with two columns i.e. id and name.
The main point to download file is a proper use of header(). It has said many times in many places but I repeat here, "Make sure there must [...]]]></description>
			<content:encoded><![CDATA[<p>This is a very simple example to download data in csv format using PHP and MySQL. I have used a table with two columns i.e. id and name.</p>
<p>The main point to download file is a proper use of <a href="http://www.php.net/header">header()</a>. It has said many times in many places but I repeat here, "Make sure there must not be any sort of output (including whitespaces) before header()". We can also set a default file name for the file.</p>
<p>Here is the PHP code<br />
<span id="more-5"></span></p>
<pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #808080; font-style: italic;">// Connect to database</span>
<a href="http://www.php.net/mysql_connect"><span style="color: #000066;">mysql_connect</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;localhost&quot;</span>, <span style="color: #ff0000;">&quot;root&quot;</span>, <span style="color: #ff0000;">&quot;root&quot;</span><span style="color: #66cc66;">&#41;</span>;
<a href="http://www.php.net/mysql_select_db"><span style="color: #000066;">mysql_select_db</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;test&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">// mention the file name to display in download prompt</span>
<span style="color: #0000ff;">$file_name</span> = <span style="color: #ff0000;">&quot;download.csv&quot;</span>;
&nbsp;
<a href="http://www.php.net/header"><span style="color: #000066;">header</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Content-type: application/octet-stream&quot;</span><span style="color: #66cc66;">&#41;</span>;
<a href="http://www.php.net/header"><span style="color: #000066;">header</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Content-Disposition: attachment; filename=<span style="color: #000099; font-weight: bold;">\&quot;</span>$file_name<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #66cc66;">&#41;</span>;
<a href="http://www.php.net/header"><span style="color: #000066;">header</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Cache-Control: cache, must-revalidate&quot;</span><span style="color: #66cc66;">&#41;</span>;
<a href="http://www.php.net/header"><span style="color: #000066;">header</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Pragma: public&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">// Output header</span>
<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;Id,Name&quot;</span>.<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
&nbsp;
<span style="color: #0000ff;">$result</span> = <a href="http://www.php.net/mysql_query"><span style="color: #000066;">mysql_query</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;SELECT * FROM test&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$rs</span> = <a href="http://www.php.net/mysql_fetch_array"><span style="color: #000066;">mysql_fetch_array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$result</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$rs</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;id&quot;</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #ff0000;">&quot;,&quot;</span>;
	<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$rs</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;name&quot;</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
<p>Consider the followings when downloading a large csv file</p>
<ol>
<li>PHP script may exceed maximum execution time. To prevent this, use <a href="http://www.php.net/set_time_limit">set_time_limit()</a> at top of the script.</li>
<li>Sometimes it is beneficial to use <a href="http://www.php.net/mysql_unbuffered_query">mysql_unbuffered_query()</a> instead of mysql_query() for huge data.</li>
</ol>
<p>If you find any problem with this code, please inform.</p>
<p><strong>Note:</strong> Do not use "ID" in the start of CSV file. Doing so will result in an error "<a href="http://support.microsoft.com/kb/323626">SYLK: File format is not valid</a>" when opening this file in Microsoft Excel.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mwasif.com/2007/5/download-data-csv-using-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Enable register globals</title>
		<link>http://www.mwasif.com/2007/3/enable-register-globals/</link>
		<comments>http://www.mwasif.com/2007/3/enable-register-globals/#comments</comments>
		<pubDate>Sat, 16 Jun 2007 13:49:23 +0000</pubDate>
		<dc:creator>Wasif</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.mwasif.com/2007/3/enable-register-globals/</guid>
		<description><![CDATA[You can enable register globals in many ways including php.ini, .htaccess and using PHP code even on shared host.]]></description>
			<content:encoded><![CDATA[<p>It is strongly recommended that you do not turn on the register_globals. But if you still want to turn on register_globals then follow these steps</p>
<p>Make a .php file containing only this code </p>
<pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <a href="http://www.php.net/phpinfo"><span style="color: #000066;">phpinfo</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
<p>And upload this file to your new server and open in the browser. In the page output find the value for 'register_globals'. If it is off, then you can solve this problem in the following ways</p>
<p><span id="more-3"></span></p>
<ol>
<li>Turn on the register_globals in php.ini by<br />
<strong>register_globals = On</strong><br />
(it will not be possible if you are on a shared web server) </li>
<li>Put extract($_REQUEST) on the top of every .php file.</li>
<li>Turn on register_globals using .htaccess make a text file with the name .htaccess and put the following code in it and upload to the root folder<br />
<strong>php_flag register_globals on</strong><br />
If you already have a .htaccess file in your website, then simply put this code in it.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.mwasif.com/2007/3/enable-register-globals/feed/</wfw:commentRss>
		</item>
		<item>
		<title>enable mod_rewrite in Apache 1.3+WinXP</title>
		<link>http://www.mwasif.com/2007/1/enable-mod_rewrite-in-apache-13winxp/</link>
		<comments>http://www.mwasif.com/2007/1/enable-mod_rewrite-in-apache-13winxp/#comments</comments>
		<pubDate>Mon, 28 May 2007 11:58:51 +0000</pubDate>
		<dc:creator>Wasif</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Easy steps to enable Apache mod_rewrite for Search Engine Friendly URLs with mod_rewrite]]></description>
			<content:encoded><![CDATA[<p>mod_rewrite provides an effective way to make short/friendly URLs and it also makes your site more attractive for search engine crawlers.</p>
<p>You can enable mod_rewrite for Apache 1.3 with the below steps easily.</p>
<p><b>First step</b><br />
Remove '#' in front of<br />
LoadModule rewrite_module modules/mod_rewrite.so<br />
Make sure 'mod_rewrite.so' is available under 'apache installation directory/modules'.</p>
<p><b>Second step</b><br />
Remove '#' in front of<br />
AddModule mod_rewrite.c<br />
<span id="more-1"></span></p>
<p><b>Third step</b><br />
Set AllowOverride to any of these<br />
AllowOverride FileInfo Options<br />
or<br />
AllowOverride All</p>
<p>Rember, you will find 2 instances of AllowOverride. One like<br />
&lt;Directory /&gt;<br />
    Options FollowSymLinks<br />
    AllowOverride None<br />
&lt;/Directory&gt;</p>
<p>and the 2nd one similar to</p>
<p>&lt;Directory "C:/Program Files/Apache Group/Apache/htdocs"&gt;<br />
    Options Indexes FollowSymLinks MultiViews<br />
    AllowOverride None<br />
    Order allow,deny<br />
    Allow from all<br />
&lt;/Directory&gt;</p>
<p>Change the value in the 2nd instance.<br />
Don't forget to restart Apache for these changes to take affect.</p>
<p>A cool <a href="http://www.ilovejackdaniels.com/mod_rewrite_cheat_sheet.pdf">mod_rewrite cheat sheet</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mwasif.com/2007/1/enable-mod_rewrite-in-apache-13winxp/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
