<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Using ImageMagick with WordPress 2.9.1</title>
	<atom:link href="http://return-true.com/2010/01/using-imagemagick-with-wordpress-2-9-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://return-true.com/2010/01/using-imagemagick-with-wordpress-2-9-1/</link>
	<description>Coding Tutorials, hints &#38; tips in PHP, jQuery, CSS &#38; HTML</description>
	<lastBuildDate>Thu, 29 Jul 2010 22:16:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Paul Robinson</title>
		<link>http://return-true.com/2010/01/using-imagemagick-with-wordpress-2-9-1/comment-page-1/#comment-17190</link>
		<dc:creator>Paul Robinson</dc:creator>
		<pubDate>Sun, 20 Jun 2010 20:03:59 +0000</pubDate>
		<guid isPermaLink="false">http://return-true.com/?p=1462#comment-17190</guid>
		<description>Well not always. The first thing to do would be to make sure that the path to imagemagick is correct by using shell access to try and run convert yourself. It&#039;s the only (quick &amp; easy) way to positively identify if the path is okay.

If it is correct then yes for some reason the resizing isn&#039;t working. If your servers imagemagick is below version 6 the carrot (^) flag for square cropping thumbnails will not work, but that shouldn&#039;t stop it from at least creating non square cropped thumbnails.</description>
		<content:encoded><![CDATA[<p>Well not always. The first thing to do would be to make sure that the path to imagemagick is correct by using shell access to try and run convert yourself. It&#8217;s the only (quick &#038; easy) way to positively identify if the path is okay.</p>
<p>If it is correct then yes for some reason the resizing isn&#8217;t working. If your servers imagemagick is below version 6 the carrot (^) flag for square cropping thumbnails will not work, but that shouldn&#8217;t stop it from at least creating non square cropped thumbnails.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seb</title>
		<link>http://return-true.com/2010/01/using-imagemagick-with-wordpress-2-9-1/comment-page-1/#comment-17189</link>
		<dc:creator>Seb</dc:creator>
		<pubDate>Sun, 20 Jun 2010 19:07:46 +0000</pubDate>
		<guid isPermaLink="false">http://return-true.com/?p=1462#comment-17189</guid>
		<description>Nope the thumbnails indeed do not exist; i.e. the uploaded image isn&#039;t being resized.

Does this mean that the scripting IS able to reach imagemagick, but for some reason the resizing isn&#039;t working?</description>
		<content:encoded><![CDATA[<p>Nope the thumbnails indeed do not exist; i.e. the uploaded image isn&#8217;t being resized.</p>
<p>Does this mean that the scripting IS able to reach imagemagick, but for some reason the resizing isn&#8217;t working?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Robinson</title>
		<link>http://return-true.com/2010/01/using-imagemagick-with-wordpress-2-9-1/comment-page-1/#comment-17188</link>
		<dc:creator>Paul Robinson</dc:creator>
		<pubDate>Sun, 20 Jun 2010 19:04:08 +0000</pubDate>
		<guid isPermaLink="false">http://return-true.com/?p=1462#comment-17188</guid>
		<description>I&#039;m not sure what he means as the same functions used to create the thumbnails before you switched to imagemagick are being used.

It looks as if it&#039;s trying to find the resized images &amp; can&#039;t which would mean (to me at least) that Imagemagick isn&#039;t creating thumbnails. Check to see if the image files that the previous errors gave you exist as Imagemagick doesn&#039;t return errors if it can&#039;t resize images, it just continues on with the script.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure what he means as the same functions used to create the thumbnails before you switched to imagemagick are being used.</p>
<p>It looks as if it&#8217;s trying to find the resized images &#038; can&#8217;t which would mean (to me at least) that Imagemagick isn&#8217;t creating thumbnails. Check to see if the image files that the previous errors gave you exist as Imagemagick doesn&#8217;t return errors if it can&#8217;t resize images, it just continues on with the script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seb</title>
		<link>http://return-true.com/2010/01/using-imagemagick-with-wordpress-2-9-1/comment-page-1/#comment-17187</link>
		<dc:creator>Seb</dc:creator>
		<pubDate>Sun, 20 Jun 2010 18:58:25 +0000</pubDate>
		<guid isPermaLink="false">http://return-true.com/?p=1462#comment-17187</guid>
		<description>&lt;code&gt;function image_make_intermediate_size($file, $width, $height, $crop=false) {
	if ( $width &#124;&#124; $height ) {
		$resized_file = image_resize($file, $width, $height, $crop);
		if ( !is_wp_error($resized_file) &amp;&amp; $resized_file &amp;&amp; $info = getimagesize($resized_file) ) {
			$resized_file = apply_filters(&#039;image_make_intermediate_size&#039;, $resized_file);
			return array(
				&#039;file&#039; =&gt; basename( $resized_file ),
				&#039;width&#039; =&gt; $info[0],
				&#039;height&#039; =&gt; $info[1],
			);
		}
	}
	return false;
}&lt;/code&gt;

My ISP support has also suggested the following:

&quot;While yes, this is beyond our scope of support, I would suggest updating the part of the script that generates the file name for that function. You may want to replace that with this PHP variable (depending on how it works):

$_SERVER[&quot;DOCUMENT_ROOT&quot;]

The value of that is simply /xxxx/xxxxx/xxxxxx/sebcastilho.com/html to which you can append wp-content and etc. Beyond that, I&#039;m not sure, but you may want to toy with that function to see if you can get it to work at all on the (gs) Grid-Service.&quot;

Could you just clarify which part he means the replace?</description>
		<content:encoded><![CDATA[<p><code>function image_make_intermediate_size($file, $width, $height, $crop=false) {<br />
	if ( $width || $height ) {<br />
		$resized_file = image_resize($file, $width, $height, $crop);<br />
		if ( !is_wp_error($resized_file) &amp;&amp; $resized_file &amp;&amp; $info = getimagesize($resized_file) ) {<br />
			$resized_file = apply_filters('image_make_intermediate_size', $resized_file);<br />
			return array(<br />
				'file' =&gt; basename( $resized_file ),<br />
				'width' =&gt; $info[0],<br />
				'height' =&gt; $info[1],<br />
			);<br />
		}<br />
	}<br />
	return false;<br />
}</code></p>
<p>My ISP support has also suggested the following:</p>
<p>&#8220;While yes, this is beyond our scope of support, I would suggest updating the part of the script that generates the file name for that function. You may want to replace that with this PHP variable (depending on how it works):</p>
<p>$_SERVER["DOCUMENT_ROOT"]</p>
<p>The value of that is simply /xxxx/xxxxx/xxxxxx/sebcastilho.com/html to which you can append wp-content and etc. Beyond that, I&#8217;m not sure, but you may want to toy with that function to see if you can get it to work at all on the (gs) Grid-Service.&#8221;</p>
<p>Could you just clarify which part he means the replace?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Robinson</title>
		<link>http://return-true.com/2010/01/using-imagemagick-with-wordpress-2-9-1/comment-page-1/#comment-17186</link>
		<dc:creator>Paul Robinson</dc:creator>
		<pubDate>Sun, 20 Jun 2010 18:55:02 +0000</pubDate>
		<guid isPermaLink="false">http://return-true.com/?p=1462#comment-17186</guid>
		<description>What function is that line in?</description>
		<content:encoded><![CDATA[<p>What function is that line in?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seb</title>
		<link>http://return-true.com/2010/01/using-imagemagick-with-wordpress-2-9-1/comment-page-1/#comment-17185</link>
		<dc:creator>Seb</dc:creator>
		<pubDate>Sun, 20 Jun 2010 17:56:30 +0000</pubDate>
		<guid isPermaLink="false">http://return-true.com/?p=1462#comment-17185</guid>
		<description>In my media file, line 485 is:

&lt;code&gt;if ( !is_wp_error($resized_file) &amp;&amp; $resized_file &amp;&amp; $info = getimagesize($resized_file) ) {&lt;/code&gt;

Any suggestions?</description>
		<content:encoded><![CDATA[<p>In my media file, line 485 is:</p>
<p><code>if ( !is_wp_error($resized_file) &amp;&amp; $resized_file &amp;&amp; $info = getimagesize($resized_file) ) {</code></p>
<p>Any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Robinson</title>
		<link>http://return-true.com/2010/01/using-imagemagick-with-wordpress-2-9-1/comment-page-1/#comment-17184</link>
		<dc:creator>Paul Robinson</dc:creator>
		<pubDate>Sun, 20 Jun 2010 17:47:15 +0000</pubDate>
		<guid isPermaLink="false">http://return-true.com/?p=1462#comment-17184</guid>
		<description>I&#039;m not sure what&#039;s causing that as my media.php file (WP3) has a comment on the line the error is on?

Yes, those are the only things I have done to my install &amp; it is working fine.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure what&#8217;s causing that as my media.php file (WP3) has a comment on the line the error is on?</p>
<p>Yes, those are the only things I have done to my install &#038; it is working fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seb</title>
		<link>http://return-true.com/2010/01/using-imagemagick-with-wordpress-2-9-1/comment-page-1/#comment-17183</link>
		<dc:creator>Seb</dc:creator>
		<pubDate>Sun, 20 Jun 2010 17:45:12 +0000</pubDate>
		<guid isPermaLink="false">http://return-true.com/?p=1462#comment-17183</guid>
		<description>The addition to the function file, setting the imagemagick path and the commenting in the media file are definitely the only things I need to do right?</description>
		<content:encoded><![CDATA[<p>The addition to the function file, setting the imagemagick path and the commenting in the media file are definitely the only things I need to do right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seb</title>
		<link>http://return-true.com/2010/01/using-imagemagick-with-wordpress-2-9-1/comment-page-1/#comment-17182</link>
		<dc:creator>Seb</dc:creator>
		<pubDate>Sun, 20 Jun 2010 17:41:48 +0000</pubDate>
		<guid isPermaLink="false">http://return-true.com/?p=1462#comment-17182</guid>
		<description>Yep that is one of the things I tried. This appears in the upload results box:
[bash]Warning: getimagesize(/nfs/c02/h10/mnt/22581/domains/sebcastilho.com/html/wp-content/uploads/2010/06/giantman7-210x300.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /nfs/c02/h10/mnt/22581/domains/sebcastilho.com/html/wp-includes/media.php  on line 485

Warning: getimagesize(/nfs/c02/h10/mnt/22581/domains/sebcastilho.com/html/wp-content/uploads/2010/06/giantman7-410x500.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /nfs/c02/h10/mnt/22581/domains/sebcastilho.com/html/wp-includes/media.php on line 485

Warning: getimagesize(/nfs/c02/h10/mnt/22581/domains/sebcastilho.com/html/wp-content/uploads/2010/06/giantman7-493x600.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /nfs/c02/h10/mnt/22581/domains/sebcastilho.com/html/wp-includes/media.php on line 485
788
[/bash]</description>
		<content:encoded><![CDATA[<p>Yep that is one of the things I tried. This appears in the upload results box:</p>
<pre class="brush: bash;">Warning: getimagesize(/nfs/c02/h10/mnt/22581/domains/sebcastilho.com/html/wp-content/uploads/2010/06/giantman7-210x300.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /nfs/c02/h10/mnt/22581/domains/sebcastilho.com/html/wp-includes/media.php  on line 485

Warning: getimagesize(/nfs/c02/h10/mnt/22581/domains/sebcastilho.com/html/wp-content/uploads/2010/06/giantman7-410x500.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /nfs/c02/h10/mnt/22581/domains/sebcastilho.com/html/wp-includes/media.php on line 485

Warning: getimagesize(/nfs/c02/h10/mnt/22581/domains/sebcastilho.com/html/wp-content/uploads/2010/06/giantman7-493x600.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /nfs/c02/h10/mnt/22581/domains/sebcastilho.com/html/wp-includes/media.php on line 485
788
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Robinson</title>
		<link>http://return-true.com/2010/01/using-imagemagick-with-wordpress-2-9-1/comment-page-1/#comment-17181</link>
		<dc:creator>Paul Robinson</dc:creator>
		<pubDate>Sun, 20 Jun 2010 17:37:50 +0000</pubDate>
		<guid isPermaLink="false">http://return-true.com/?p=1462#comment-17181</guid>
		<description>You have to comment out the entire function that starts at &lt;code&gt;function image_resize&lt;/code&gt; etc &amp; ends with a curly brace &#039;}&#039;.</description>
		<content:encoded><![CDATA[<p>You have to comment out the entire function that starts at <code>function image_resize</code> etc &#038; ends with a curly brace &#8216;}&#8217;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
