<?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>Tech Blog &#187; php</title>
	<atom:link href="http://informationideas.com/news/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://informationideas.com/news</link>
	<description>Using technology to help your business</description>
	<lastBuildDate>Fri, 23 Jul 2010 06:24:46 +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>Fatal error: Call to undefined function: curl_init in php</title>
		<link>http://informationideas.com/news/2009/10/02/fatal-error-call-to-undefined-function-curl_init-in-php/</link>
		<comments>http://informationideas.com/news/2009/10/02/fatal-error-call-to-undefined-function-curl_init-in-php/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 02:50:01 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://informationideas.com/news/?p=109</guid>
		<description><![CDATA[For some reason, my workstation with Ubuntu 9.04, php5, apache2 and php5-curl install was giving me the curl package not installed message. Well, it turns out that for some reason, my default /etc/php5/apache2/php.ini had the extension directory pointing to /usr/lib/php5/ext/ while all the extensions were in /usr/lib/php5/20060613/ I was trying to figure out why I [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason, my workstation with Ubuntu 9.04, php5, apache2 and php5-curl install was giving me the curl package not installed message. Well, it turns out that for some reason, my default /etc/php5/apache2/php.ini had the extension directory pointing to /usr/lib/php5/ext/ while all the extensions were in /usr/lib/php5/20060613/</p>
<p>I was trying to figure out why I am not seeing curl.so in the ext directory after I have apt-get installed and removed php5-curl many times.  Solution is usually very simple.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://informationideas.com/news/2009/10/02/fatal-error-call-to-undefined-function-curl_init-in-php/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://informationideas.com/news/2009/10/02/fatal-error-call-to-undefined-function-curl_init-in-php/&amp;title=Fatal+error%3A+Call+to+undefined+function%3A+curl_init+in+php" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://informationideas.com/news/2009/10/02/fatal-error-call-to-undefined-function-curl_init-in-php/&amp;title=Fatal+error%3A+Call+to+undefined+function%3A+curl_init+in+php" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://informationideas.com/news/2009/10/02/fatal-error-call-to-undefined-function-curl_init-in-php/&amp;t=Fatal+error%3A+Call+to+undefined+function%3A+curl_init+in+php" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://informationideas.com/news/2009/10/02/fatal-error-call-to-undefined-function-curl_init-in-php/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://informationideas.com/news/2009/10/02/fatal-error-call-to-undefined-function-curl_init-in-php/&amp;title=Fatal+error%3A+Call+to+undefined+function%3A+curl_init+in+php&amp;summary=For%20some%20reason%2C%20my%20workstation%20with%20Ubuntu%209.04%2C%20php5%2C%20apache2%20and%20php5-curl%20install%20was%20giving%20me%20the%20curl%20package%20not%20installed%20message.%20Well%2C%20it%20turns%20out%20that%20for%20some%20reason%2C%20my%20default%20%2Fetc%2Fphp5%2Fapache2%2Fphp.ini%20had%20the%20extension%20directory%20pointing%20to%20%2Fusr%2Flib%2Fphp5%2Fext%2F%20while%20all%20the%20extension&amp;source=Tech Blog" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://informationideas.com/news/2009/10/02/fatal-error-call-to-undefined-function-curl_init-in-php/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Fatal+error%3A+Call+to+undefined+function%3A+curl_init+in+php+-+http://b2l.me/abz7nf&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2009/10/02/fatal-error-call-to-undefined-function-curl_init-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beware duplicate mail()&#8217;s in PHP/Firefox</title>
		<link>http://informationideas.com/news/2006/10/06/beware-duplicate-mails-in-phpfirefox/</link>
		<comments>http://informationideas.com/news/2006/10/06/beware-duplicate-mails-in-phpfirefox/#comments</comments>
		<pubDate>Fri, 06 Oct 2006 21:29:57 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://informationideas.com/news/2006/10/06/beware-duplicate-mails-in-phpfirefox/</guid>
		<description><![CDATA[Strangely, invoking the PHP SMTP mail() function after outputting any HTML within a PHP page will cause Firefox to intepret the PHP command twice, thereby sending out 2 duplicate emails. This was happening using PHP5, FF1.5, and Windows IIS6. The issue is fixed by simply placing the mail() command as the first part of any [...]]]></description>
			<content:encoded><![CDATA[<p>Strangely, invoking the PHP SMTP mail() function <em>after </em>outputting any HTML within a PHP page will cause Firefox to intepret the PHP command twice, thereby sending out 2 duplicate emails. This was happening using PHP5, FF1.5, and Windows IIS6. The issue is fixed by simply placing the mail() command as the first part of any script, before any headers or output are called. I cannot ascertain yet <em>why </em>this is occurring. Any ideas, anyone?</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://informationideas.com/news/2006/10/06/beware-duplicate-mails-in-phpfirefox/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://informationideas.com/news/2006/10/06/beware-duplicate-mails-in-phpfirefox/&amp;title=Beware+duplicate+mail%28%29%27s+in+PHP%2FFirefox" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://informationideas.com/news/2006/10/06/beware-duplicate-mails-in-phpfirefox/&amp;title=Beware+duplicate+mail%28%29%27s+in+PHP%2FFirefox" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://informationideas.com/news/2006/10/06/beware-duplicate-mails-in-phpfirefox/&amp;t=Beware+duplicate+mail%28%29%27s+in+PHP%2FFirefox" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://informationideas.com/news/2006/10/06/beware-duplicate-mails-in-phpfirefox/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://informationideas.com/news/2006/10/06/beware-duplicate-mails-in-phpfirefox/&amp;title=Beware+duplicate+mail%28%29%27s+in+PHP%2FFirefox&amp;summary=Strangely%2C%20invoking%20the%20PHP%20SMTP%20mail%28%29%20function%20after%20outputting%20any%20HTML%20within%20a%20PHP%20page%20will%20cause%20Firefox%20to%20intepret%20the%20PHP%20command%20twice%2C%20thereby%20sending%20out%202%20duplicate%20emails.%20This%20was%20happening%20using%20PHP5%2C%20FF1.5%2C%20and%20Windows%20IIS6.%20The%20issue%20is%20fixed%20by%20simply%20placing%20the%20mail%28%29%20command%20a&amp;source=Tech Blog" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://informationideas.com/news/2006/10/06/beware-duplicate-mails-in-phpfirefox/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Beware+duplicate+mail%28%29%27s+in+PHP%2FFirefox+-+http://b2l.me/acdr5w&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2006/10/06/beware-duplicate-mails-in-phpfirefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fatal error: Cannot use string offset as an array in &#8230;</title>
		<link>http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/</link>
		<comments>http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/#comments</comments>
		<pubDate>Wed, 14 Jun 2006 22:54:42 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/</guid>
		<description><![CDATA[PHP5 Error message that is caused by attempting to assign a value to an array element of a variable that is declared as a string. Example that generates error: $foo=&#8217;bar&#8217;; $foo[0]=&#8217;bar&#8217;; Get error message Fatal error: Cannot use string offset as an array in &#8230; Explanation $foo was declared as a string in $foo=&#8217;bar&#8217;. $foo[0] [...]]]></description>
			<content:encoded><![CDATA[<p>PHP5 Error message that is caused by attempting to assign a value to an array element of a variable that is declared as a string.</p>
<p><strong>Example that generates error:</strong><br />
$foo=&#8217;bar&#8217;;<br />
$foo[0]=&#8217;bar&#8217;;<br />
Get error message Fatal error: Cannot use string offset as an array in &#8230;</p>
<p><em>Explanation</em><br />
$foo was declared as a string in $foo=&#8217;bar&#8217;.<br />
$foo[0] is trying to append an element onto a string variable.</p>
<p><strong>Example that does not generate error:</strong><br />
$foo[0]=&#8217;bar&#8217;;<br />
$foo=&#8217;bar&#8217;;<br />
Does NOT generate error.</p>
<p><em>Explanation</em><br />
$foo[0]=&#8217;bar&#8217; instantiates variable $foo as array since it has not been instantiated.  Then assigns &#8216;bar&#8217; to element $foo[0].<br />
$foo=&#8217;bar&#8217; implicitly re-declares $foo as a string and assigns &#8216;bar&#8217; to it.</p>
<p><strong>Example that does not generate error:</strong><br />
$foo=&#8217;bar&#8217;;<br />
$foo=array();<br />
$foo[0]=&#8217;bar&#8217;;</p>
<p><em>Explanation</em><br />
$foo=&#8217;bar&#8217; implicitly declares $foo as a string variable then assigns &#8216;bar&#8217; as the value.<br />
$foo=array() explicitly re-declares $foo as an array.<br />
$foo[0]=&#8217;bar&#8217; can now be executed as $foo is declared as an array.</p>
<p>Let me know if this helped you or if I am not clear on anything.  Thanks.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/&amp;title=Fatal+error%3A+Cannot+use+string+offset+as+an+array+in+..." rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/&amp;title=Fatal+error%3A+Cannot+use+string+offset+as+an+array+in+..." rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/&amp;t=Fatal+error%3A+Cannot+use+string+offset+as+an+array+in+..." rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/&amp;title=Fatal+error%3A+Cannot+use+string+offset+as+an+array+in+...&amp;summary=PHP5%20Error%20message%20that%20is%20caused%20by%20attempting%20to%20assign%20a%20value%20to%20an%20array%20element%20of%20a%20variable%20that%20is%20declared%20as%20a%20string.%0D%0A%0D%0AExample%20that%20generates%20error%3A%0D%0A%24foo%3D%27bar%27%3B%0D%0A%24foo%5B0%5D%3D%27bar%27%3B%0D%0AGet%20error%20message%20Fatal%20error%3A%20Cannot%20use%20string%20offset%20as%20an%20array%20in%20...%0D%0A%0D%0AExplanation%0D%0A%24foo%20was%20declare&amp;source=Tech Blog" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Fatal+error%3A+Cannot+use+string+offset+as+an+array+in+...+-+http://b2l.me/ab2avb&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/feed/</wfw:commentRss>
		<slash:comments>54</slash:comments>
		</item>
	</channel>
</rss>
