<?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>antoniolorusso.com &#187; PHP</title>
	<atom:link href="http://antoniolorusso.com/category/development/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://antoniolorusso.com</link>
	<description>About me and what I do :)</description>
	<lastBuildDate>Mon, 21 Jun 2010 22:17:54 +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>map and grep: from Perl to PHP</title>
		<link>http://antoniolorusso.com/2010/05/17/map-and-grep-from-perl-to-php/</link>
		<comments>http://antoniolorusso.com/2010/05/17/map-and-grep-from-perl-to-php/#comments</comments>
		<pubDate>Mon, 17 May 2010 14:57:29 +0000</pubDate>
		<dc:creator>antonio lorusso</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[array_filter]]></category>
		<category><![CDATA[array_map]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[map]]></category>

		<guid isPermaLink="false">http://antoniolorusso.com/2010/05/17/map-and-grep-from-perl-to-php/</guid>
		<description><![CDATA[Probably many of you already know but here is the correspondent in PHP of the two fundamentals Perl functions:map =&#62; array_mapgrep =&#62; array_filterToo lazy to give you examples .. I think you can work it out yourself.]]></description>
			<content:encoded><![CDATA[<p>Probably many of you already know but here is the correspondent in PHP of the two fundamentals Perl functions:<br /><code>map =&gt; array_map<br />grep =&gt; array_filter</code><br />Too lazy to give you examples .. I think you can work it out yourself.</p>
<p> <img src='http://antoniolorusso.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://antoniolorusso.com/2010/05/17/map-and-grep-from-perl-to-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP-FPM on Ubuntu Lucid Lynx</title>
		<link>http://antoniolorusso.com/2010/05/11/php-fpm-on-ubuntu-lucid-lynx/</link>
		<comments>http://antoniolorusso.com/2010/05/11/php-fpm-on-ubuntu-lucid-lynx/#comments</comments>
		<pubDate>Mon, 10 May 2010 23:47:53 +0000</pubDate>
		<dc:creator>antonio lorusso</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[lucid lynx]]></category>
		<category><![CDATA[php-fpm]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://antoniolorusso.com/2010/05/11/php-fpm-on-ubuntu-lucid-lynx/</guid>
		<description><![CDATA[I have been using the dotdeb repository on karmic for a while, but today, when I installed the new Lucid Lynx, it just became a mess so I decided to keep all the original ubuntu packages (Lucid ships php 5.3.2) and find an alternative repo for php-fpm which I use on my dev machine. Here [...]]]></description>
			<content:encoded><![CDATA[<p>I have been using the dotdeb repository on karmic for a while, but today, when I installed the new Lucid Lynx, it just became a mess so I decided to keep all the original ubuntu packages (Lucid ships php 5.3.2) and find an alternative repo for php-fpm which I use on my dev machine. <br />Here it is:<a href="https://launchpad.net/%7Ebrianmercer/+archive/php/">Brian&#8217;s php5-fpm : Brian Mercer</a></p>
<p>Happy 10.04! <img src='http://antoniolorusso.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://antoniolorusso.com/2010/05/11/php-fpm-on-ubuntu-lucid-lynx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx and $_SERVER[&#039;HTTPS&#039;]</title>
		<link>http://antoniolorusso.com/2010/03/22/nginx-and-_serverhttps/</link>
		<comments>http://antoniolorusso.com/2010/03/22/nginx-and-_serverhttps/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 17:50:06 +0000</pubDate>
		<dc:creator>antonio lorusso</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://antoniolorusso.com/2010/03/22/nginx-and-_serverhttps/</guid>
		<description><![CDATA[When you are using the FastCGI Php version, you would set HTTPS variable if you are serving parts of you website with SSL. To do that, add the following function into the http section of your nginx configuration map $scheme $fastcgi_https { ## Detect when HTTPS is used default off; https on; } and use [...]]]></description>
			<content:encoded><![CDATA[<p>When you are using the FastCGI Php version, you would set HTTPS variable if you are serving parts of you website with SSL.<br />
To do that, add the following function into the http section of your nginx configuration<br />
<code>map $scheme $fastcgi_https { ## Detect when HTTPS is used<br />
default off;<br />
https on;<br />
}<br />
</code><br />
and use the variable into your server section<br />
<code>fastcgi_param  HTTPS $fastcgi_https;</code></p>
<p>Lazy explanation as usual <img src='http://antoniolorusso.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=b551158c-e2e9-8fde-ae41-d8c9797abc56" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://antoniolorusso.com/2010/03/22/nginx-and-_serverhttps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>upstream sent too big header while reading response header from upstream</title>
		<link>http://antoniolorusso.com/2010/03/10/upstream-sent-too-big-header-while-reading-response-header-from-upstream/</link>
		<comments>http://antoniolorusso.com/2010/03/10/upstream-sent-too-big-header-while-reading-response-header-from-upstream/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 17:21:46 +0000</pubDate>
		<dc:creator>antonio lorusso</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[buffer]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[php-fpm]]></category>

		<guid isPermaLink="false">http://antoniolorusso.com/2010/03/10/upstream-sent-too-big-header-while-reading-response-header-from-upstream/</guid>
		<description><![CDATA[if you have this error from nginx with php-fpm and output_buffers = On in your php.ini then try to increment the buffer size in nginx:fastcgi_buffers 8 16k;fastcgi_buffer_size 32k;]]></description>
			<content:encoded><![CDATA[<p>if you have this error from nginx with php-fpm and output_buffers = On in your php.ini then try to increment the buffer size in nginx:<br /><code><br />fastcgi_buffers 8 16k;<br />fastcgi_buffer_size 32k;<br /></code></p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=17e62287-9b5f-808e-aa5e-5f8b6e6450ee" /></div>
]]></content:encoded>
			<wfw:commentRss>http://antoniolorusso.com/2010/03/10/upstream-sent-too-big-header-while-reading-response-header-from-upstream/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Suhosin and memory_limit</title>
		<link>http://antoniolorusso.com/2010/01/18/suhosin-and-memory_limit/</link>
		<comments>http://antoniolorusso.com/2010/01/18/suhosin-and-memory_limit/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 13:00:29 +0000</pubDate>
		<dc:creator>antonio lorusso</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[ini_set]]></category>
		<category><![CDATA[suhosin]]></category>

		<guid isPermaLink="false">http://antoniolorusso.com/2010/01/18/suhosin-and-memory_limit/</guid>
		<description><![CDATA[I had some problem with a script that needed more memory to be executed and was using ini_set(&#8216;memory_limit&#8217;, &#8217;50M&#8217;). For some reasons the memory was not incremented as expected.After googleing around for a solution I just had an intuition: could be suhosin? Indeed, the problem was in the suhosin module that is enable by default [...]]]></description>
			<content:encoded><![CDATA[<p>I had some problem with a script that needed more memory to be executed and was using <b>ini_set(&#8216;memory_limit&#8217;, &#8217;50M&#8217;).</b> For some reasons the memory was not incremented as expected.<br />After googleing around for a solution I just had an intuition: could be <i>suhosin</i>? Indeed, the problem was in the <i>suhosin</i> module that is enable by default on Ubuntu: it does not allow to redefine the memory limit over the limit specified in the php.ini file.<br />To make ini_set work normally under Ubuntu, comment out the <i><u>suhosin</u></i> extension in <i>/etc/php5/apachew/conf.d/suhosin.ini</i></p>
<p> <img src='http://antoniolorusso.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=49530aa3-b720-8bdb-8012-a9ae94d8b5ab" /></div>
]]></content:encoded>
			<wfw:commentRss>http://antoniolorusso.com/2010/01/18/suhosin-and-memory_limit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php 5.3, time and date functions and timezone</title>
		<link>http://antoniolorusso.com/2009/08/23/php-5-3-time-and-date-functions-and-timezone/</link>
		<comments>http://antoniolorusso.com/2009/08/23/php-5-3-time-and-date-functions-and-timezone/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 00:55:52 +0000</pubDate>
		<dc:creator>antonio lorusso</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[5.3]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[timezone]]></category>

		<guid isPermaLink="false">http://antoniolorusso.com/?p=233</guid>
		<description><![CDATA[After installing PHP 5.3, you may get a warning for every function involving date and time like Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still [...]]]></description>
			<content:encoded><![CDATA[<p>After installing PHP 5.3, you may get a warning for every function involving date and time like<br />
<code>Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/London' for [...]</code><br />
To fix this, you can set the timezone in your script using <strong><a href="http://uk.php.net/manual/en/function.date-default-timezone-set.php">date_default_timezone_set(&#8216;Europe/London&#8217;);</a></strong> or set it into the php.ini file with <strong><a href="http://uk.php.net/manual/en/datetime.configuration.php#ini.date.timezone">date.timezone = &#8216;Europe/London&#8217;</a></strong></p>
<p> <img src='http://antoniolorusso.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://antoniolorusso.com/2009/08/23/php-5-3-time-and-date-functions-and-timezone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>in_array() in Perl?</title>
		<link>http://antoniolorusso.com/2008/07/09/in_array-in-perl/</link>
		<comments>http://antoniolorusso.com/2008/07/09/in_array-in-perl/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 09:57:51 +0000</pubDate>
		<dc:creator>antonio lorusso</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[in_array]]></category>

		<guid isPermaLink="false">http://antoniolorusso.com/2008/07/09/in_array-in-perl/</guid>
		<description><![CDATA[I was looking for this useful function I always use in php and found this simple article. Basically, the function that permit you to do that is grep used in this way: my $string = ‘fin_helm’; my @array = qw/full_plate manteau boots two_handed_sword fin_helm/; if(grep $_ eq $string, @array) { print “$string is in the [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking for this useful function I always use in php and found this simple <a href="http://assasiner.wordpress.com/2006/12/03/is-in-array/trackback/">article</a>.<br />
Basically, the function that permit you to do that is <strong>grep </strong>used in this way:<br />
<code>my $string = ‘fin_helm’;<br />
my @array = qw/full_plate manteau boots two_handed_sword fin_helm/;<br />
if(grep $_ eq $string, @array)<br />
{<br />
print “$string is in the array”;<br />
}</code><br />
easy?</p>
]]></content:encoded>
			<wfw:commentRss>http://antoniolorusso.com/2008/07/09/in_array-in-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>it sucks or not?</title>
		<link>http://antoniolorusso.com/2008/06/07/it-sucks-or-not/</link>
		<comments>http://antoniolorusso.com/2008/06/07/it-sucks-or-not/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 11:52:16 +0000</pubDate>
		<dc:creator>antonio lorusso</dc:creator>
				<category><![CDATA[Altro]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[programming languages]]></category>

		<guid isPermaLink="false">http://antoniolorusso.com/2008/06/07/it-sucks-or-not/</guid>
		<description><![CDATA[You can find many post outside the web disguising on how much and why a programming language sucks. In particular, I&#8217;ve found a lot with this argument about PHP. Personally, I don&#8217;t understand why programmers waste their time on writing this useless things. The more, I don&#8217;t understand is why they attack PHP the most [...]]]></description>
			<content:encoded><![CDATA[<p>You can find many post outside the web disguising on <strong>how much and why a programming language sucks</strong>. In particular, I&#8217;ve found a lot with this argument about PHP.</p>
<p>Personally, I don&#8217;t understand why programmers <strong>waste their time</strong> on writing this useless things. The more, I don&#8217;t understand is why they attack PHP the most of the time&#8230; or maybe I know &#8230; it&#8217;s because it&#8217;s the most used in the web, isn&#8217;t it?</p>
<p>If it sucks, why the hell people and big enterprises persist in using it? Why the bloody hell BBC is going to migrate his websites on PHP platform? Why Facebook use PHP? Why Yahoo?</p>
<p>I&#8217;d like to link an article because it reflects my thoughts <a href="http://gordon-myers.com/?p=103">No, PHP does not suck; YOU suck</a></p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://antoniolorusso.com/2008/06/07/it-sucks-or-not/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
