<?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>Beaver6813.com &#187; Notes</title>
	<atom:link href="http://beaver6813.com/category/notes/feed/" rel="self" type="application/rss+xml" />
	<link>http://beaver6813.com</link>
	<description>Web Developer Extraordinaire!</description>
	<lastBuildDate>Sat, 10 Jul 2010 18:36:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1-RC1</generator>
		<item>
		<title>PHP Compilation (Cannot find -lltdl)</title>
		<link>http://beaver6813.com/2010/07/php-compilation-cannot-find-lltdl/</link>
		<comments>http://beaver6813.com/2010/07/php-compilation-cannot-find-lltdl/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 18:15:10 +0000</pubDate>
		<dc:creator>Beaver6813</dc:creator>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[php php5 mcrypt lltdl source compile]]></category>

		<guid isPermaLink="false">http://beaver6813.com/?p=234</guid>
		<description><![CDATA[When compiling PHP from source (in my case version 5.3.2) on CentOS 5.4 I kept getting the following error when trying to compile with mcrypt: "/usr/bin/ld: cannot find -lltdl" This seems to be due to a missing development library with the obscure name of libtool-ltdl-devel to fix this simply use: yum install libtool-ltdl-devel Which should [...]


Related posts:<ol><li><a href='http://beaver6813.com/2010/03/godaddy-mod_rewrite-hell/' rel='bookmark' title='Permanent Link: GoDaddy mod_rewrite Hell'>GoDaddy mod_rewrite Hell</a></li>
<li><a href='http://beaver6813.com/2009/11/case-of-the-missinghidden-ie8-developer-tools-window/' rel='bookmark' title='Permanent Link: Case of the missing/hidden IE8 Developer Tools window'>Case of the missing/hidden IE8 Developer Tools window</a></li>
<li><a href='http://beaver6813.com/2010/05/decor-scene/' rel='bookmark' title='Permanent Link: Decor Scene'>Decor Scene</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>When compiling PHP from source (in my case version 5.3.2) on CentOS 5.4 I kept getting the following error when trying to compile with mcrypt:</p>
<p><code>"/usr/bin/ld: cannot find -lltdl"</code></p>
<p>This seems to be due to a missing development library with the obscure name of <span style="font-family: Courier New;">libtool-ltdl-devel</span> to fix this simply use:</p>
<p><code>yum install libtool-ltdl-devel</code></p>
<p>Which should include the package along with several dependencies.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">libltdl3-dev</div>


<p>Related posts:<ol><li><a href='http://beaver6813.com/2010/03/godaddy-mod_rewrite-hell/' rel='bookmark' title='Permanent Link: GoDaddy mod_rewrite Hell'>GoDaddy mod_rewrite Hell</a></li>
<li><a href='http://beaver6813.com/2009/11/case-of-the-missinghidden-ie8-developer-tools-window/' rel='bookmark' title='Permanent Link: Case of the missing/hidden IE8 Developer Tools window'>Case of the missing/hidden IE8 Developer Tools window</a></li>
<li><a href='http://beaver6813.com/2010/05/decor-scene/' rel='bookmark' title='Permanent Link: Decor Scene'>Decor Scene</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://beaver6813.com/2010/07/php-compilation-cannot-find-lltdl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Search and Replace Directory Recursively</title>
		<link>http://beaver6813.com/2010/04/php-search-and-replace-directory-recursively/</link>
		<comments>http://beaver6813.com/2010/04/php-search-and-replace-directory-recursively/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 16:04:11 +0000</pubDate>
		<dc:creator>Beaver6813</dc:creator>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[find and replace]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[recurse]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[search and replace]]></category>

		<guid isPermaLink="false">http://beaver6813.com/?p=207</guid>
		<description><![CDATA[On a message forum I regularily visit a member was having issues with code being placed in multiple files that he wanted to remove or change without having to edit each and every file manually. For this I created a search and replace function which will recursively search the directory and every file for a [...]


Related posts:<ol><li><a href='http://beaver6813.com/2009/10/new-project-vbulletin-bridge/' rel='bookmark' title='Permanent Link: New Project: vBulletin-Bridge'>New Project: vBulletin-Bridge</a></li>
<li><a href='http://beaver6813.com/2010/03/godaddy-mod_rewrite-hell/' rel='bookmark' title='Permanent Link: GoDaddy mod_rewrite Hell'>GoDaddy mod_rewrite Hell</a></li>
<li><a href='http://beaver6813.com/2009/10/bash-bad-interpreter/' rel='bookmark' title='Permanent Link: Bash, Bad Interpreter'>Bash, Bad Interpreter</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>On a message forum I regularily visit a member was having issues with code being placed in multiple files that he wanted to remove or change without having to edit each and every file manually. For this I created a search and replace function which will recursively search the directory and every file<span id="more-207"></span> for a specific piece of code and will replace with whatever:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p207code2'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2072"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
</pre></td><td class="code" id="p207code2"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$stringsearch</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;texttosearchfor&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$dir</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;./&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Starting search for <span style="color: #006699; font-weight: bold;">$stringsearch</span> within directory <span style="color: #006699; font-weight: bold;">$dir</span>
&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$listDir</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handler</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/opendir"><span style="color: #990000;">opendir</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sub</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/readdir"><span style="color: #990000;">readdir</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handler</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$sub</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;.&quot;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #000088;">$sub</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;..&quot;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #000088;">$sub</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;Thumb.db&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_file"><span style="color: #990000;">is_file</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$sub</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/substr_count"><span style="color: #990000;">substr_count</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sub</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'.php'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
                            <span style="color: #009900;">&#123;</span>
                            <span style="color: #000088;">$getfilecontents</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/file_get_contents"><span style="color: #990000;">file_get_contents</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$sub</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                            <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/substr_count"><span style="color: #990000;">substr_count</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$getfilecontents</span><span style="color: #339933;">,</span><span style="color: #000088;">$stringsearch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
                            <span style="color: #009900;">&#123;</span>
                            <span style="color: #000088;">$replacer</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$stringsearch</span><span style="color: #339933;">,</span><span style="color: #000088;">$stringreplace</span><span style="color: #339933;">,</span><span style="color: #000088;">$getfilecontents</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                            <span style="color: #666666; font-style: italic;">// Let's make sure the file exists and is writable first.</span>
                              <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_writable"><span style="color: #990000;">is_writable</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$sub</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                                  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$handle</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/fopen"><span style="color: #990000;">fopen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$sub</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'w'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                                       <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Cannot open file (&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$dir</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$sub</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;)&quot;</span><span style="color: #339933;">;</span>
                                       <a href="http://www.php.net/exit"><span style="color: #990000;">exit</span></a><span style="color: #339933;">;</span>
                                  <span style="color: #009900;">&#125;</span>
                                  <span style="color: #666666; font-style: italic;">// Write $somecontent to our opened file.</span>
                                  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/fwrite"><span style="color: #990000;">fwrite</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #339933;">,</span> <span style="color: #000088;">$replacer</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">===</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                                      <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Cannot write to file (&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$dir</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$sub</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;)&quot;</span><span style="color: #339933;">;</span>
                                      <a href="http://www.php.net/exit"><span style="color: #990000;">exit</span></a><span style="color: #339933;">;</span>
                                  <span style="color: #009900;">&#125;</span>
                                  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Success, removed searched content from:&quot;</span><span style="color: #000088;">$dir</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$sub</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;
&quot;</span><span style="color: #339933;">;</span>
                                  <a href="http://www.php.net/fclose"><span style="color: #990000;">fclose</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                              <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
                                  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;The file &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$dir</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$sub</span><span style="color: #0000ff;">&quot; is not writable
&quot;</span><span style="color: #339933;">;</span>
                              <span style="color: #009900;">&#125;</span>
                            <span style="color: #009900;">&#125;</span>
                            <span style="color: #009900;">&#125;</span>
                        <span style="color: #000088;">$listDir</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$sub</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_dir"><span style="color: #990000;">is_dir</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$sub</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                        <span style="color: #000088;">$listDir</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$sub</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> SearchandReplace<span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$sub</span><span style="color: #339933;">,</span><span style="color: #000088;">$stringsearch</span><span style="color: #339933;">,</span><span style="color: #000088;">$stringreplace</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>
            <a href="http://www.php.net/closedir"><span style="color: #990000;">closedir</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handler</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$listDir</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>



<p>Related posts:<ol><li><a href='http://beaver6813.com/2009/10/new-project-vbulletin-bridge/' rel='bookmark' title='Permanent Link: New Project: vBulletin-Bridge'>New Project: vBulletin-Bridge</a></li>
<li><a href='http://beaver6813.com/2010/03/godaddy-mod_rewrite-hell/' rel='bookmark' title='Permanent Link: GoDaddy mod_rewrite Hell'>GoDaddy mod_rewrite Hell</a></li>
<li><a href='http://beaver6813.com/2009/10/bash-bad-interpreter/' rel='bookmark' title='Permanent Link: Bash, Bad Interpreter'>Bash, Bad Interpreter</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://beaver6813.com/2010/04/php-search-and-replace-directory-recursively/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GoDaddy mod_rewrite Hell</title>
		<link>http://beaver6813.com/2010/03/godaddy-mod_rewrite-hell/</link>
		<comments>http://beaver6813.com/2010/03/godaddy-mod_rewrite-hell/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 13:17:58 +0000</pubDate>
		<dc:creator>Beaver6813</dc:creator>
				<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://beaver6813.com/?p=175</guid>
		<description><![CDATA[Whilst trying to install a piece of software on a GoDaddy hosted account I noticed that mod_rewrite variables were simply not being passed to the correct pages. When digging a bit deeper I found that it was effectively ignoring extensions in URLs and just displaying the file with the extension. i.e. instead of having to [...]


Related posts:<ol><li><a href='http://beaver6813.com/2010/07/php-compilation-cannot-find-lltdl/' rel='bookmark' title='Permanent Link: PHP Compilation (Cannot find -lltdl)'>PHP Compilation (Cannot find -lltdl)</a></li>
<li><a href='http://beaver6813.com/2010/06/phpgsb-php-google-safe-browsing/' rel='bookmark' title='Permanent Link: phpGSB &#8211; PHP Google Safe Browsing'>phpGSB &#8211; PHP Google Safe Browsing</a></li>
<li><a href='http://beaver6813.com/2010/04/php-search-and-replace-directory-recursively/' rel='bookmark' title='Permanent Link: PHP Search and Replace Directory Recursively'>PHP Search and Replace Directory Recursively</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Whilst trying to install a piece of software on a GoDaddy hosted account I noticed that mod_rewrite variables were simply not being passed to the correct pages. When digging a bit deeper I found that it was effectively ignoring extensions in URLs and just displaying the file with the extension. i.e. instead of having to enter:<span id="more-175"></span></p>
<p><code><em>www.example.com/advertise.php</em></code></p>
<p>you could instead type</p>
<p><code><em>www.example.com/advertise</em></code></p>
<p>And it would return the same file, which is good if for some unknown reason your file doesn&#8217;t have the correct extension, but its not exactly.. good..</p>
<p>After trawling Google for a while I found a post by <a href="http://www.ericfaerber.com/2007/08/21/godaddy-and-mod_rewrite/">Eric Faerber</a> that solved the problem. The strange redirects were due to Apache MultiViews being enabled, disabling this by entering</p>
<p><code><em>Options -MultiViews</em></code></p>
<p>into the .htaccess file. Solved the problem, the simplest solutions are always the best!</p>


<p>Related posts:<ol><li><a href='http://beaver6813.com/2010/07/php-compilation-cannot-find-lltdl/' rel='bookmark' title='Permanent Link: PHP Compilation (Cannot find -lltdl)'>PHP Compilation (Cannot find -lltdl)</a></li>
<li><a href='http://beaver6813.com/2010/06/phpgsb-php-google-safe-browsing/' rel='bookmark' title='Permanent Link: phpGSB &#8211; PHP Google Safe Browsing'>phpGSB &#8211; PHP Google Safe Browsing</a></li>
<li><a href='http://beaver6813.com/2010/04/php-search-and-replace-directory-recursively/' rel='bookmark' title='Permanent Link: PHP Search and Replace Directory Recursively'>PHP Search and Replace Directory Recursively</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://beaver6813.com/2010/03/godaddy-mod_rewrite-hell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Case of the missing/hidden IE8 Developer Tools window</title>
		<link>http://beaver6813.com/2009/11/case-of-the-missinghidden-ie8-developer-tools-window/</link>
		<comments>http://beaver6813.com/2009/11/case-of-the-missinghidden-ie8-developer-tools-window/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 14:14:02 +0000</pubDate>
		<dc:creator>Beaver6813</dc:creator>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[developer tools]]></category>
		<category><![CDATA[hidden]]></category>
		<category><![CDATA[missing]]></category>
		<category><![CDATA[window]]></category>
		<category><![CDATA[windows 7]]></category>

		<guid isPermaLink="false">http://beaver6813.com/?p=120</guid>
		<description><![CDATA[Whilst working on a current project I was trying to get cross-browser compatability working nicely. However when I came to load up IE&#8217;s Developer Tools I found it was loading up the window but nothing was there! I&#8217;m running Windows 7 and this seems to be the only version of windows the problem is affecting: [...]


Related posts:<ol><li><a href='http://beaver6813.com/2010/07/php-compilation-cannot-find-lltdl/' rel='bookmark' title='Permanent Link: PHP Compilation (Cannot find -lltdl)'>PHP Compilation (Cannot find -lltdl)</a></li>
<li><a href='http://beaver6813.com/2010/03/godaddy-mod_rewrite-hell/' rel='bookmark' title='Permanent Link: GoDaddy mod_rewrite Hell'>GoDaddy mod_rewrite Hell</a></li>
<li><a href='http://beaver6813.com/2009/10/bash-bad-interpreter/' rel='bookmark' title='Permanent Link: Bash, Bad Interpreter'>Bash, Bad Interpreter</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Whilst working on a current project I was trying to get cross-browser compatability working nicely. However when I came to load up IE&#8217;s Developer Tools I found it was loading up the window but nothing was there! I&#8217;m running Windows 7 and this seems to be the only<span id="more-120"></span> version of windows the problem is affecting:<br />
<a href="http://beaver6813.com/wp-content/uploads/2009/11/missingdev.png"><img class="size-full wp-image-121 aligncenter" title="Missing/Hidden Developer Tools" src="http://beaver6813.com/wp-content/uploads/2009/11/missingdev.png" alt="Missing/Hidden Developer Tools" width="468" height="263" /></a></p>
<p style="text-align: left;">The solution I found is actually very simple, right click on that hidden window thumbnail and click maximise. If that fails then you could always try a solution outlined on <a href="http://stackoverflow.com/questions/960683/why-isnt-my-ie8-developer-tools-working">StackOverflow</a>. The best solutions are often the most simple!!</p>


<p>Related posts:<ol><li><a href='http://beaver6813.com/2010/07/php-compilation-cannot-find-lltdl/' rel='bookmark' title='Permanent Link: PHP Compilation (Cannot find -lltdl)'>PHP Compilation (Cannot find -lltdl)</a></li>
<li><a href='http://beaver6813.com/2010/03/godaddy-mod_rewrite-hell/' rel='bookmark' title='Permanent Link: GoDaddy mod_rewrite Hell'>GoDaddy mod_rewrite Hell</a></li>
<li><a href='http://beaver6813.com/2009/10/bash-bad-interpreter/' rel='bookmark' title='Permanent Link: Bash, Bad Interpreter'>Bash, Bad Interpreter</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://beaver6813.com/2009/11/case-of-the-missinghidden-ie8-developer-tools-window/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP] Get current time in milliseconds</title>
		<link>http://beaver6813.com/2009/10/php-get-current-time-in-milliseconds/</link>
		<comments>http://beaver6813.com/2009/10/php-get-current-time-in-milliseconds/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 17:59:31 +0000</pubDate>
		<dc:creator>Beaver6813</dc:creator>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[milliseconds]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[timer]]></category>

		<guid isPermaLink="false">http://beaver6813.com/?p=100</guid>
		<description><![CDATA[I recently needed to get the current time in milliseconds, of course this can easily be retrieved using microtime() however I needed the entire number in digits, not in decimals with seconds seperately etc. Heres how: ?View Code PHP1 2 3 $timeparts = explode&#40;&#34; &#34;,microtime&#40;&#41;&#41;; $currenttime = bcadd&#40;&#40;$timeparts&#91;0&#93;*1000&#41;,bcmul&#40;$timeparts&#91;1&#93;,1000&#41;&#41;; echo $currenttime; NOTE: PHP5 is required for [...]


Related posts:<ol><li><a href='http://beaver6813.com/2010/04/php-search-and-replace-directory-recursively/' rel='bookmark' title='Permanent Link: PHP Search and Replace Directory Recursively'>PHP Search and Replace Directory Recursively</a></li>
<li><a href='http://beaver6813.com/2010/05/decor-scene/' rel='bookmark' title='Permanent Link: Decor Scene'>Decor Scene</a></li>
<li><a href='http://beaver6813.com/2010/03/jokepants/' rel='bookmark' title='Permanent Link: Jokepants'>Jokepants</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I recently needed to get the current time in milliseconds, of course this can easily be retrieved using microtime() however I needed the entire number in digits, not in decimals with seconds seperately etc. Heres how:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p100code4'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1004"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p100code4"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$timeparts</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/explode"><span style="color: #990000;">explode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span><a href="http://www.php.net/microtime"><span style="color: #990000;">microtime</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$currenttime</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/bcadd"><span style="color: #990000;">bcadd</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$timeparts</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><a href="http://www.php.net/bcmul"><span style="color: #990000;">bcmul</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$timeparts</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$currenttime</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p><em>NOTE: PHP5 is required for this function due to the improvements with microtime() and the bc math module is also required (as we&#8217;re dealing with large numbers, you can check if you have the module in phpinfo).</em></p>


<p>Related posts:<ol><li><a href='http://beaver6813.com/2010/04/php-search-and-replace-directory-recursively/' rel='bookmark' title='Permanent Link: PHP Search and Replace Directory Recursively'>PHP Search and Replace Directory Recursively</a></li>
<li><a href='http://beaver6813.com/2010/05/decor-scene/' rel='bookmark' title='Permanent Link: Decor Scene'>Decor Scene</a></li>
<li><a href='http://beaver6813.com/2010/03/jokepants/' rel='bookmark' title='Permanent Link: Jokepants'>Jokepants</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://beaver6813.com/2009/10/php-get-current-time-in-milliseconds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash, Bad Interpreter</title>
		<link>http://beaver6813.com/2009/10/bash-bad-interpreter/</link>
		<comments>http://beaver6813.com/2009/10/bash-bad-interpreter/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 15:42:42 +0000</pubDate>
		<dc:creator>Beaver6813</dc:creator>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[bad]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[interpreter]]></category>
		<category><![CDATA[remedy]]></category>

		<guid isPermaLink="false">http://beaver6813.com/?p=84</guid>
		<description><![CDATA[I recently came across: /bin/bash^M: bad interpreter: No such file or directory When trying to run a bash script that someone else had edited. This most commonly happens on UNIX systems if the file has been edited on MS-DOS or Mac. The cure for this is to run a simple perl script: ?View Code BASH1 [...]


Related posts:<ol><li><a href='http://beaver6813.com/2009/10/fetchmp3-com/' rel='bookmark' title='Permanent Link: FetchMP3.com'>FetchMP3.com</a></li>
<li><a href='http://beaver6813.com/2009/10/my-skills/' rel='bookmark' title='Permanent Link: My Skills'>My Skills</a></li>
<li><a href='http://beaver6813.com/2009/11/case-of-the-missinghidden-ie8-developer-tools-window/' rel='bookmark' title='Permanent Link: Case of the missing/hidden IE8 Developer Tools window'>Case of the missing/hidden IE8 Developer Tools window</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I recently came across:</p>
<p>/bin/bash^M: bad interpreter: No such file or directory</p>
<p>When trying to run a bash script that someone else had edited. This most commonly happens on UNIX systems if the file has been edited on MS-DOS or Mac. The cure for this is to run a simple perl script:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p84code6'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p846"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p84code6"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl -pi</span>
s<span style="color: #000000; font-weight: bold;">/</span>\n<span style="color: #000000; font-weight: bold;">/</span>\r\n<span style="color: #000000; font-weight: bold;">/</span>;</pre></td></tr></table></div>

<p>Save as unix2dos.pl, chmod +x unix2dos.pl and then run like:</p>
<p>./unix2dos.pl filetoconvert.txt</p>
<p>Simples!</p>


<p>Related posts:<ol><li><a href='http://beaver6813.com/2009/10/fetchmp3-com/' rel='bookmark' title='Permanent Link: FetchMP3.com'>FetchMP3.com</a></li>
<li><a href='http://beaver6813.com/2009/10/my-skills/' rel='bookmark' title='Permanent Link: My Skills'>My Skills</a></li>
<li><a href='http://beaver6813.com/2009/11/case-of-the-missinghidden-ie8-developer-tools-window/' rel='bookmark' title='Permanent Link: Case of the missing/hidden IE8 Developer Tools window'>Case of the missing/hidden IE8 Developer Tools window</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://beaver6813.com/2009/10/bash-bad-interpreter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
