<?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>sebthom.de &#187; bug</title>
	<atom:link href="http://sebthom.de/tag/bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://sebthom.de</link>
	<description>IT Freelancer - Java, J2EE, IBM WebSphere Portal, Lotus Notes/Domino</description>
	<lastBuildDate>Sat, 03 Sep 2011 18:02:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>[Solved] Blank Pages with WordPress 2.6.x</title>
		<link>http://sebthom.de/63-solved-blank-pages-with-wordpress-26x/</link>
		<comments>http://sebthom.de/63-solved-blank-pages-with-wordpress-26x/#comments</comments>
		<pubDate>Sat, 13 Sep 2008 18:57:59 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://sebthom.de/?p=63&amp;langswitch_lang=de</guid>
		<description><![CDATA[     <link rel="alternate" type="application/atom+xml" title="sebthom.de Category: WordPress" href="http://sebthom.de/category/it/wordpress/feed/" />
After upgrading to WordPress 2.6 it occasionally happend that an empty page was displayed in the browser when navigating through the blog or working in the admin area. Refreshing the browser using CTRL+F5 usually helped in that case. Today I upgraded to WordPress 2.6.2 and I was not able to access the plug-ins page of [...]]]></description>
			<content:encoded><![CDATA[<p>After upgrading to WordPress 2.6 it occasionally happend that an empty page was displayed in the browser when navigating through the blog or working in the admin area. Refreshing the browser using CTRL+F5 usually helped in that case. Today I upgraded to WordPress 2.6.2 and I was not able to access the plug-ins page of the admin area anymore. No matter how often I refreshed the page in the browser it stayed blank.<br />
First I searched the web for possible solutions. I found quite a number of discussions giving tips about this widely known problem but unfortunately none of these solutions helped in my case.<br />
So I again started debugging the WordPress code and finally found the lines of code causing the trouble. The problem are <b>(object)</b> casts in the <strong>wp-includes/taxonomy.php</strong> file that transform an array into an object:</p>
<pre class="php" name="code">$wp_taxonomies['category'] = (object) array('name' => 'category', 'object_type' => 'post', 'hierarchical' => true, 'update_count_callback' => '_update_post_term_count');
$wp_taxonomies['post_tag'] = (object) array('name' => 'post_tag', 'object_type' => 'post', 'hierarchical' => false, 'update_count_callback' => '_update_post_term_count');
$wp_taxonomies['link_category'] = (object) array('name' => 'link_category', 'object_type' => 'link', 'hierarchical' => false);
</pre>
<p>Since I don&#8217;t get any error messages neither on the screen nor in the log files I have no idea why these casts fail. The PHP version used to serve the site is the latest stable 5.x release from php.net.<br />
As a workaround I introduced a function that does also transforms an array into an object but does not rely on the casting mechanism.</p>
<pre class="php" name="code">function arr2obj($arr) {
	foreach ($arr as $k => $v) $obj -> {$k} = $v;
	return $obj;
}

$wp_taxonomies['category'] = arr2obj(array('name' => 'category', 'object_type' => 'post', 'hierarchical' => true, 'update_count_callback' => '_update_post_term_count'));
$wp_taxonomies['post_tag'] = arr2obj(array('name' => 'post_tag', 'object_type' => 'post', 'hierarchical' => false, 'update_count_callback' => '_update_post_term_count'));
$wp_taxonomies['link_category'] = arr2obj(array('name' => 'link_category', 'object_type' => 'link', 'hierarchical' => false));
</pre>
 <img src="http://sebthom.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=63" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2008. |
<a href="http://sebthom.de/63-solved-blank-pages-with-wordpress-26x/">Permalink</a> |
<a href="http://sebthom.de/63-solved-blank-pages-with-wordpress-26x/#comments">2 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/63-solved-blank-pages-with-wordpress-26x/&amp;title=[Solved] Blank Pages with WordPress 2.6.x">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/bug/" rel="nofollow tag">bug</a>, <a href="http://sebthom.de/tag/php/" rel="nofollow tag">PHP</a>, <a href="http://sebthom.de/tag/wordpress/" rel="nofollow tag">Wordpress</a>, <a href="http://sebthom.de/tag/workaround/" rel="nofollow tag">workaround</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/63-solved-blank-pages-with-wordpress-26x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sun JDK5/6 compilers broken when linking overloaded methods with variable arguments</title>
		<link>http://sebthom.de/56-sun_jdk5_6_compilers_broken_when_linking_overloaded_methods_with_variable_arguments/</link>
		<comments>http://sebthom.de/56-sun_jdk5_6_compilers_broken_when_linking_overloaded_methods_with_variable_arguments/#comments</comments>
		<pubDate>Thu, 15 May 2008 23:23:44 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[jdk]]></category>

		<guid isPermaLink="false">http://sebthom.de/56-sun_jdk5_6_compilers_broken_when_linking_overloaded_methods_with_variable_arguments/</guid>
		<description><![CDATA[We are currently switching the build system of OVal from custom Ant scripts to Maven 2. During that process we accidentally compiled the project using the Java compiler of the Sun JDK 5 instead of the AspectJ compiler. Surprisingly javac did not complain about the missing aspect class files. Instead it already aborted while compiling [...]]]></description>
			<content:encoded><![CDATA[<p>We are currently switching the build system of <a title="OVal - the object validation framework for Java 5 or later" href="http://oval.sourceforge.net/" target="_blank">OVal</a> from custom Ant scripts to Maven 2. During that process we accidentally compiled the project using the Java compiler of the Sun JDK 5 instead of the AspectJ compiler. Surprisingly javac did not complain about the missing aspect class files. Instead it already aborted while compiling an ordinary Java class which only referenced other non-AspectJ related classes. This is the original error message:</p>
<pre>[INFO] [compiler:compile]
[INFO] Compiling 180 source files to C:\projects\oval\src\trunk\target\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
C:\projects\oval\src\trunk\src\main\java\net\sf\oval\Validator.java:[373,58]
addMethodParameterChecks(java.lang.reflect.Method,int,java.lang.Object)
has private access in net.sf.oval.internal.ClassChecks </pre>
<p>There exist multiple methods named <strong>addMethodParameterChecks</strong> in the class <strong>ClassChecks</strong> with different signatures. The problem is that javac tries to link against the wrong method when compiling the class calling one of the methods. </p>
<p>(...)<br/>Read the rest of <a href="http://sebthom.de/56-sun_jdk5_6_compilers_broken_when_linking_overloaded_methods_with_variable_arguments/">Sun JDK5/6 compilers broken when linking overloaded methods with variable arguments</a> (284 words)</p>
<hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2008. |
<a href="http://sebthom.de/56-sun_jdk5_6_compilers_broken_when_linking_overloaded_methods_with_variable_arguments/">Permalink</a> |
<a href="http://sebthom.de/56-sun_jdk5_6_compilers_broken_when_linking_overloaded_methods_with_variable_arguments/#comments">One comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/56-sun_jdk5_6_compilers_broken_when_linking_overloaded_methods_with_variable_arguments/&amp;title=Sun JDK5/6 compilers broken when linking overloaded methods with variable arguments">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/bug/" rel="nofollow tag">bug</a>, <a href="http://sebthom.de/tag/compiler/" rel="nofollow tag">compiler</a>, <a href="http://sebthom.de/tag/java/" rel="nofollow tag">Java</a>, <a href="http://sebthom.de/tag/jdk/" rel="nofollow tag">jdk</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/56-sun_jdk5_6_compilers_broken_when_linking_overloaded_methods_with_variable_arguments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[Solved] WordPress 2.5 One-Click Plug-in Upgrades &#8211; Could not create directory</title>
		<link>http://sebthom.de/54-solved-wordpress-25-one-click-plugin-update-problem-could-not-create-directory/</link>
		<comments>http://sebthom.de/54-solved-wordpress-25-one-click-plugin-update-problem-could-not-create-directory/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 23:44:06 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://sebthom.de/54-solved-wordpress-25-one-click-plugin-update-problem-could-not-create-directory/</guid>
		<description><![CDATA[Some days ago I upgraded my WordPress installation to the new 2.5 release. Being a lazy guy I of course wanted to use the new on-click plug-in upgrades feature to update several plug-ins. Trying to one-click update some of the out-dated plug-ins only resulted in the rather meaningless error message &#8220;Could not create directory&#8221;. So [...]]]></description>
			<content:encoded><![CDATA[<p>Some days ago I upgraded my WordPress installation to the new <a href="http://wordpress.org/development/2008/03/wordpress-25-brecker/" target="_blank">2.5 release</a>. Being a lazy guy I of course wanted to use the new <a href="http://wordpress.org/development/2008/03/wordpress-25-brecker/" target="_blank">on-click plug-in upgrades</a> feature to update several plug-ins. Trying to one-click update some of the out-dated plug-ins only resulted in the rather meaningless error message &#8220;Could not create directory&#8221;. So I started searching the web for possible solutions. I quickly found <a href="http://wordpress.org/support/topic/164174" target="_blank">some</a> <a href="http://blog.fabrice-pascal.de/item/1132/2008/04/06/" target="_blank">posts</a> explaining this issue to be a directory permission problem. Manually creating the /wp-content/upgrade directory and chmoding it as well as the plug-in directories to 777 should solve the problem. Unfortunately not for me. Therefore I rolled up my sleeves and started to debug WordPress&#8230;</p>
<p>To cut a long story short, eventually I came across this PHP bug report <a href="http://bugs.php.net/bug.php?id=42739" target="_blank">#42739 mkdir doesn&#8217;t like a trailing slash when safe_mode is enabled</a> and it turned out that this was the issue I was facing with on my hosting account too. The safe_mode option is enabled and WordPress tries to create directories that end with a slash (e.g. /htdocs/wp-content/upgrade/the-plugin<strong>/</strong>).</p>
<p>After knowing the reason I could develop a workaround and finally got the one-click updater running. If you are facing the same issue you can try to use my patch too.</p>
<ol>
<li>Locate and open the file <strong>&lt;wp_root&gt;/wp_admin/includes/class-wp-filesystem-direct.php</strong> in an editor <br /> 
<li>Search for &#8220;<strong>function mkdir</strong>&#8221; <br /> 
<li>Add the following statements to this method
<pre class="php" name="code">function mkdir($path,$chmod=false,$chown=false,$chgrp=false){
	if( ! $chmod)
		$chmod = $this-&gt;permission;

	// workaround for http://bugs.php.net/bug.php?id=42739 starts here
	if(ini_get('safe_mode') &amp;&amp; substr($path, -1) == '/')
	{
		$path = substr($path, 0, -1);
	}
	// workaround for http://bugs.php.net/bug.php?id=42739 ends here

	if( !@mkdir($path,$chmod) )
		return false;
	if( $chown )
		$this-&gt;chown($path,$chown);
	if( $chgrp )
		$this-&gt;chgrp($path,$chgrp);
	return true;
}</pre>
<li>Start one-click updating! </li>
</ol>
<p><b>Addendum:</b>
<ol>
<li>The patch also works for WordPress 2.5.1</li>
<li>If applying this patch does not lead to success the problem may have a second cause. Therefore also check the permissions on the /wp-content/upgrade/ folder and it&#8217;s sub folders, e.g. chmod them to 777. If the upgrade directory does not exist at all it may be sufficient to create it manually.</li>
</ol>
<p>
 <img src="http://sebthom.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=54" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2008. |
<a href="http://sebthom.de/54-solved-wordpress-25-one-click-plugin-update-problem-could-not-create-directory/">Permalink</a> |
<a href="http://sebthom.de/54-solved-wordpress-25-one-click-plugin-update-problem-could-not-create-directory/#comments">36 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/54-solved-wordpress-25-one-click-plugin-update-problem-could-not-create-directory/&amp;title=[Solved] WordPress 2.5 One-Click Plug-in Upgrades &#8211; Could not create directory">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/bug/" rel="nofollow tag">bug</a>, <a href="http://sebthom.de/tag/php/" rel="nofollow tag">PHP</a>, <a href="http://sebthom.de/tag/wordpress/" rel="nofollow tag">Wordpress</a>, <a href="http://sebthom.de/tag/workaround/" rel="nofollow tag">workaround</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/54-solved-wordpress-25-one-click-plugin-update-problem-could-not-create-directory/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>MyPad v1.1.6 &#8211; a PHP Editor</title>
		<link>http://sebthom.de/23-mypad-php-editor/</link>
		<comments>http://sebthom.de/23-mypad-php-editor/#comments</comments>
		<pubDate>Mon, 26 Jul 2004 19:26:49 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[My Freeware]]></category>
		<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://sebthom.de/2007/09/mypad-v116-langenalangenlangdeeinlangde-php-editor-03072004/</guid>
		<description><![CDATA[MyPad is a very compact PHP Editor. I developed this editor because I could not find a suitable PHP Editor with a Single Document Interface. The Editor I was searching for should look and behave like Notepad, but should be able to colorize PHP source code. Such a small Editor can be perfectly used in [...]]]></description>
			<content:encoded><![CDATA[<p>MyPad is a very compact PHP Editor. I developed this editor because I could not find a suitable PHP Editor with a Single Document Interface.<br />
The Editor I was searching for should look and behave like Notepad, but should be able to colorize PHP source code.<br />
Such a small Editor can be perfectly used in conjunction with a norton commander like filemanager.</p>
<p>(...)<br/>Read the rest of <a href="http://sebthom.de/23-mypad-php-editor/">MyPad v1.1.6 &#8211; a PHP Editor</a> (123 words)</p>
<hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2004. |
<a href="http://sebthom.de/23-mypad-php-editor/">Permalink</a> |
<a href="http://sebthom.de/23-mypad-php-editor/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/23-mypad-php-editor/&amp;title=MyPad v1.1.6 &#8211; a PHP Editor">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/bug/" rel="nofollow tag">bug</a>, <a href="http://sebthom.de/tag/freeware/" rel="nofollow tag">My Freeware</a>, <a href="http://sebthom.de/tag/php/" rel="nofollow tag">PHP</a>, <a href="http://sebthom.de/tag/visual-basic/" rel="nofollow tag">Visual Basic</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/23-mypad-php-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

