<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>PHP Thumb Topic: XHTML Strict &#038; phpthumbs</title>
<link>http://phpthumb.gxdlabs.com/forums/</link>
<description>Help, Suggestions, and General Discussion</description>
<language>en</language>
<pubDate>Thu, 09 Sep 2010 04:45:26 +0000</pubDate>

<item>
<title>Ian on "XHTML Strict &#038; phpthumbs"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/xhtml-strict-038-phpthumbs#post-110</link>
<pubDate>Tue, 22 Sep 2009 08:09:07 +0000</pubDate>
<dc:creator>Ian</dc:creator>
<guid isPermaLink="false">110@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;No problem, thanks for the kind words :)  Feel free to post any other issues / concerns / suggestions you may have and enjoy!
&#60;/p&#62;</description>
</item>
<item>
<title>phillw on "XHTML Strict &#038; phpthumbs"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/xhtml-strict-038-phpthumbs#post-109</link>
<pubDate>Tue, 22 Sep 2009 01:55:40 +0000</pubDate>
<dc:creator>phillw</dc:creator>
<guid isPermaLink="false">109@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Well, what can I say ?  WOW !!! - fantastic, thanks for a brilliant library. The simple solution was to keep the call seperate as PHP module (Just like your example said to)... Ooops  ;-)&#60;/p&#62;
&#60;p&#62;Phill.
&#60;/p&#62;</description>
</item>
<item>
<title>phillw on "XHTML Strict &#038; phpthumbs"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/xhtml-strict-038-phpthumbs#post-108</link>
<pubDate>Mon, 21 Sep 2009 15:14:10 +0000</pubDate>
<dc:creator>phillw</dc:creator>
<guid isPermaLink="false">108@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Yeah, it does help greatly ... the penny has dropped ... As you will see - my header file issues HTML commands - So, I'm guessing, I need your 'require-once' in the php heading part of my 1st header .... if that makes any sense ?&#60;/p&#62;
&#60;p&#62;Thanks for the speedy reply - I'll get my head round this stuff !!&#60;/p&#62;
&#60;p&#62;Phill.
&#60;/p&#62;</description>
</item>
<item>
<title>Ian on "XHTML Strict &#038; phpthumbs"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/xhtml-strict-038-phpthumbs#post-107</link>
<pubDate>Mon, 21 Sep 2009 14:22:59 +0000</pubDate>
<dc:creator>Ian</dc:creator>
<guid isPermaLink="false">107@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Yeah, I think you're talking about two completely different things... remember, if PHP is throwing an error regarding headers, this has absolutely nothing to do with the browser.&#60;/p&#62;
&#60;p&#62;Basically what's happening is that you've started output elsewhere in your PHP code, and when the library tries to send headers for the image itself the exception is thrown.  This is because PHP has already sent headers to the client, and once that's done you can't send anymore (headers were sent as a result of prior output started).&#60;/p&#62;
&#60;p&#62;Basically, removing this code from my library won't do anything for you... you'll just see essentially the same error thrown, but this time from PHP itself, rather than an exception thrown by the library.&#60;/p&#62;
&#60;p&#62;Hope that helps :)
&#60;/p&#62;</description>
</item>
<item>
<title>phillw on "XHTML Strict &#038; phpthumbs"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/xhtml-strict-038-phpthumbs#post-106</link>
<pubDate>Mon, 21 Sep 2009 13:19:59 +0000</pubDate>
<dc:creator>phillw</dc:creator>
<guid isPermaLink="false">106@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Oops ... Sorry, I completely missed out the Error Message ....&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;Fatal error: Uncaught exception 'RuntimeException' with message 'Cannot show image, headers have already been sent' in /var/www/webserver/thumb_plugins/GdThumb.inc.php:562 Stack trace: #0 /var/www/webserver/mgjuddltd/html/display_parts.php(25): GdThumb-&#38;gt;show() #1 {main} thrown in /var/www/webserver/thumb_plugins/GdThumb.inc.php on line 562&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Line 562, being the part that checks if headers have already been sent..
&#60;/p&#62;</description>
</item>
<item>
<title>phillw on "XHTML Strict &#038; phpthumbs"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/xhtml-strict-038-phpthumbs#post-105</link>
<pubDate>Mon, 21 Sep 2009 13:13:52 +0000</pubDate>
<dc:creator>phillw</dc:creator>
<guid isPermaLink="false">105@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Glad to see you are compliant ..... however, I have a small problem ....&#60;/p&#62;
&#60;p&#62;Your code wishes to issue &#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
public function show ()&#60;br /&#62;
	{&#60;br /&#62;
		if (headers_sent())&#60;br /&#62;
		{&#60;br /&#62;
			throw new RuntimeException('Cannot show image, headers have already been sent');&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;		switch ($this-&#38;gt;format)&#60;br /&#62;
		{&#60;br /&#62;
			case 'GIF':&#60;br /&#62;
				header('Content-type: image/gif');&#60;br /&#62;
				imagegif($this-&#38;gt;oldImage);&#60;br /&#62;
				break;&#60;br /&#62;
			case 'JPG':&#60;br /&#62;
				header('Content-type: image/jpeg');&#60;br /&#62;
				imagejpeg($this-&#38;gt;oldImage, null, $this-&#38;gt;options['jpegQuality']);&#60;br /&#62;
				break;&#60;br /&#62;
			case 'PNG':&#60;br /&#62;
				header('Content-type: image/png');&#60;br /&#62;
				imagepng($this-&#38;gt;oldImage);&#60;br /&#62;
				break;&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;		return $this;&#60;br /&#62;
	}&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;And my Code for XHTML compliance (and various meta-tags) has already issued this little lot at the start of each page ......&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
$charset = &#34;utf-8&#34;;&#60;br /&#62;
$mime = &#34;text/html&#34;;&#60;br /&#62;
# NOTE: To allow for q-values with one space (text/html; q=0.5),&#60;br /&#62;
# use the following regex:&#60;br /&#62;
# &#34;/text\/html;[\ ]{0,1}q=([0-1]{0,1}\.\d{0,4})/i&#34;&#60;br /&#62;
if((isset($_SERVER[&#34;HTTP_ACCEPT&#34;])) &#38;#38;&#38;#38; (stristr($_SERVER[&#34;HTTP_ACCEPT&#34;],&#34;application/xhtml+xml&#34;)))  {&#60;br /&#62;
   if(preg_match(&#34;/application\/xhtml\+xml;q=([0-1]{0,1}\.\d{0,4})/i&#34;,$_SERVER[&#34;HTTP_ACCEPT&#34;],$matches)) {&#60;br /&#62;
      $xhtml_q = $matches[1];&#60;br /&#62;
      if(preg_match(&#34;/text\/html;q=([0-1]{0,1}\.\d{0,4})/i&#34;,$_SERVER[&#34;HTTP_ACCEPT&#34;],$matches)) {&#60;br /&#62;
         $html_q = $matches[1];&#60;br /&#62;
         if((float)$xhtml_q &#38;gt;= (float)$html_q)&#60;br /&#62;
            $mime = &#34;application/xhtml+xml&#34;;&#60;br /&#62;
      }&#60;br /&#62;
   }&#60;br /&#62;
   else&#60;br /&#62;
	  $mime = &#34;application/xhtml+xml&#34;;&#60;br /&#62;
}&#60;br /&#62;
?&#38;gt;&#60;br /&#62;
&#38;lt;!DOCTYPE html&#60;br /&#62;
     PUBLIC &#34;-//W3C//DTD XHTML 1.0 Strict//EN&#34;&#60;br /&#62;
     &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#34;&#38;gt;&#60;br /&#62;
&#38;lt;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34; xml:lang=&#34;en&#34; lang=&#34;en&#34;&#38;gt;&#60;br /&#62;
&#38;lt;head&#38;gt;&#60;br /&#62;
&#38;lt;meta http-equiv=&#34;Content-Type&#34; content=&#34;&#38;lt;?php echo $mime ?&#38;gt;;charset=&#38;lt;?php echo $charset ?&#38;gt;&#34; /&#38;gt;&#60;br /&#62;
&#38;lt;!--  The lines below are for CSS - On my sites I have the two classes,&#60;br /&#62;
 You may only have media, or you may need one for mobile (cell) phones - add / remove as you wish --&#38;gt;&#60;br /&#62;
&#38;lt;meta http-equiv=&#34;Content-Style-Type&#34; content=&#34;text/css&#34; /&#38;gt;&#60;br /&#62;
&#38;lt;link rel=&#34;stylesheet&#34; media=&#34;screen&#34; type=&#34;text/css&#34; href=&#34;/mgjuddltd/html/mgj.css&#34; /&#38;gt;&#60;br /&#62;
&#38;lt;link rel=&#34;stylesheet&#34; media=&#34;print&#34; type=&#34;text/css&#34; href=&#34;/mgjuddltd/html/mgj_print.css&#34; /&#38;gt;&#60;br /&#62;
&#38;lt;meta name=&#34;description&#34; content=&#34;hire plant parts, spares engineering services&#34;/&#38;gt;&#60;br /&#62;
&#38;lt;meta name=&#34;keywords&#34; content=&#34;keys, locks, engine, parts, hire, plant, services, engineering,&#60;br /&#62;
consumables,&#34;/&#38;gt;&#60;br /&#62;
&#38;lt;meta name=&#34;copyright&#34; content=&#34;M.G. Judd Ltd., 2009. All rights Reserved.&#34;/&#38;gt;&#60;br /&#62;
&#38;lt;meta name=&#34;no-email-collection&#34; content=&#34;http://www.unspam.com/noemailcollection&#34; /&#38;gt;&#60;/p&#62;
&#60;p&#62;&#38;lt;/head&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;I'm still pretty new to this strict encoding, whilst trying to look after non-xhtml browsers - I'm not too sure how to get around the issuing of a &#34;content-type:&#34; to your specific requirements....&#60;/p&#62;
&#60;p&#62;I'm sorta guessing that &#60;strong&#62;&#60;em&#62;most&#60;/em&#62;&#60;/strong&#62; browsers can handle&#60;br /&#62;
jpgs &#38;#38; gifs - w3c has this to say on the matter....&#60;br /&#62;
&#60;blockquote&#62;Attributes of this type identify the allowable content type(s) of an associated URI (usually a value of another attribute on the same element). At its most general, it is a comma-separated list of media ranges with optional accept parameters, as defined in section 14.1 of [RFC2616] as the field value of the accept request header.&#60;/p&#62;
&#60;p&#62;In its simplest case, this is just a media type, such as &#34;image/png&#34; or &#34;application/xml&#34;, but it may also contain asterisks, such as &#34;image/*&#34; or &#34;*/*&#34;, or lists of acceptable media types, such as &#34;image/png, image/gif, image/jpeg&#34;.&#60;/p&#62;
&#60;p&#62;The user agent must combine this list with its own list of acceptable media types by taking the intersection, and then use the resulting list as the field value of the accept request header when requesting the resource using HTTP.&#60;/p&#62;
&#60;p&#62;For instance, if the attribute specifies the value &#34;image/png, image/gif, image/jpeg&#34;, but the user agent does not accept images of type &#34;image/gif&#34; then the resultant accept header would contain &#34;image/png, image/jpeg&#34;.&#60;/p&#62;
&#60;p&#62;A user agent must imitate similar behavior when using other methods than HTTP. For instance, when accessing files in a local filestore, &#38;lt;p src=&#34;logo&#34; srctype=&#34;image/png, image/jpeg&#34;&#38;gt; might cause the user agent first to look for a file logo.png, and then for logo.jpg.&#60;/p&#62;
&#60;p&#62;If a value for the content type is not given, &#34;*/*&#34; must be used for its value.&#60;/p&#62;
&#60;p&#62;For the current list of registered content types, please consult [MIMETYPES].&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;So, placing a &#60;code&#62;In its simplest case, this is just a media type, such as &#34;image/png&#34; or &#34;application/xml&#34;, but it may also contain asterisks, such as &#34;image/*&#34; or &#34;*/*&#34;, or lists of acceptable media types, such as &#34;image/png, image/gif, image/jpeg&#34;.&#60;br /&#62;
&#60;/code&#62; type statement would keep me in alignment with the rules - My question then is, what would be, if any, the effect of removing the code from your library with those directives in ?&#60;/p&#62;
&#60;p&#62;-- Yeah, I know I'm a pain in the ass, but, please try to see it my way - I already have a header section to look after all my pages, and I would be most pleased to be able to adapt to use your fantastic php-code.&#60;/p&#62;
&#60;p&#62;Regards,&#60;/p&#62;
&#60;p&#62;Phill.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
