<?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>KP Solutions &#187; php</title>
	<atom:link href="http://www.kpsolution.com/blog/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kpsolution.com/blog</link>
	<description>Solutions for Day to Day Technical Problems</description>
	<lastBuildDate>Thu, 08 Jul 2010 11:41:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>PHP Startup: Unable to load dynamic library php_openssl.dll</title>
		<link>http://www.kpsolution.com/blog/php/php-startup-unable-to-load-dynamic-library-php_openssldll/38/</link>
		<comments>http://www.kpsolution.com/blog/php/php-startup-unable-to-load-dynamic-library-php_openssldll/38/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 20:09:12 +0000</pubDate>
		<dc:creator>Ketan Patel</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://www.kpsolution.com/blog/?p=38</guid>
		<description><![CDATA[You might get the error: &#8220;PHP Startup: Unable to load dynamic library php_openssl.dll. The operating system cannot run %1&#8220;, when you are trying to start the apache server in the error.log file. Basically what this error is trying to mention &#8230; <a href="http://www.kpsolution.com/blog/php/php-startup-unable-to-load-dynamic-library-php_openssldll/38/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>You might get the error: &#8220;<strong>PHP Startup: Unable to load dynamic library php_openssl.dll</strong>. <strong>The operating system cannot run %1</strong>&#8220;, when you are trying to start the apache server in the error.log file.</p>
<p>Basically what this error is trying to mention that there is an issue with your php_openssl.dll and a possible mismatch with other depending libraries. To resolve this, follow the below steps:</p>
<p>1. Rename &#8216;ssleay32.dll&#8217; and &#8216;libeay32.dll&#8217; in c:\windows\system32 to &#8216;ssleay32.dll.old&#8217; and &#8216;libeay32.dll.old&#8217; respectively.</p>
<p>2. Copy &#8216;ssleay32.dll&#8217; and &#8216;libeay32.dll&#8217; from your PHP folder to the system32.</p>
<p>3. Restart the apache webserver.</p>
<p>This should get your problem sorted!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kpsolution.com/blog/php/php-startup-unable-to-load-dynamic-library-php_openssldll/38/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to remove all comments in a file</title>
		<link>http://www.kpsolution.com/blog/tips/how-to-remove-all-comments-in-a-file/10/</link>
		<comments>http://www.kpsolution.com/blog/tips/how-to-remove-all-comments-in-a-file/10/#comments</comments>
		<pubDate>Wed, 14 May 2008 15:03:40 +0000</pubDate>
		<dc:creator>Ketan Patel</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.kpsolution.com/blog/tips/how-to-remove-all-comments-in-a-file/10/</guid>
		<description><![CDATA[If you are ever stuck in situation where you want to remove all the comments regardless of what they are in a source file. Here&#8217;s a small command that you can issue in VIM. It is for pattern search and &#8230; <a href="http://www.kpsolution.com/blog/tips/how-to-remove-all-comments-in-a-file/10/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you are ever stuck in situation where you want to remove all the comments regardless of what they are in a source file. Here&#8217;s a small command that you can issue in VIM. It is for pattern search and replace using regex.</p>
<p>Open the file in VIM then</p>
<p>:g/\/\/.\+/s</p>
<p>Above command will look for anything after including the &#8220;//&#8221; characters which is basically a comment in C, C++, php and several other languages.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kpsolution.com/blog/tips/how-to-remove-all-comments-in-a-file/10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php header() function not working!</title>
		<link>http://www.kpsolution.com/blog/php/php-header-function-not-working/8/</link>
		<comments>http://www.kpsolution.com/blog/php/php-header-function-not-working/8/#comments</comments>
		<pubDate>Sun, 29 Jul 2007 18:37:59 +0000</pubDate>
		<dc:creator>Ketan Patel</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.kpsolution.com/blog/php/php-header-function-not-working/8/</guid>
		<description><![CDATA[I was going nuts to find the problem why did the header() function didn&#8217;t redirect my page in some instance and did in others! Luckily I found this function &#8216;headers_sent()&#8217; which will tell you if at any given point any &#8230; <a href="http://www.kpsolution.com/blog/php/php-header-function-not-working/8/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was going nuts to find the problem why did the header() function didn&#8217;t redirect my page in some instance and did in others! Luckily I found this function &#8216;headers_sent()&#8217; which will tell you if at any given point any headers were sent. If the headers were sent from some other file then this function will give you the file name and the line number from where the unexpected header was sent. Very useful and neat. See the example below, it is from php.net manual page.</p>
<p><code><span class="html">Consider the following scenario,</span></code></p>
<p><span class="default">&lt;?php<br />
</span><span class="comment">// Sign out<br />
</span><span class="default">signOut</span><span class="keyword">();</span></p>
<p><span class="comment">// Redirect back to the main page<br />
</span><span class="default">header</span><span class="keyword">(</span><span class="string">&#8220;Location: <a href="http://toronto.eclassifieds4u.com/main" target="_blank">http://toronto.eclassifieds4u.com/main</a>&#8220;</span><span class="keyword">);<br />
</span><span class="default">?&gt;<br />
</span><br />
If for some reason, the header() call to redirect is not working, there won&#8217;t be any error messages, making it difficult to debug.  However, using headers_sent(), you may easily find the source of the problem.</p>
<p><span class="default">&lt;?php<br />
</span><span class="comment">// Sign out<br />
</span><span class="default">signOut</span><span class="keyword">();</span></p>
<p><span class="comment">/*<br />
* If headers were already sent for some reason,<br />
* the upcoming call to header() will not work&#8230;<br />
*/<br />
</span><span class="keyword">if(</span><span class="default">headers_sent</span><span class="keyword">(</span><span class="default">$file</span><span class="keyword">, </span><span class="default">$line</span><span class="keyword">)){<br />
</span><span class="comment">// &#8230; where were the mysterious headers sent from?<br />
</span><span class="keyword">echo </span><span class="string">&#8220;Headers were already sent in $file on line $line&#8230;&#8221;</span><span class="keyword">;<br />
}</span></p>
<p><span class="comment">// Redirect back to the main page<br />
</span><span class="default">header</span><span class="keyword">(</span><span class="string">&#8220;Location: <a href="http://toronto.eclassifieds4u.com/main" target="_blank">http://toronto.eclassifieds4u.com/main</a>&#8220;</span><span class="keyword">);<br />
</span><span class="default">?&gt;<br />
</span><br />
As the documentation states, &#8220;header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP.&#8221;  In the above debugging solution, you will find out exactly where any of these problematic output or blank lines exist.  You should then be able to resolve the issues with much more ease than if you hunted for the problems aimlessly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kpsolution.com/blog/php/php-header-function-not-working/8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fatal error: Unable to read X bytes in file.php</title>
		<link>http://www.kpsolution.com/blog/php/fatal-error-unable-to-read-x-bytes-in-filephp/7/</link>
		<comments>http://www.kpsolution.com/blog/php/fatal-error-unable-to-read-x-bytes-in-filephp/7/#comments</comments>
		<pubDate>Thu, 10 May 2007 22:06:01 +0000</pubDate>
		<dc:creator>Ketan Patel</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://www.kpsolution.com/blog/php/fatal-error-unable-to-read-x-bytes-in-filephp/7/</guid>
		<description><![CDATA[If you got this error Fatal error: Unable to read X bytes in file.php, then: You have encoded your php files using Zend Encoder and uploaded to the server but gives you this error. This problem occurs due to your &#8230; <a href="http://www.kpsolution.com/blog/php/fatal-error-unable-to-read-x-bytes-in-filephp/7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you got this error <strong>Fatal error: Unable to read X bytes in file.php, then:</strong></p>
<p>You have encoded your php files using Zend Encoder and uploaded to the server but gives you this error. This problem occurs due to your FTP software which has ftp&#8217;ed your file to the server in ascii mode.</p>
<p>To fix, make sure you upload the file in binary mode and not ascii. This will fix your problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kpsolution.com/blog/php/fatal-error-unable-to-read-x-bytes-in-filephp/7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
