<?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>KADIMI [Web Dev, SEO, Linux...] &#187; PHP</title>
	<atom:link href="http://www.kadimi.com/en/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.kadimi.com/en</link>
	<description>Blog &#38; Free Tech Support</description>
	<lastBuildDate>Thu, 02 Sep 2010 21:22:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WordPress upgrade error (Allowed memory size of 33554432 bytes exhausted)</title>
		<link>http://www.kadimi.com/en/upgrade-error-387</link>
		<comments>http://www.kadimi.com/en/upgrade-error-387#comments</comments>
		<pubDate>Sat, 09 Jan 2010 09:15:28 +0000</pubDate>
		<dc:creator>Nabil</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.kadimi.com/en/?p=387</guid>
		<description><![CDATA[The problem Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2516315 bytes) in /home/mydomain/public_html/blog/wp-includes/http.php on line 1370 This can happen at any line and with any file, not only http.php at line 1370! Explanation Don&#8217;t worry if you get this error, there is nothing wrong with your server or hosting plan [...]]]></description>
			<content:encoded><![CDATA[<h2>The problem</h2>
<blockquote><p>Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2516315 bytes) in /home/mydomain/public_html/blog/wp-includes/http.php on line 1370</p></blockquote>
<p>This can happen at any line and with any file, not only http.php at line 1370!</p>
<h2>Explanation</h2>
<p>Don&#8217;t worry if you get this error, there is nothing wrong with your server or hosting plan etc. Whenever a new version of WordPress is released, new features are added, thus more calculations, so logically more memory is needed.<br />
In older versions of WordPress (before 2.7&#8230; I think), the memory limit was set to 32M, if you are upgrading WordPress, you will probably get that error, you will have to edit the wp-settings.php file and set (I should say change) the constant WP_MEMORY_LIMIT value to 64M, giving PHP more memory to play with.</p>
<h2>The solution</h2>
<ul>
<li>Open the remote file wp-settings.php file located on the base directory where you installed your WP blog</li>
<li>find this code (probably at line 13)<br />
<blockquote><p><code>define('WP_MEMORY_LIMIT', '32M');</code></p></blockquote>
</li>
<li>Replace with<br />
<blockquote><p><code>define('WP_MEMORY_LIMIT', '64M');</code></p></blockquote>
</li>
<li>Run the upgrade process again</li>
<li>Enjoy your updated WP blog</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kadimi.com/en/upgrade-error-387/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A note on JavaScript arrays creation &amp; initialization</title>
		<link>http://www.kadimi.com/en/arrays-creation-and-initialization-225</link>
		<comments>http://www.kadimi.com/en/arrays-creation-and-initialization-225#comments</comments>
		<pubDate>Wed, 05 Aug 2009 04:19:01 +0000</pubDate>
		<dc:creator>Nabil</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[arrays]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.kadimi.com/en/?p=225</guid>
		<description><![CDATA[I use PHP a lot in my projects and it happens that sometimes I combine PHP with another language and write completely useless code. PHP arrays can be created and initialized with like this: &#60;?php $cities[] = "mecca"; $cities[] = "medina"; ?&#62; I thought that the same would apply to javascript&#8230; Yes, it can work, [...]]]></description>
			<content:encoded><![CDATA[<p>I use PHP a lot in my projects and it happens that sometimes I combine PHP with another language and write completely useless code.</p>
<p>PHP arrays can be created and initialized with like this:</p>
<blockquote>
<pre><code>&lt;?php
  $cities[] = "mecca";
  $cities[] = "medina";
?&gt;
</code></pre>
</blockquote>
<p>I thought that the same would apply to javascript&#8230; Yes, it can work, but only if the array already exists, otherwise you will get an error, Your browser will tell you that it can&#8217;t find that array, pretty simple&#8230; maybe&#8230;</p>
<blockquote>
<pre><code>var cities = []// we create the array first
  cities[0] = "mecca";
  cities[1] = "medina";
</code></pre>
</blockquote>
<p>Note that JavaScript doesn&#8217;t automatically assign table indexes, you have to set them automatically. +1 for PHP (on most other languages)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kadimi.com/en/arrays-creation-and-initialization-225/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install PHP 5.2.6 on CentOs 5.x</title>
		<link>http://www.kadimi.com/en/centos-php-5-2-6-174</link>
		<comments>http://www.kadimi.com/en/centos-php-5-2-6-174#comments</comments>
		<pubDate>Wed, 24 Jun 2009 10:27:22 +0000</pubDate>
		<dc:creator>Nabil</dc:creator>
				<category><![CDATA[CentOs]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.kadimi.com/en/?p=174</guid>
		<description><![CDATA[Oddly enough, PHP 5.2.6 is still not available on default CentOS repositories ([base], [updates], [addons], and [extras]), latest PHP available in those repos is PHP 5.1.6! In order to install PHP 5.2.6 you can add the CentOS testing repository and enable it then install or update PHP. To add the CentOS testing directory, create a [...]]]></description>
			<content:encoded><![CDATA[<p>Oddly enough, <strong>PHP 5.2.6</strong> is still not available on default CentOS repositories ([base], [updates], [addons], and [extras]), latest PHP available in those repos is PHP 5.1.6!</p>
<p>In order to install PHP 5.2.6 you can add the CentOS testing repository and enable it then<span id="more-174"></span> install or update PHP.</p>
<p>To add the CentOS testing directory, create a file /etc/yum.repos.d/centos-test.repo and add this line:</p>
<blockquote><p><code>[c5-testing]<br />
name=CentOS-5 Testing<br />
baseurl=http://dev.centos.org/centos/5/testing/$basearch/<br />
enabled=1<br />
gpgcheck=1<br />
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing<br />
</code></p></blockquote>
<p>Then install or update PHP:</p>
<blockquote><p><code>[root@server ~]# yum install php</code></p></blockquote>
<p>or</p>
<blockquote><p><code>[root@server ~]# yum update php</code></p></blockquote>
<p>Then you can disable the testing repo by editing the file and setting the option &#8220;enabled&#8221; to &#8220;0&#8243;</p>
<blockquote><p><code>[c5-testing]<br />
name=CentOS-5 Testing<br />
baseurl=http://dev.centos.org/centos/5/testing/$basearch/<br />
enabled=0<br />
gpgcheck=1<br />
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing<br />
</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.kadimi.com/en/centos-php-5-2-6-174/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
