<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>chirale &#187; php</title>
	<atom:link href="http://chirale.wordpress.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://chirale.wordpress.com</link>
	<description>watashi no yume...</description>
	<lastBuildDate>Mon, 07 Dec 2009 08:58:07 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='chirale.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/913d290334c442dca8a7360d648ac1bd?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>chirale &#187; php</title>
		<link>http://chirale.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://chirale.wordpress.com/osd.xml" title="chirale" />
		<item>
		<title>Cron cannot run on Drupal: the drupal_goto() case</title>
		<link>http://chirale.wordpress.com/2009/07/10/cron-cannot-run-on-drupal-the-drupal_goto-case/</link>
		<comments>http://chirale.wordpress.com/2009/07/10/cron-cannot-run-on-drupal-the-drupal_goto-case/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 11:04:29 +0000</pubDate>
		<dc:creator>chirale</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[drupal 6]]></category>
		<category><![CDATA[drupal_goto]]></category>
		<category><![CDATA[fatal error]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[nesting]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php block]]></category>
		<category><![CDATA[php filter]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://chirale.wordpress.com/?p=356</guid>
		<description><![CDATA[Sometimes you want to redirect a page to another on drupal. You can do this using a simple function called drupal_goto().
On few sites I&#8217;ve enabled the PHP filter module and then created a new page with PHP code input format with drupal_goto(&#8216;node/2&#8242;) to redirect the current page to a specified node. Bad idea.
I&#8217;ve noticed that, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chirale.wordpress.com&blog=1488255&post=356&subd=chirale&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Sometimes you want to redirect a page to another on drupal. You can do this using a simple function called <a href="http://api.drupal.org/api/function/drupal_goto/6" target="_blank">drupal_goto()</a>.</p>
<p>On few sites I&#8217;ve enabled the <strong>PHP filter</strong> module and then created a new page with PHP code input format with drupal_goto(&#8216;node/2&#8242;) to redirect the current page to a specified node. <strong>Bad idea</strong>.</p>
<p>I&#8217;ve noticed that, after this change, cron.php operations failed, if you have <strong>Search</strong> module enabled. On cron new contents are indexed by the Search module: when it got my PHP page, it tries to index it but suddenly is redirected to another. You can also found an error like &#8220;Maximum function nesting level of &#8216;100&#8242; reached&#8221; on php error log, symptom of an indexing blocked by pages with drupal_goto inside.</p>
<p><strong>Solution</strong>:</p>
<ol>
<li>Comment all drupal_goto() instruction in your site within pages.</li>
<li>Use an alternative method to redirect from a node to another.</li>
<li>Run cron from <strong>Status Report</strong> page: you can adjust indexed content per cron on Search configuration page (admin/settings/search on 6.x)</li>
</ol>
<p>You can add a new block with PHP code inside or (better) create a new module for this simple block (with a simple PHP switch statement as content),<strong> displaying it only on specified pages</strong> (on the bottom of block configuration). But if you create a PHP block via UI, and you put that block on every page, your site could be loop, so creating a module is the cleanest and secure way (if something go wrong, you can delete your module from the codebase and correct it). You can also find some contrib modules for redirect on <a href="http://drupalmodules.com" target="_blank">drupalmodules.com</a>.</p>
<p>See also:</p>
<ul>
<li> <a href="http://drupal.org/node/471698" target="_blank">Fatal error: Maximum function nesting level of &#8216;100&#8242; reached, aborting!</a> &#8211; an identical issue on drupal.org</li>
<li><a href="http://api.drupal.org/api/function/drupal_goto/6" target="_blank">drupal_goto() function (Drupal 6.x)</a></li>
</ul>
<div id="_mcePaste" style="overflow:hidden;position:absolute;left:-10000px;top:395px;width:1px;height:1px;">
<h1 class="title node-type-project_issue">Fatal error: Maximum function nesting level of &#8216;100&#8242; reached, aborting!</h1>
</div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chirale.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chirale.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chirale.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chirale.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chirale.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chirale.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chirale.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chirale.wordpress.com/356/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chirale.wordpress.com/356/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chirale.wordpress.com/356/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chirale.wordpress.com&blog=1488255&post=356&subd=chirale&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://chirale.wordpress.com/2009/07/10/cron-cannot-run-on-drupal-the-drupal_goto-case/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12a67456dc1db7deec545e23d51e0c8c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chirale</media:title>
		</media:content>
	</item>
		<item>
		<title>PEAR install quick howto on Debian Lenny: Image_Graph</title>
		<link>http://chirale.wordpress.com/2008/11/23/pear-install-quick-howto-on-debian-lenny-imagegraph/</link>
		<comments>http://chirale.wordpress.com/2008/11/23/pear-install-quick-howto-on-debian-lenny-imagegraph/#comments</comments>
		<pubDate>Sun, 23 Nov 2008 10:57:45 +0000</pubDate>
		<dc:creator>chirale</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[imagegraph]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[PEAR]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://chirale.wordpress.com/?p=232</guid>
		<description><![CDATA[Tested on Debian Lenny.
Time elapsed before a working script &#60; 10 minutes  
Install PEAR installer:
# apt-get install php-pear
First, type:
pear -h
to get help.
On root shell type:
# pear install --alldeps Image_Graph
Install failed with error:
Failed to download pear/Image_Graph within preferred state &#8220;stable&#8221;, latest release is version 0.7.2, stability &#8220;alpha&#8221;, use &#8220;channel://pear.php.net/Image_Graph-0.7.2&#8243; to install
Retype as:
# pear install --alldeps [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chirale.wordpress.com&blog=1488255&post=232&subd=chirale&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><em>Tested on Debian Lenny.</em></p>
<p>Time elapsed before a working script &lt; 10 minutes <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Install PEAR installer:</p>
<p><code># apt-get install php-pear</code></p>
<p>First, type:</p>
<p><code>pear -h</code></p>
<p>to get help.</p>
<p>On root shell type:</p>
<p><code># pear install --alldeps Image_Graph</code></p>
<p>Install failed with error:</p>
<p><em>Failed to download pear/Image_Graph within preferred state &#8220;stable&#8221;, latest release is version 0.7.2, stability &#8220;alpha&#8221;, use &#8220;channel://pear.php.net/Image_Graph-0.7.2&#8243; to install</em></p>
<p>Retype as:</p>
<p><code># pear install --alldeps Image_Graph-0.7.2</code></p>
<p>Repeat for other alpha dependencies the same procedure, eg:</p>
<p><code>pear install --alldeps Numbers_Words-0.15.0</code></p>
<p>At last, you got:</p>
<p><code>Nothing to install</code></p>
<p>Now, you can find all installed packages on<strong> /usr/share/php</strong>.</p>
<p>ImageGraph is installed on <strong>/usr/share/php/Image/Graph.php</strong>.</p>
<p>You have to include it on your PHPs.</p>
<p>You can follow the Ian&#8217;s howto on:</p>
<p><a href="http://www.phpbuilder.com/columns/ian_gilfillan20060503.php3" target="_blank">http://www.phpbuilder.com/columns/ian_gilfillan20060503.php3</a></p>
<p>To start using PEAR Image_Graph.</p>
<p>Here the result using Ian&#8217;s code on my Linux box:</p>
<div id="attachment_233" class="wp-caption alignnone" style="width: 310px"><a href="http://chirale.files.wordpress.com/2008/11/graphtest.png"><img class="size-medium wp-image-233" title="Image_Graph test, using Ian code" src="http://chirale.files.wordpress.com/2008/11/graphtest.png?w=300&#038;h=150" alt="Image_Graph test, using Ian code" width="300" height="150" /></a><p class="wp-caption-text">Image_Graph test, using Ian code</p></div>
<p>Additional info:</p>
<p>Hosting providers (eg. <a href="http://www.hostmonster.com/">HostMonster</a>) sometimes furnish simplified PEAR installation via CPanel. So, you can use local PEAR installation for developement, and online installation for production use.</p>
<p>Remember:</p>
<ul>
<li>To check differences between local and production versions</li>
<li>To change include path! (say no to white screen!)</li>
</ul>
<p>See also:</p>
<ul>
<li><a href="http://pear.veggerby.dk/documentation/" target="_blank">Image_Graph PEAR Documentation</a></li>
</ul>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chirale.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chirale.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chirale.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chirale.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chirale.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chirale.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chirale.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chirale.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chirale.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chirale.wordpress.com/232/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chirale.wordpress.com&blog=1488255&post=232&subd=chirale&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://chirale.wordpress.com/2008/11/23/pear-install-quick-howto-on-debian-lenny-imagegraph/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12a67456dc1db7deec545e23d51e0c8c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chirale</media:title>
		</media:content>

		<media:content url="http://chirale.files.wordpress.com/2008/11/graphtest.png?w=300" medium="image">
			<media:title type="html">Image_Graph test, using Ian code</media:title>
		</media:content>
	</item>
		<item>
		<title>Raise Drupal files upload limit</title>
		<link>http://chirale.wordpress.com/2008/02/13/raise-drupal-files-upload-limit/</link>
		<comments>http://chirale.wordpress.com/2008/02/13/raise-drupal-files-upload-limit/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 14:05:48 +0000</pubDate>
		<dc:creator>chirale</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[file size]]></category>
		<category><![CDATA[filesize]]></category>
		<category><![CDATA[limit]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[size]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[upload limit]]></category>
		<category><![CDATA[uploads]]></category>

		<guid isPermaLink="false">http://chirale.wordpress.com/?p=42</guid>
		<description><![CDATA[
In your Drupal site, go to admin/settings/uploads
Raise upload limits. If the value you want to insert is greater than PHP allowed value:
On bottom of your .htaccess file (drupal/.htaccess) add these lines:
# upload settings
# cfr. http://it.php.net/manual/it/function.ini-set.php
php_value post_max_size 50M
php_value upload_max_filesize 50M
php_value memory_limit 128MChange values as you wish.
Return to admin/settings/uploads and watch changes on PHP limit.

See also:

php ini_set [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chirale.wordpress.com&blog=1488255&post=42&subd=chirale&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><ol>
<li>In your Drupal site, go to <b>admin/settings/uploads</b></li>
<li>Raise upload limits. If the value you want to insert is greater than PHP allowed value:</li>
<li>On bottom of your .htaccess file (drupal/.htaccess) add these lines:<br />
<code># upload settings<br />
# cfr. http://it.php.net/manual/it/function.ini-set.php<br />
php_value post_max_size 50M<br />
php_value upload_max_filesize 50M<br />
php_value memory_limit 128M</code><br />Change values as you wish.</li>
<li>Return to admin/settings/uploads and watch changes on PHP limit.</li>
</ol>
<p>See also:</p>
<ul>
<li><a href="http://it.php.net/manual/it/function.ini-set.php">php ini_set documentation </a></li>
</ul>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/chirale.wordpress.com/42/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/chirale.wordpress.com/42/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chirale.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chirale.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chirale.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chirale.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chirale.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chirale.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chirale.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chirale.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chirale.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chirale.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chirale.wordpress.com&blog=1488255&post=42&subd=chirale&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://chirale.wordpress.com/2008/02/13/raise-drupal-files-upload-limit/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12a67456dc1db7deec545e23d51e0c8c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chirale</media:title>
		</media:content>
	</item>
		<item>
		<title>HTTP 301 Page moved in Drupal</title>
		<link>http://chirale.wordpress.com/2007/10/18/http-301-page-moved-in-drupal/</link>
		<comments>http://chirale.wordpress.com/2007/10/18/http-301-page-moved-in-drupal/#comments</comments>
		<pubDate>Thu, 18 Oct 2007 09:00:53 +0000</pubDate>
		<dc:creator>chirale</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://chirale.wordpress.com/2007/10/18/http-301-page-moved-in-drupal/</guid>
		<description><![CDATA[Scope:  Move an old document to a new URL with HTTP 301 Permanent Redirect.
Module used (required if you don&#8217;t want to modify an existing page): URL aliases.

Create a new page (or edit an old one). Select &#8220;PHP code&#8221; in input type.
Fill the url alias box, with the old document path
Insert the following code: &#60;?php
// [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chirale.wordpress.com&blog=1488255&post=20&subd=chirale&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Scope:  Move an old document to a new URL with <a href="http://tools.ietf.org/html/rfc2616#section-10.3.2">HTTP 301 Permanent Redirect</a>.</p>
<p>Module used (required if you don&#8217;t want to modify an existing page): URL aliases.</p>
<ol>
<li>Create a new page (or edit an old one). Select &#8220;PHP code&#8221; in input type.</li>
<li>Fill the url alias box, with the old document path</li>
<li>Insert the following code: &lt;?php<br />
// Permanent redirection<br />
header(&#8220;HTTP/1.1 301 Moved Permanently&#8221;);<br />
header(&#8220;Location: http://www.yoursite.tld/location&#8221;);<br />
exit();<br />
?&gt;</li>
<li>Save.</li>
</ol>
<p>Note: Obviously you can&#8217;t see the page (you&#8217;ll be redirected to specified address), but you can edit or delete the page from <strong>admin/content/node</strong>. As admin, if you try to unpublish the page you&#8217;ll be redirected anyway: you have to delete the page to fix it.</p>
<p>See also:  <a href="http://www.somacon.com/p145.php">http://www.somacon.com/p145.php</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/chirale.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/chirale.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/chirale.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/chirale.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/chirale.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/chirale.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/chirale.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/chirale.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/chirale.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/chirale.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/chirale.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/chirale.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=chirale.wordpress.com&blog=1488255&post=20&subd=chirale&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://chirale.wordpress.com/2007/10/18/http-301-page-moved-in-drupal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12a67456dc1db7deec545e23d51e0c8c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chirale</media:title>
		</media:content>
	</item>
	</channel>
</rss>