WordPress 2.6 and the Text/Diff fatal errorscodestyling | 23. July 2008 | 23:43
The current released WordPress Version newly introduces the feature of revision history tracking and management. It is able to displays differences across revisions visual too.
But the initial developer ignores the fact, that serveral provider doesn’t permit to use the PHP function ini_set() - in this case for temporary change of PHP include_path. Moreover those provider may completely disable usage of ini_set() function at all. But this results in half generated Editing Pages or complete empty (white) pages if at least the 2nd revision will be created.
If your provider shows errors you may find this well known fatal error result:
Warning: ini_set() has been disabled for security reasons in /srv/www/httpd/phost/l/de/pytalhost/laz/web/wordpress/wp-includes/pluggable.php on line 1517 Warning: require_once(Text/Diff/Renderer.php) [function.require-once]: failed to open stream: No such file or directory in /srv/www/httpd/phost/l/de/pytalhost/laz/web/wordpress/wp-includes/Text/Diff/Renderer/inline.php on line 17 Fatal error: require_once() [function.require]: Failed opening required 'Text/Diff/Renderer.php' (include_path='.:/srv/www/httpd/phost/l/de/pytalhost/laz/web') in /srv/www/httpd/phost/l/de/pytalhost/laz/web/wordpress/wp-includes/Text/Diff/Renderer/inline.php on line 17
I installed a brand new WordPress 2.6 version at my local XAMPP testing environment and also disabled the usage of ini_set() function related to manipulate the value ‘include_path‘. Immediately this error occures at my article or page editing sites, the case was successful reproduced! At this point i walked through all related files and changed any affected file to work without dependency on ini_set() function and temporary change of include_path.
Here now follows the patch set containing 4 changed files. It supports the newly introduced feature without ini_set() usage. The require calls now evalute from __FILE__ constant the correct path of needed files. This patch has been tested at my machine and also provider and will be submitted to WP Bug Trac asap. For those of you affected by this bug i provide here the patch set for WP 2.6.0 version as download as long as it has not been qualified patch at WP itself. Please replace the files at your affected domain with corresponding files out of patch set and your errors will be gone.
WP 2.6.0 Text/Diff: wp-includes-WP-2.6.0.zip
(replaces all affected file at version WP 2.6.0)
Here comes the simple tree view of changed (affected) files:
| +- pluggable.php
| +- wp-diff.php
Any Feedback or criticism would be appreciated.