<?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>Tue, 06 Dec 2011 06:39:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Codeigniter header already sent error using json header</title>
		<link>http://informationideas.com/news/2011/12/05/codeigniter-header-already-sent-error-using-json-header/</link>
		<comments>http://informationideas.com/news/2011/12/05/codeigniter-header-already-sent-error-using-json-header/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 06:39:43 +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/?p=209</guid>
		<description><![CDATA[Getting this error when moving from development server to staging server and getting this error. Severity: Warning --&#62; Cannot modify header information - headers already sent The error shows up if you are doing all of the following. 1. Change header using $this-&#62;output-&#62;set_content_type('application/json'); 2. Outputting using echo (which is not recommended by Codeigniter). 3. In [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>Getting this error when moving from development server to staging server and getting this error.</p>
<p>Severity: Warning --&gt; Cannot modify header information - headers already sent</p>
<p>The error shows up if you are doing all of the following.</p>
<p>1. Change header using</p>
<blockquote><p>$this-&gt;output-&gt;set_content_type('application/json');</p></blockquote>
<p>2. Outputting using echo (which is not recommended by Codeigniter).</p>
<p>3. In php.ini, have output_buffering set very small, like 0.</p>
<p><strong>Solution</strong></p>
<p>There are two solutions to this issue.</p>
<p>1. Increase the output_buffering enough so to buffer your echo. (this is a hack)</p>
<p>2. Recommended solution is to replace echo with CIs built in $this-&gt;output-&gt;set_output('content') method.</p>
<div class="shr-publisher-209"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2011/12/05/codeigniter-header-already-sent-error-using-json-header/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Codeigniter running into some major growth issues</title>
		<link>http://informationideas.com/news/2011/11/01/codeigniter-running-into-some-major-growth-issues/</link>
		<comments>http://informationideas.com/news/2011/11/01/codeigniter-running-into-some-major-growth-issues/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 00:04:23 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[our development]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://informationideas.com/news/?p=191</guid>
		<description><![CDATA[I have been using Codeigniter for a while on many projects and it had been very useful as it is non-intrusive. Its very small footprint also allows for the extremely good performance on page loads. However, these projects were simply using just the CI core and not implementing any plugins. Some base classes have been [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>I have been using <a title="Codeigniter" href="http://codeigniter.com">Codeigniter</a> for a while on many projects and it had been very useful as it is non-intrusive. Its very small footprint also allows for the extremely good performance on page loads. However, these projects were simply using just the CI core and not implementing any plugins. Some base classes have been extended, but purely specifically for the individual project so not causing any conflict with other code.</p>
<p>Recently, I started building a startup project using CI and would like to employ more plugins do speed up development. Pleasantly surprised, I found that CI had implemented <a title="Sparks" href="http://getsparks.org">Sparks</a> for searching and installing plugins to CI. Great right! So I implemented an ORM called DataMapper and it was brilliant.</p>
<p>Here comes the reality check. After upgrading from CI 2.0.2 to 2.0.3, everything broke. Why? Because CI changed a lot of methods within its core classes from public to protected. That of course is not actually a bad thing as it was in fact incorrectly implemented before allowing a developer to mess with core functionality too much. However, through researching into these issues, I came to a huge realization that I missed about CI before. CI only allows plugins and developers to modify core classes by extending them into MY_core_class.php. If multiple plugins need to extended the same class, even if they need to overload different methods, it requires some code merging by the developer. If the plugins need to overload the same method in the same core class, that becomes a huge undertaking for the developer to understand what each plugin is trying to do and write merged code that works for both in the same overloaded method.</p>
<p>After that realization, I have determined that CI is fine for applications that are going to use mainly the core classes. If you intend to implement plugins, be very careful understanding what core classes each one will extend. Choose wisely. If those requirements cannot be met, look for another framework.</p>
<div class="shr-publisher-191"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2011/11/01/codeigniter-running-into-some-major-growth-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running stored procedures on MSSQL via any language on Linux</title>
		<link>http://informationideas.com/news/2011/03/11/running-stored-procedures-on-mssql-via-any-language-on-linux/</link>
		<comments>http://informationideas.com/news/2011/03/11/running-stored-procedures-on-mssql-via-any-language-on-linux/#comments</comments>
		<pubDate>Fri, 11 Mar 2011 23:48:14 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[MSSql]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://informationideas.com/news/?p=170</guid>
		<description><![CDATA[If you need to run store procedures on Microsoft SQL Server on perl, php, ruby, etc., you need to configure /etc/freetds/freetds.conf with the server connection information. Specifically, specify the tds version to be 8.0. Something like the following. /etc/freetds/freetds.conf [Server80] host = domain.com port = 1433 tds version = 8.0 Connection to the server via [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>If you need to run store procedures on Microsoft SQL Server on perl, php, ruby, etc., you need to configure /etc/freetds/freetds.conf with the server connection information. Specifically, specify the tds version to be 8.0. Something like the following.</p>
<p>/etc/freetds/freetds.conf<br />
<code><br />
[Server80]<br />
        host = domain.com<br />
        port = 1433<br />
        tds version = 8.0<br />
</code></p>
<p>Connection to the server via php would look like this.<br />
<code><br />
$link = mssql_connect("Server80", "user", "pass");<br />
</code></p>
<div class="shr-publisher-170"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2011/03/11/running-stored-procedures-on-mssql-via-any-language-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scaling down from MS to open source</title>
		<link>http://informationideas.com/news/2011/03/03/scaling-down-from-ms-to-open-source/</link>
		<comments>http://informationideas.com/news/2011/03/03/scaling-down-from-ms-to-open-source/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 00:37:31 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[MSSql]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[our development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[VM]]></category>

		<guid isPermaLink="false">http://informationideas.com/news/?p=167</guid>
		<description><![CDATA[We just moved a service that was running on the Microsoft stack (Windows Server 2008, .NET, MSSql Server, IIS) to an open source stack (Ubuntu Server, php, Codeigniter framework, apache2, postgres). We now run the service on a cloud server with dual cpu and 256MB ram (Yes, that's megabytes). The old server ran on dual [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>We just moved a service that was running on the Microsoft stack (Windows Server 2008, .NET, MSSql Server, IIS) to an open source stack (Ubuntu Server, php, Codeigniter framework, apache2, postgres). </p>
<p>We now run the service on a cloud server with dual cpu and 256MB ram (Yes, that's megabytes).</p>
<p>The old server ran on dual core with 2GB of ram.</p>
<div class="shr-publisher-167"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2011/03/03/scaling-down-from-ms-to-open-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><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-publisher-109"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></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[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><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-publisher-28"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></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='bar'; $foo[0]='bar'; Get error message Fatal error: Cannot use string offset as an array in ... Explanation $foo was declared as a string in $foo='bar'. $foo[0] [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><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='bar';<br />
$foo[0]='bar';<br />
Get error message Fatal error: Cannot use string offset as an array in ...</p>
<p><em>Explanation</em><br />
$foo was declared as a string in $foo='bar'.<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]='bar';<br />
$foo='bar';<br />
Does NOT generate error.</p>
<p><em>Explanation</em><br />
$foo[0]='bar' instantiates variable $foo as array since it has not been instantiated.  Then assigns 'bar' to element $foo[0].<br />
$foo='bar' implicitly re-declares $foo as a string and assigns 'bar' to it.</p>
<p><strong>Example that does not generate error:</strong><br />
$foo='bar';<br />
$foo=array();<br />
$foo[0]='bar';</p>
<p><em>Explanation</em><br />
$foo='bar' implicitly declares $foo as a string variable then assigns 'bar' as the value.<br />
$foo=array() explicitly re-declares $foo as an array.<br />
$foo[0]='bar' 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-publisher-18"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></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>63</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.340 seconds -->

