<?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>PHPedia</title>
	<atom:link href="http://php.bubble.ro/feed/" rel="self" type="application/rss+xml" />
	<link>http://php.bubble.ro</link>
	<description>The solution for all your PHP problems ... almost.</description>
	<lastBuildDate>Thu, 18 Feb 2010 16:03:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to call a custom method from a class</title>
		<link>http://php.bubble.ro/php-tips/how-to-call-a-custom-method-from-a-class/</link>
		<comments>http://php.bubble.ro/php-tips/how-to-call-a-custom-method-from-a-class/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 16:00:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP tips]]></category>
		<category><![CDATA[call_user_func]]></category>
		<category><![CDATA[call_user_func_array]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[static]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://php.bubble.ro/?p=34</guid>
		<description><![CDATA[There are some cases when you don&#8217;t know the name of a function you need to call, or that name can depend from various cases. This is why you need to call a static method by using a custom parameter. This is how you do it:
class Class1
{
 public static function a($x)
{
 echo 'in function a: [...]]]></description>
			<content:encoded><![CDATA[<p>There are some cases when you don&#8217;t know the name of a function you need to call, or that name can depend from various cases. This is why you need to call a static method by using a custom parameter. This is how you do it:</p>
<pre><code>class Class1
{
 public static function a($x)
{
 echo 'in function a: ' . $x;
}
}

$functionName = 'a';

// won't work
$str = 'Class1::' . $functionName;
$$str('4a');

// this is how you do it
call_user_func(array('Class1', $functionName), '4b'); </code></pre>
<p>That code should output: <strong>in function a: 4b</strong></p>
<p>Please also check <strong>call_user_func_array</strong> if you need to send the parameters as an array.</p>
]]></content:encoded>
			<wfw:commentRss>http://php.bubble.ro/php-tips/how-to-call-a-custom-method-from-a-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert numbers to words</title>
		<link>http://php.bubble.ro/php-scripts/convert-numbers-to-words/</link>
		<comments>http://php.bubble.ro/php-scripts/convert-numbers-to-words/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 17:33:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Scripts]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[numbers]]></category>
		<category><![CDATA[romanian]]></category>
		<category><![CDATA[spell]]></category>
		<category><![CDATA[words]]></category>

		<guid isPermaLink="false">http://php.bubble.ro/?p=26</guid>
		<description><![CDATA[Numbers are great, sure, but sometimes you need to spell them out &#8230; and if you think the possibility for that to happen is slim, invoices and checks for example need to have the ammount in both numbers and letters (in most countries).
That&#8217;s why a script to convert numbers to words (to spell numbers) can [...]]]></description>
			<content:encoded><![CDATA[<p>Numbers are great, sure, but sometimes you need to spell them out &#8230; and if you think the possibility for that to happen is slim, invoices and checks for example need to have the ammount in both numbers and letters (in most countries).</p>
<p>That&#8217;s why a script to convert numbers to words (to spell numbers) can come in handy.</p>
<pre><code>
function number_to_words ($x)
{
     global $nwords;
     if(!is_numeric($x))
     {
         $w = '#';
     }else if(fmod($x, 1) != 0)
     {
         $w = '#';
     }else{
         if($x < 0)
         {
             $w = 'minus ';
             $x = -$x;
         }else{
             $w = '';
         }
         if($x < 21)
         {
             $w .= $nwords[$x];
         }else if($x < 100)
         {
             $w .= $nwords[10 * floor($x/10)];
             $r = fmod($x, 10);
             if($r > 0)
             {
                 $w .= ' '. $nwords[$r];
             }
         } else if($x < 1000)
         {

             	$w .= $nwords[floor($x/100)] .' hundred';
             $r = fmod($x, 100);
             if($r > 0)
             {
                 $w .= ' '. number_to_words($r);
             }
         } else if($x < 1000000)
         {
         	$w .= number_to_words(floor($x/1000)) .' thousand';
             $r = fmod($x, 1000);
             if($r > 0)
             {
                 $w .= ' ';
                 if($r < 100)
                 {
                     $w .= ' ';
                 }
                 $w .= number_to_words($r);
             }
         } else {
             $w .= number_to_words(floor($x/1000000)) .' million';
             $r = fmod($x, 1000000);
             if($r > 0)
             {
                 $w .= ' ';
                 if($r < 100)
                 {
                     $word .= ' ';
                 }
                 $w .= number_to_words($r);
             }
         }
     }
     return $w;
}
</code></pre>
<p><strong>Download:</strong> <a href='http://php.bubble.ro/wp-content/uploads/2008/08/numbers-words.zip'>numbers-words.zip</a> (1 KB)</p>
<p><strong><a href="http://php.bubble.ro/scripts/numbers-words.php">Demo</a></strong></p>
<p>The zip file contains the source code to convert numbers to words in both <em>English</em> and <em>Romanian</em> (you never knew when you need 'em).</p>
<p>So ... enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://php.bubble.ro/php-scripts/convert-numbers-to-words/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Top 5 PHP replacements for Apache default directory listing</title>
		<link>http://php.bubble.ro/php-scripts/top-5-php-replacements-for-apache-default-directory-listing/</link>
		<comments>http://php.bubble.ro/php-scripts/top-5-php-replacements-for-apache-default-directory-listing/#comments</comments>
		<pubDate>Sun, 20 Jul 2008 14:57:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Scripts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[listing]]></category>

		<guid isPermaLink="false">http://php.bubble.ro/?p=11</guid>
		<description><![CDATA[You all know the default Apache directory listing .. and I bet most of you hate it. It does the job, sure, but it&#8217;s not exactly the most useful (or the best looking).

This is why you might want to use a more professional script if you want to show some files/directories.
1. phpFe &#8211; PHP File [...]]]></description>
			<content:encoded><![CDATA[<p>You all know the default Apache directory listing .. and I bet most of you hate it. It does the job, sure, but it&#8217;s not exactly the most useful (or the best looking).</p>
<p style="text-align: center;"><img class="size-full wp-image-12 aligncenter" title="Apache listing print" src="http://php.bubble.ro/wp-content/uploads/2008/07/apache_listing_print.gif" alt="" width="438" height="132" /></p>
<p style="text-align: left;">This is why you might want to use a more professional script if you want to show some files/directories.</p>
<h3 style="text-align: left;">1. phpFe &#8211; PHP File explorer</h3>
<p style="text-align: center;"><img class="size-full wp-image-13 aligncenter" title="phpFe print" src="http://php.bubble.ro/wp-content/uploads/2008/07/phpfe_print.gif" alt="" width="438" height="138" /></p>
<p style="text-align: left;">It might not be the best looking, but it sure does its job .. and quite well I might add. It also has an admin module with basic functions. This is pretty much the only script that also takes SEO into consideration.</p>
<p style="text-align: left;"><strong>Website:</strong> <a href="http://phpfe.vigge.net">http://phpfe.vigge.net</a></p>
<p style="text-align: left;"><strong>Download: </strong><a href="http://phpfe.vigge.net/#download">http://phpfe.vigge.net/#download</a></p>
<p style="text-align: left;"><strong>Demo:</strong> <a href="http://phpfe.vigge.net/phpFe/">http://phpfe.vigge.net/phpFe/</a></p>
<p style="text-align: left;"><span id="more-11"></span></p>
<h3 style="text-align: left;">2. fileNice</h3>
<p style="text-align: left;"><img class="aligncenter size-full wp-image-14" title="fileNice print" src="http://php.bubble.ro/wp-content/uploads/2008/07/filenice_print.gif" alt="" width="438" height="147" /></p>
<p style="text-align: left;">It has basic functions, a bit of AJAX to make it very fast, supports different skins and overall pretty nice to use as well.</p>
<p style="text-align: left;"><strong>Website:</strong> <a href="http://filenice.com/">http://filenice.com/</a></p>
<p style="text-align: left;"><strong>Download:</strong> <a href="http://filenice.com/demo/fileNice.zip">http://filenice.com/demo/fileNice.zip</a></p>
<p style="text-align: left;"><strong>Demo:</strong> <a href="http://filenice.com/demo/">http://filenice.com/demo/</a></p>
<h3 style="text-align: left;">3. AutoIndex</h3>
<p style="text-align: left;"><img class="aligncenter size-full wp-image-15" title="autoindex print" src="http://php.bubble.ro/wp-content/uploads/2008/07/autoindex_print.gif" alt="" width="438" height="147" /></p>
<p style="text-align: left;">This little script is a very good choice if you want to make a download page since it supports password protect, anti-leech features, bandwidth limiting, logging and other cool stuff &#8230; but of course this does comes with a price &#8211; the server footprint is much larger.</p>
<p style="text-align: left;"><strong>Website:</strong> <a href="http://autoindex.sourceforge.net/">http://autoindex.sourceforge.net/</a></p>
<p style="text-align: left;"><strong>Download: </strong><a href="http://autoindex.sourceforge.net/">http://autoindex.sourceforge.net/</a></p>
<p style="text-align: left;"><strong>Demo:</strong> <a href="http://autoindex.sourceforge.net/demo/">http://autoindex.sourceforge.net/demo/</a></p>
<h3 style="text-align: left;">4. QuiXplorer</h3>
<h3 style="text-align: left;"><img class="aligncenter size-full wp-image-16" title="quixplorer print" src="http://php.bubble.ro/wp-content/uploads/2008/07/quixplorer_print.gif" alt="" width="438" height="168" /></h3>
<p style="text-align: left;">This script is designed for admin use only since it has edit/delete options but no password protection so be careful where you use it.</p>
<p style="text-align: left;"><strong>Website:</strong> <a href="http://sourceforge.net/projects/quixplorer/">http://sourceforge.net/projects/quixplorer/</a></p>
<p style="text-align: left;"><strong>Download: </strong><a href="http://sourceforge.net/project/showfiles.php?group_id=72517">http://sourceforge.net/project/showfiles.php?group_id=72517</a></p>
<h3 style="text-align: left;">5. GaMerZ File Explorer</h3>
<p><img class="aligncenter size-full wp-image-17" title="gamerz print" src="http://php.bubble.ro/wp-content/uploads/2008/07/gamerz_print.gif" alt="" width="438" height="147" /></p>
<p>Small, simple, easy to use &#8230; but of course don&#8217;t expect it to have many features, just the right tool when you&#8217;re in a hurry.</p>
<p><strong>Download:</strong> <a href="http://lesterchan.net/site/downloads/">http://lesterchan.net/site/downloads/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://php.bubble.ro/php-scripts/top-5-php-replacements-for-apache-default-directory-listing/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>PHP Warning:  Cannot modify header information &#8211; headers already sent</title>
		<link>http://php.bubble.ro/php-warnings/php-warning-cannot-modify-header-information-headers-already-sent/</link>
		<comments>http://php.bubble.ro/php-warnings/php-warning-cannot-modify-header-information-headers-already-sent/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 16:46:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP warnings]]></category>
		<category><![CDATA[echo]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[output]]></category>
		<category><![CDATA[print]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[warning]]></category>

		<guid isPermaLink="false">http://php.bubble.ro/?p=10</guid>
		<description><![CDATA[Message:
PHP Warning: Cannot modify header information - headers already sent by (output started at /home/w.php:189) in /home/start.php on line 64
Error type: warning
Symptoms:
You try to send a header value from PHP (for example a redirect) and it fails with this warning.
Sample Code:
&#60;?php
echo &#8216;Redirecting: &#8216;;
header(&#8216;Location: /&#8217;);
exit;
?&#62;
Cause:
You must send headers before you output anything on that page. This [...]]]></description>
			<content:encoded><![CDATA[<h3>Message:</h3>
<blockquote><p><strong><code>PHP Warning: Cannot modify header information - headers already sent by (output started at /home/w.php:189) in /home/start.php on line 64</code></strong></p></blockquote>
<p><strong>Error type: </strong><span style="color: #99cc00;">warning</span></p>
<h3>Symptoms:</h3>
<p>You try to send a header value from PHP (for example a redirect) and it fails with this warning.</p>
<h3>Sample Code:</h3>
<blockquote><p>&lt;?php<br />
<strong>echo </strong>&#8216;Redirecting: &#8216;;<br />
<strong>header</strong>(&#8216;Location: /&#8217;);<br />
exit;<br />
?&gt;</p></blockquote>
<h3>Cause:</h3>
<p>You must send headers <strong>before</strong> you output <em>anything</em> on that page. This means you can&#8217;t use <strong>echo</strong>, <strong>printf</strong> or any other output function before <strong>all headers</strong> are sent.</p>
<h3>Fix:</h3>
<p>Check where you used the <strong>header()</strong> function and remove any output instructions before that.</p>
<p>Please note that blank spaces <strong>before</strong> &lt;?php are also considered part of the output and will give you lots of trouble. This also applies to files you include (for example configuration files), so make sure you don&#8217;t leave extra spaces/empty lines).</p>
<p>Another method to get rid of this problem is to use <a href="http://www.php.net/outcontrol">output buffering</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://php.bubble.ro/php-warnings/php-warning-cannot-modify-header-information-headers-already-sent/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP Warning: fsockopen(): unable to connect (Connection timed out)</title>
		<link>http://php.bubble.ro/php-warnings/php-warning-fsockopen-unable-to-connect-connection-timed-out/</link>
		<comments>http://php.bubble.ro/php-warnings/php-warning-fsockopen-unable-to-connect-connection-timed-out/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 16:35:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP warnings]]></category>
		<category><![CDATA[connect]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[fsockopen]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[sockets]]></category>
		<category><![CDATA[timeout]]></category>
		<category><![CDATA[warning]]></category>

		<guid isPermaLink="false">http://php.bubble.ro/?p=9</guid>
		<description><![CDATA[Message:
PHP Warning:fsockopen(): unable to connect to rpc.technorati.com:80 (Connection timed out) in /home/public_html/pinger.php on line 66
Error type: warning
Symptoms:
You try to open a socket to a remote location, but your connection is timed out (you don&#8217;t receive any response).
Sample Code:
&#60;?php
$fs = fsockopen($ping_host, $ping_port, $errno, $errstr);
if (is_resource($fs))
{
stream_set_write_buffer($fs,0);
fwrite($fs, $http_request);
while (!feof($fs))
{
$response .= fgets($fs, 2048);
}
fclose($fs);
}
?&#62;
Cause:
The host you are trying to connect [...]]]></description>
			<content:encoded><![CDATA[<h3>Message:</h3>
<blockquote><p><strong><code>PHP Warning:fsockopen(): unable to connect to rpc.technorati.com:80 (Connection timed out) in /home/public_html/pinger.php on line 66</code></strong></p></blockquote>
<p><strong>Error type: </strong><span style="color: #99cc00;">warning</span></p>
<h3>Symptoms:</h3>
<p>You try to open a socket to a remote location, but your connection is timed out (you don&#8217;t receive any response).</p>
<h3>Sample Code:</h3>
<blockquote><p>&lt;?php<br />
$fs = <strong>fsockopen</strong>($ping_host, $ping_port, $errno, $errstr);</p>
<p>if (is_resource($fs))<br />
{<br />
<strong>stream_set_write_buffer</strong>($fs,0);<br />
<strong>fwrite</strong>($fs, $http_request);<br />
while (!<strong>feof</strong>($fs))<br />
{<br />
$response .= <strong>fgets</strong>($fs, 2048);<br />
}<br />
<strong>fclose</strong>($fs);<br />
}<br />
?&gt;</p></blockquote>
<h3>Cause:</h3>
<p>The host you are trying to connect to is either down or takes too long to respond (or from other reasons, you just can&#8217;t get a response).</p>
<h3>Fix:</h3>
<p>Get a beer, watch a movie, play a game &#8230; really, there&#8217;s not much you can do usually. Wait a few minutes and try again. If you still get the same response check if there is any problem with your server (for example DNS problems), eventually contact your hosting provider.</p>
]]></content:encoded>
			<wfw:commentRss>http://php.bubble.ro/php-warnings/php-warning-fsockopen-unable-to-connect-connection-timed-out/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP Warning:  Variable passed to each() is not an array or object</title>
		<link>http://php.bubble.ro/php-warnings/php-warning-variable-passed-to-each-is-not-an-array-or-object/</link>
		<comments>http://php.bubble.ro/php-warnings/php-warning-variable-passed-to-each-is-not-an-array-or-object/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 12:39:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP warnings]]></category>
		<category><![CDATA[each]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[warning]]></category>
		<category><![CDATA[while]]></category>

		<guid isPermaLink="false">http://php.bubble.ro/?p=6</guid>
		<description><![CDATA[Message:
PHP Warning: Variable passed to each() is not an array or object in /home/functions.php on line 23
Error type: warning
Symptoms:
You try to use each, but instead of going through the loop, you just receive a warning.
Sample Code:
&#60;?php
while (list($key, $val) = each ($myvar))
{
echo $key.&#8217; &#8216;;
}
?&#62;
Cause:
You try to use the each() function with a null, integer or string [...]]]></description>
			<content:encoded><![CDATA[<h3>Message:</h3>
<blockquote><p><strong><code>PHP Warning</code></strong><code><strong>:</strong> Variable passed to each() is not an array or object in /home/functions.php on line 23</code></p></blockquote>
<p><strong>Error type: </strong><span style="color: #99cc00;">warning</span></p>
<h3>Symptoms:</h3>
<p>You try to use each, but instead of going through the loop, you just receive a warning.</p>
<h3>Sample Code:</h3>
<blockquote><p>&lt;?php<br />
<strong>while </strong>(<strong>list</strong>($key, $val) = <strong>each </strong>($myvar))<br />
{<br />
echo $key.&#8217; &#8216;;<br />
}<br />
?&gt;</p></blockquote>
<h3>Cause:</h3>
<p>You try to use the <strong>each()</strong> function with a null, integer or string variable (or generally <em>not </em>an array or object). This might be caused by an uninitialized variable you try to use with each();</p>
<h3>Fix:</h3>
<p>Make sure the variable you try to pass <em>exists </em>and is <em>not null</em> first. You should also make sure you didn&#8217;t misspell the variable name (if you try to use a variable that has not been initialized you get the same warning).</p>
<p>You should try to use function <strong>is_array</strong>($array) to make sure the variable passed is indeed an array.</p>
]]></content:encoded>
			<wfw:commentRss>http://php.bubble.ro/php-warnings/php-warning-variable-passed-to-each-is-not-an-array-or-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Warning: reset(): Passed variable is not an array or object</title>
		<link>http://php.bubble.ro/php-warnings/php-warning-reset-passed-variable-is-not-an-array-or-object/</link>
		<comments>http://php.bubble.ro/php-warnings/php-warning-reset-passed-variable-is-not-an-array-or-object/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 12:33:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP warnings]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[integer]]></category>
		<category><![CDATA[null]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[reset]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[warning]]></category>

		<guid isPermaLink="false">http://php.bubble.ro/?p=5</guid>
		<description><![CDATA[Message:
PHP Warning: reset(): Passed variable is not an array or object in /home/cron.php on line 43
Error type: warning
Symptoms:
You get a reset() warning although the code seems to work fine.
Sample Code:
&#60;?php
$string = &#8220;This is a string.&#8221;;
reset($string);
?&#62;
Cause:
You try to use the reset() function with a null, an integer or a string (these are most common), when you [...]]]></description>
			<content:encoded><![CDATA[<h3>Message:</h3>
<blockquote><p><strong><code>PHP Warning</code></strong><code><strong>:</strong> reset(): Passed variable is not an array or object in /home/cron.php on line 43</code></p></blockquote>
<p><strong>Error type: </strong><span style="color: #99cc00;">warning</span><span style="color: #99cc00;"></span></p>
<h3>Symptoms:</h3>
<p>You get a <strong>reset()</strong> warning although the code seems to work fine.</p>
<h3>Sample Code:</h3>
<blockquote><p>&lt;?php<br />
$string = &#8220;This is a string.&#8221;;<br />
<strong>reset</strong>($string);<br />
?&gt;</p></blockquote>
<h3>Cause:</h3>
<p>You try to use the <strong>reset()</strong> function with a null, an integer or a string (these are most common), when you should only use it with an array or object. Usually this is caused by accidental type casting or misspelling of variable names.</p>
<h3>Fix:</h3>
<p>Make sure the variable you try to reset <em>exists </em>and is <em>not null</em> first. You should also make sure you didn&#8217;t misspell the variable name (if you try to reset a variable that has not been initialized you get the same warning).</p>
]]></content:encoded>
			<wfw:commentRss>http://php.bubble.ro/php-warnings/php-warning-reset-passed-variable-is-not-an-array-or-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fatal error: Allowed memory size of * bytes exhausted</title>
		<link>http://php.bubble.ro/php-errors/fatal-error-allowed-memory-size-of-bytes-exhausted/</link>
		<comments>http://php.bubble.ro/php-errors/fatal-error-allowed-memory-size-of-bytes-exhausted/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 12:00:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP errors]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[critical]]></category>
		<category><![CDATA[fatal]]></category>
		<category><![CDATA[gd]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[limit]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[memory_limit]]></category>
		<category><![CDATA[php.ini]]></category>

		<guid isPermaLink="false">http://php.bubble.ro/?p=4</guid>
		<description><![CDATA[Message:
Fatal error: Allowed memory size of 867300 bytes exhausted (tried to allocate 1280200 bytes) in /home/public_html/index.php on line 135
Error type: fatal error
Symptoms:
Page parsing fails and you receive the message in the output. Usually associated with GD (image manipulation) functions or when you deal with large arrays.
Cause:
You do not have enough memory (RAM) available to run [...]]]></description>
			<content:encoded><![CDATA[<h3>Message:</h3>
<blockquote><p><code><strong>Fatal error:</strong> Allowed memory size of 867300 bytes exhausted (tried to allocate 1280200 bytes) in /home/public_html/index.php on line 135</code></p></blockquote>
<p><strong>Error type: </strong><span style="color: #ff6600;">fatal error</span></p>
<h3>Symptoms:</h3>
<p>Page parsing fails and you receive the message in the output. Usually associated with GD (image manipulation) functions or when you deal with large arrays.</p>
<h3>Cause:</h3>
<p>You do not have enough memory (RAM) available to run that script. This doesn&#8217;t happen too often, but you can receive this error when working with large images or with other memory consuming functions (or just large arrays).</p>
<h3>Fix:</h3>
<p>Set the memory limit to a larger value using:</p>
<blockquote><p><code>ini_set("memory_limit","32M");</code></p></blockquote>
<p>In that example it is set to 32MB for that particular script. Be careful how much you allow PHP to use because it <strong>can </strong>slow your entire server down (and it can even cause it to <em>crash</em>!)</p>
<p>You can also change the global value for memory limit from <strong>php.ini</strong> (if you have access to it):</p>
<blockquote><p><code>memory_limit = 32M</code></p></blockquote>
<p>Another method is through <strong>.htaccess</strong> (again, if you have access to that). Please note that this changes the memory limit for all scripts unless you manually specify otherwise.</p>
<blockquote><p><code>php_value memory_limit 32M</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://php.bubble.ro/php-errors/fatal-error-allowed-memory-size-of-bytes-exhausted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fatal error: Call to undefined function myfunction()</title>
		<link>http://php.bubble.ro/php-errors/fatal-error-call-to-undefined-function-myfunction/</link>
		<comments>http://php.bubble.ro/php-errors/fatal-error-call-to-undefined-function-myfunction/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 11:45:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP errors]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fatal]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[include]]></category>

		<guid isPermaLink="false">http://php.bubble.ro/?p=3</guid>
		<description><![CDATA[Message:
Fatal error: Call to undefined function myfunction() in /www/myproject/index.php on line 1345
Error type: fatal error
Symptoms:
Page parsing fails and you receive that message in the output. If display_errors is set to Off in php.ini you will need to check error logs for the message.
Sample Code:
&#60;?php
$id = $_GET['id'];
myfunction($id);
?&#62;
Cause:
You are attempting to call a function which does not [...]]]></description>
			<content:encoded><![CDATA[<h3>Message:</h3>
<blockquote><p><code><strong>Fatal error:</strong> Call to undefined function myfunction() in /www/myproject/index.php on line 1345</code></p></blockquote>
<p><strong>Error type: </strong><span style="color: #ff6600;">fatal error</span></p>
<h3>Symptoms:</h3>
<p>Page parsing fails and you receive that message in the output. If <strong>display_errors</strong> is set to Off in <strong>php.ini</strong> you will need to check error logs for the message.</p>
<h3>Sample Code:</h3>
<blockquote><p>&lt;?php<br />
$id = $_GET['id'];<br />
<code>myfunction</code>($id);<br />
?&gt;</p></blockquote>
<h3>Cause:</h3>
<p>You are attempting to call a function which does not exist. If you are trying to call a function that you have defined yourself, then make sure that the script has access to it, or if it is a standard PHP function, check  your spelling  and make sure you have the necessary extensions.</p>
<h3>Fix:</h3>
<p>Check the file with error indicated in the error output and make sure you didn&#8217;t misspell the function name.</p>
<p>If that function is defined in a different file make sure that you include (using include/require) <em>before</em> you call it.</p>
]]></content:encoded>
			<wfw:commentRss>http://php.bubble.ro/php-errors/fatal-error-call-to-undefined-function-myfunction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome to PHPedia</title>
		<link>http://php.bubble.ro/uncategorized/welcome-phpedia/</link>
		<comments>http://php.bubble.ro/uncategorized/welcome-phpedia/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 11:00:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpedia]]></category>
		<category><![CDATA[welcome]]></category>

		<guid isPermaLink="false">http://php.bubble.ro/?p=1</guid>
		<description><![CDATA[Hello there!
If you&#8217;re wondering what this website is about, here&#8217;s your answer: a website where you can find the solution for any PHP problem you might encounter: PHP syntax errors, PHP unexpected results or other stuff that might hold you back from developing that awesome script you were working on.
Want to give me a hand?
If [...]]]></description>
			<content:encoded><![CDATA[<h2>Hello there!</h2>
<p>If you&#8217;re wondering what this website is about, here&#8217;s your answer: a website where you can find the solution for any PHP problem you might encounter: PHP syntax errors, PHP unexpected results or other stuff that might hold you back from developing that awesome script you were working on.</p>
<h3>Want to give me a hand?</h3>
<p>If you wish to contribute to this website, just <a href="http://php.bubble.ro/wp-login.php?action=register">register yourself a new account</a> and write something to help humanity (ok, maybe just a few people, but still, that&#8217;s something!)</p>
]]></content:encoded>
			<wfw:commentRss>http://php.bubble.ro/uncategorized/welcome-phpedia/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
