<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.1" -->
<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/"
	>

<channel>
	<title>dan's homepage</title>
	<link>http://pomocnik.com/users/dan</link>
	<description>VoIP, Linux, PHP</description>
	<pubDate>Mon, 08 Jan 2007 13:48:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>
	<language>en</language>
			<item>
		<title>PHP performance checking (for example: because of Dreamhost CPU usage warning)</title>
		<link>http://pomocnik.com/users/dan/2006/01/php-performance-checking-for-example-because-of-dreamhost-cpu-usage-warning/</link>
		<comments>http://pomocnik.com/users/dan/2006/01/php-performance-checking-for-example-because-of-dreamhost-cpu-usage-warning/#comments</comments>
		<pubDate>Thu, 26 Jan 2006 17:42:21 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://pomocnik.com/users/dan/2006/01/php-performance-checking-for-example-because-of-dreamhost-cpu-usage-warning/</guid>
		<description><![CDATA[If you want to optimize your PHP script or find out what part of your PHP script causes problems (for example consumes too much CPU time on Dreamhost) - below you can find solution how to do it - how to check - chow long selected parts of your PHP script work.
For our convenience we [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to optimize your PHP script or find out what part of your PHP script causes problems (for example consumes too much CPU time on Dreamhost) - below you can find solution how to do it - how to check - chow long selected parts of your PHP script work.</p>
<p>For our convenience we need to prepare two usefull funcions, first to start timer, second to stop it and log some information into the log file.</p>
<p>//this funcion starts timer<br />
function startLog(){<br />
global $startTime;<br />
$startTime = microtime();<br />
}</p>
<p>//this funcion stops timer and logs some information to log<br />
function stopLog($info){<br />
global $startTime;<br />
$startT = explode(&#8217; &#8216;, $startTime);<br />
$endT = explode(&#8217; &#8216;, microtime());<br />
$workTime = ($endT[1]+$endT[0]) - ($startT[1]+$startT[0]);<br />
$f = fopen(&#8217;performance.log&#8217;, &#8216;a&#8217;, 1);<br />
// time work_time info REQUEST_URI REMOTE_ADDR HTTP_USER_AGENT<br />
fwrite($f, date(&#8217;m-d-Y H:m:s&#8217;) . &#8220;\t&#8221;.$workTime . &#8220;\t[&#8221; . $info . &#8220;]\t&#8221; . $_SERVER[&#8217;REQUEST_URI&#8217;] . &#8220;\t&#8221; . $_SERVER[&#8217;REMOTE_ADDR&#8217;] . &#8220;\t&#8221; . $_SERVER[&#8217;HTTP_USER_AGENT&#8217;] . &#8220;\n&#8221;);<br />
fclose($f);<br />
}</p>
<p><strong>NOTICE: you must ensure that your www serwer (for example Apache) can write to specified location - where your performance.log file should be placed.</strong></p>
<p>now you should  <a href="http://pomocnik.com/users/dan/2006/01/php-performance-checking-for-example-because-of-dreamhost-cpu-usage-warning/#more-24" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pomocnik.com/users/dan/2006/01/php-performance-checking-for-example-because-of-dreamhost-cpu-usage-warning/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Adsense Notifier</title>
		<link>http://pomocnik.com/users/dan/2006/01/adsense-notifier/</link>
		<comments>http://pomocnik.com/users/dan/2006/01/adsense-notifier/#comments</comments>
		<pubDate>Wed, 18 Jan 2006 18:41:12 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://pomocnik.com/users/dan/2006/01/mincus-code-%c2%bb-adsense-notifier/</guid>
		<description><![CDATA[If you need to check your adsense stats &#8220;every three seconds&#8221; you should install Adsense Notifier extension for Firefox!
&#8220;Adsense Notifier simply shows your adsense stats on the status bar and updates the stats automatically. This is wonderful for anyone with OCD ( or GAD as some have called it ) who needs to check their [...]]]></description>
			<content:encoded><![CDATA[<p>If you need to check your adsense stats &#8220;every three seconds&#8221; you should install Adsense Notifier extension for Firefox!</p>
<p>&#8220;Adsense Notifier simply shows your adsense stats on the status bar and updates the stats automatically. This is wonderful for anyone with OCD ( or GAD as some have called it ) who needs to check their stats every three seconds to see if they have gotten any more clicks :-p&#8221;</p>
<p>read more and download it at: <a href="http://code.mincus.com/?p=3">mincus code » Adsense Notifier</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pomocnik.com/users/dan/2006/01/adsense-notifier/feed/</wfw:commentRss>
		</item>
		<item>
		<title>checking for C compiler default output file name&#8230; configure: error: C compiler cannot create executables</title>
		<link>http://pomocnik.com/users/dan/2005/10/checking-for-c-compiler-default-output-file-name-configure-error-c-compiler-cannot-create-executables/</link>
		<comments>http://pomocnik.com/users/dan/2005/10/checking-for-c-compiler-default-output-file-name-configure-error-c-compiler-cannot-create-executables/#comments</comments>
		<pubDate>Mon, 24 Oct 2005 19:11:18 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://pomocnik.com/users/dan/2005/10/checking-for-c-compiler-default-output-file-name-configure-error-c-compiler-cannot-create-executables/</guid>
		<description><![CDATA[So, &#8230; you have gcc and try to compile some stuff -  but ./configure answers:
checking for C compiler default output file name&#8230; configure: error: C compiler cannot create executables.
Solution:
Just install glibc-devel
that&#8217;s all.
]]></description>
			<content:encoded><![CDATA[<p>So, &#8230; you have <strong>gcc</strong> and try to compile some stuff -  but ./configure <strong>answers</strong>:</p>
<p><strong>checking for C compiler default output file name&#8230; configure: error: C compiler cannot create executables.</strong></p>
<p><strong>Solution:</strong></p>
<p>Just install glibc-devel</p>
<p>that&#8217;s all.</p>
]]></content:encoded>
			<wfw:commentRss>http://pomocnik.com/users/dan/2005/10/checking-for-c-compiler-default-output-file-name-configure-error-c-compiler-cannot-create-executables/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration</title>
		<link>http://pomocnik.com/users/dan/2005/10/warning-fopen-functionfopen-url-file-access-is-disabled-in-the-server-configuration/</link>
		<comments>http://pomocnik.com/users/dan/2005/10/warning-fopen-functionfopen-url-file-access-is-disabled-in-the-server-configuration/#comments</comments>
		<pubDate>Sun, 09 Oct 2005 15:57:12 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://pomocnik.com/users/dan/2005/10/warning-fopen-functionfopen-url-file-access-is-disabled-in-the-server-configuration/</guid>
		<description><![CDATA[What to do if you&#8217;ve got this:
Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration
Warning: fopen(http://somelocation.com/somefile.xml) [function.fopen]: failed to open stream: no suitable wrapper could be found in /home/someuser/somephpfile.php on line [someline :-)]
???
It happens if - for security reasons fopen is restricted to open remote files. If it is on a hosting server [...]]]></description>
			<content:encoded><![CDATA[<p>What to do if you&#8217;ve got this:</p>
<p>Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration</p>
<p>Warning: fopen(http://somelocation.com/somefile.xml) [function.fopen]: failed to open stream: no suitable wrapper could be found in /home/someuser/somephpfile.php on line [someline :-)]</p>
<p>???</p>
<p>It happens if - for security reasons fopen is restricted to open remote files. If it is on a hosting server and you cannot change configuration you may try curl. Example below:</p>
<p><strong>instead of:</strong><br />
<code><br />
$file = "http://somelocation.com/somefile.xml";<br />
$fp = fopen($file, "r");<br />
</code></p>
<p><strong>try the solution with curl*:</strong></p>
<p><code><br />
$file = "http://somelocation.com/somefile.xml";<br />
$ch = curl_init($file);<br />
$fp = @fopen("temp.xml", "w");<br />
curl_setopt($ch, CURLOPT_FILE, $fp);<br />
curl_setopt($ch, CURLOPT_HEADER, 0);<br />
curl_exec($ch);<br />
curl_close($ch);<br />
fclose($fp);<br />
$file = "temp.xml";<br />
$fp = fopen($file, "r");<br />
</code></p>
<p>That&#8217;s all <img src='http://pomocnik.com/users/dan/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>* - ensure that you have write access - so curl can write to temp.xml</p>
]]></content:encoded>
			<wfw:commentRss>http://pomocnik.com/users/dan/2005/10/warning-fopen-functionfopen-url-file-access-is-disabled-in-the-server-configuration/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to convert dos file to unix/linux format.</title>
		<link>http://pomocnik.com/users/dan/2005/08/how-to-convert-dos-file-to-unixlinux-format/</link>
		<comments>http://pomocnik.com/users/dan/2005/08/how-to-convert-dos-file-to-unixlinux-format/#comments</comments>
		<pubDate>Wed, 24 Aug 2005 19:16:44 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://pomocnik.com/users/dan/2005/08/hot-to-convert-dos-file-to-unixlinux-format/</guid>
		<description><![CDATA[How to get rid off all bad Windows line endings?
it&#8217;s simple, for example to convert all *.php files in directory write:
for x in *.php; do dos2unix $x; done 
]]></description>
			<content:encoded><![CDATA[<p>How to get rid off all bad Windows line endings?</p>
<p>it&#8217;s simple, for example to convert all *.php files in directory write:</p>
<p><code>for x in *.php; do dos2unix $x; done </code></p>
]]></content:encoded>
			<wfw:commentRss>http://pomocnik.com/users/dan/2005/08/how-to-convert-dos-file-to-unixlinux-format/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Apache Server Tutorial Part I: Preparing to Install WAMP on Windows NT 2000 Pro</title>
		<link>http://pomocnik.com/users/dan/2005/08/apache-server-tutorial-part-i-preparing-to-install-wamp-on-windows-nt-2000-pro/</link>
		<comments>http://pomocnik.com/users/dan/2005/08/apache-server-tutorial-part-i-preparing-to-install-wamp-on-windows-nt-2000-pro/#comments</comments>
		<pubDate>Tue, 16 Aug 2005 18:44:55 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://pomocnik.com/users/dan/2005/08/apache-server-tutorial-part-i-preparing-to-install-wamp-on-windows-nt-2000-pro/</guid>
		<description><![CDATA[Definition  WAMP is an acronym for the combination Microsoft Windows, Apache, MySQL and one or more of Perl, PHP and Python. It is modelled after the more well-known LAMP, referring to the all-open source/free software approach which uses Linux instead of Windows. 
]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/WAMP">Definition</a>  <a href="http://technorati.com/tag/WAMP" rel="tag">WAMP</a> is an acronym for the combination Microsoft Windows, <a href="http://technorati.com/tag/apache" rel="tag">Apache</a>, <a href="http://technorati.com/tag/mySQL" rel="tag">MySQL</a> and one or more of <a href="http://www.perl.org/?perl" rel="tag">Perl</a>, <a href="http://en.wikipedia.org/wiki/Php" rel="tag">PHP</a> and <a href="http://technorati.com/tag/python" rel="tag">Python</a>. It is modelled after the more well-known <a href="http://en.wikipedia.org/wiki/LAMP">LAMP</a>, referring to the all-open source/free software approach which uses Linux instead of Windows. </p>
<p> <a href="http://pomocnik.com/users/dan/2005/08/apache-server-tutorial-part-i-preparing-to-install-wamp-on-windows-nt-2000-pro/#more-19" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pomocnik.com/users/dan/2005/08/apache-server-tutorial-part-i-preparing-to-install-wamp-on-windows-nt-2000-pro/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to password protect web directory (folder)</title>
		<link>http://pomocnik.com/users/dan/2005/07/how-to-password-protect-web-directory-folder/</link>
		<comments>http://pomocnik.com/users/dan/2005/07/how-to-password-protect-web-directory-folder/#comments</comments>
		<pubDate>Tue, 26 Jul 2005 21:16:09 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://pomocnik.com/users/dan/2005/07/how-to-password-protect-web-directory-folder/</guid>
		<description><![CDATA[1. Create .htaccess file with the content below:
AuthUserFile /home/username/htdocs/.htpasswd
AuthName &#8220;Password Protected&#8221;
AuthType Basic
require valid-user
Of course in the AuthUserFile type in the location of the .htpasswd file (i.e. when you want to store that file, you&#8217;ll create it in next step)
2. Set password for the user(users) (-c option creates .htpasswd file)
If it is your first user&#8217;s password [...]]]></description>
			<content:encoded><![CDATA[<p>1. Create .htaccess file with the content below:</p>
<p>AuthUserFile /home/username/htdocs/.htpasswd<br />
AuthName &#8220;Password Protected&#8221;<br />
AuthType Basic<br />
require valid-user</p>
<p>Of course in the AuthUserFile type in the location of the .htpasswd file (i.e. when you want to store that file, you&#8217;ll create it in next step)</p>
<p>2. Set password for the user(users) (-c option creates .htpasswd file)</p>
<p>If it is your first user&#8217;s password - use -c option</p>
<p>htpasswd -c .htpasswd username</p>
<p>type and confirm password</p>
<p>that&#8217;s all</p>
<p>(for other users you should ommit -c, because you not need to create .htpasswd file, simply write</p>
<p>htpasswd .htpasswd anotherusername</p>
<p>type and confirm password)</p>
]]></content:encoded>
			<wfw:commentRss>http://pomocnik.com/users/dan/2005/07/how-to-password-protect-web-directory-folder/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Firefox &#038; Thunderbird working together!</title>
		<link>http://pomocnik.com/users/dan/2005/07/firefox-thunderbird-working-together/</link>
		<comments>http://pomocnik.com/users/dan/2005/07/firefox-thunderbird-working-together/#comments</comments>
		<pubDate>Fri, 22 Jul 2005 20:49:06 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://pomocnik.com/users/dan/2005/07/firefox-thunderbird-working-together/</guid>
		<description><![CDATA[[description taken from ubuntuforums.org but might be usefull for all Linux distros :-)]
Some people have problems using mailto links with Thunderbird. To fix the &#8220;choose user profile&#8221; problem, follow this howto.
THUNDERBIRD: Open with firefox an URL contained in an email

Open Nautilus and type this in the address bar: ~/.thunderbird (if that doesn&#8217;t work, try ~/.mozilla-thunderbird)
Go [...]]]></description>
			<content:encoded><![CDATA[<p>[description taken from ubuntuforums.org but might be usefull for all Linux distros :-)]</p>
<p>Some people have problems using mailto links with Thunderbird. To fix the &#8220;choose user profile&#8221; problem, follow this howto.</p>
<p>THUNDERBIRD: Open with firefox an URL contained in an email</p>
<ol>
<li>Open Nautilus and type this in the address bar: ~/.thunderbird (if that doesn&#8217;t work, try ~/.mozilla-thunderbird)</li>
<li>Go your profile directory (with a random-generated name, like this Xbcgev.default). To be sure you&#8217;re in the correct directory check if a file named prefs.js exists.</li>
<li>File > Create Document > Empty Document highlight it and press F2 to rename the document user.js (If it already exists skip this passage).</li>
<li>Open user.js and write this line (if the file already exists append the line at the end): user_pref(&#8221;network.protocol-handler.app.http&#8221;, &#8220;/usr/bin/firefox&#8221;); /usr/bin/firefox is obviously the path to execute firefox</li>
<li>That&#8217;s all</li>
</ol>
<p>FIREFOX: open thunderbird when clicking on a &#8220;mailto:&#8221; link</p>
<ol>
<li>Open Nautilus and type this in the address bar: ~/.mozilla/firefox (if that doesn&#8217;t work, try ~/.mozilla-thunderbird)</li>
<li>Go your profile directory (with a random-generated name, like this Xbcgev.default). To be sure you&#8217;re in the correct directory check if a file named prefs.js exists.</li>
<li>File > Create Document > Empty Document highlight it and press F2 to rename the document user.js (If it already exists skip this passage).</li>
<li>Open user.js and write this line (if the file already exists append the line at the end): user_pref(&#8221;network.protocol-handler.app.mailto&#8221;,&#8221;/usr/bin/mozilla-thunderbird&#8221;); /usr/bin/mozilla-thunderbird is the path to execute thunderbird</li>
<li>That&#8217;s all</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://pomocnik.com/users/dan/2005/07/firefox-thunderbird-working-together/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Great firefox extension - customizegoogle</title>
		<link>http://pomocnik.com/users/dan/2005/06/great-firefox-extension-customizegoogle/</link>
		<comments>http://pomocnik.com/users/dan/2005/06/great-firefox-extension-customizegoogle/#comments</comments>
		<pubDate>Thu, 09 Jun 2005 18:50:21 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://pomocnik.com/users/dan/2005/06/great-firefox-extension-customizegoogle/</guid>
		<description><![CDATA[Just look at: http://www.customizegoogle.com/ its great Mozilla Firefox extension for google!
]]></description>
			<content:encoded><![CDATA[<p>Just look at: http://www.customizegoogle.com/ its great Mozilla Firefox extension for google!</p>
]]></content:encoded>
			<wfw:commentRss>http://pomocnik.com/users/dan/2005/06/great-firefox-extension-customizegoogle/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Invisible dragon :-)</title>
		<link>http://pomocnik.com/users/dan/2005/05/invisible-dragon/</link>
		<comments>http://pomocnik.com/users/dan/2005/05/invisible-dragon/#comments</comments>
		<pubDate>Fri, 27 May 2005 15:40:23 +0000</pubDate>
		<dc:creator>dan</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://pomocnik.com/users/dan/2005/05/invisible-dragon/</guid>
		<description><![CDATA[If you wanna see the Invisible Dragon walking through a blizzard! You can find him here 
]]></description>
			<content:encoded><![CDATA[<p>If you wanna see the Invisible Dragon walking through a blizzard! You can find him <a href="http://invisibledragon.org/">here</a> <img src='http://pomocnik.com/users/dan/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://pomocnik.com/users/dan/2005/05/invisible-dragon/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

