WordPress 2.6 and the Text/Diff fatal errors
codestyling | 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:
wp-includes
| +- pluggable.php
| +- wp-diff.php
+- Text
+- Diff.php
+- Diff
+- Renderer
+- inline.php
Any Feedback or criticism would be appreciated.






David Blacker
24.07.2008 | 05:48THANK YOU SOOOOOOOOOOO MUCH!!!!
EVERYTHING IS WORKING NOW!
reply »
PietroSkanta
24.07.2008 | 11:31Everything is working for me too!
Thank you very much!
reply »
Helran
24.07.2008 | 17:20Thank you
Now that’s working !
reply »
cyp
26.07.2008 | 21:00MERCI !
It works great ! You saved my day.
I am just migrating my old Dotclear blog towards WP 2.6 and everything went fine, except for this frustrating bug.
THANK YOU !
reply »
Turi
27.07.2008 | 14:44YOU’RE GREAT!!!! YOU ROCK XD
It work properly….words of a sicilian boy!
reply »
Ani
28.07.2008 | 00:49Thank you. You saved me
reply »
Andreas Hörl
28.07.2008 | 16:44Thanks a lot, this patch works also for the WP version 2.6 with the german theme installed.
Greetings from Austria.
reply »
Erik Toolanen
29.07.2008 | 07:59Big ups!
reply »
Morkai
29.07.2008 | 14:26Thank you, patch works fine!
Greetings from Italy.
reply »
RamziD
29.07.2008 | 14:43Thanks a lot ! your patch solved the mysterious error messages I was receiving
reply »
Nico
01.08.2008 | 20:06Sorry, this still isn’t working on my site, I’m still receiving the following error:
Warning: main(Text/Diff.php) [function.main]: failed to open stream: No such file or directory in /home/plutonic/public_html/blog/wp-includes/wp-diff.php on line 4Warning: main(Text/Diff.php) [function.main]: failed to open stream: No such file or directory in /home/plutonic/public_html/blog/wp-includes/wp-diff.php on line 4
Fatal error: main() [function.require]: Failed opening required ‘Text/Diff.php’ (include_path=’.:/home/plutonic/public_html/blog/wp-includes’) in /home/plutonic/public_html/blog/wp-includes/wp-diff.php on line 4
Any suggestions? (Yes, the e-mail address is real and will work.) Thanks!
reply »
codestyling
02.08.2008 | 12:53It seems, that your wp-diff.php is the old one not replaced by those contained at patch. It should report line 5 in new one, if there would be an additional issue instead of line 4, which the old one reports.
Please check the files you have hopefully uploaded.
reply »
milan
05.08.2008 | 12:54Hi, I have still same problem. I have upload this patch, but I’m receiving new error:
Warning: require() [function.require]: Unable to access /backups/www/www_spravcesiti_net/wp-includes/Text/Diff/Renderer.php in /backups/www/www_spravcesiti_net/wp-includes/wp-diff.php on line 6
Warning: require(/backups/www/www_spravcesiti_net/wp-includes/Text/Diff/Renderer.php) [function.require]: failed to open stream: No such file or directory in /backups/www/www_spravcesiti_net/wp-includes/wp-diff.php on line 6
…
Warning: require() [function.require]: Unable to access /backups/www/www_spravcesiti_net/wp-includes/Text/Diff/Renderer.php in /backups/www/www_spravcesiti_net/wp-includes/wp-diff.php on line 6
…
Warning: require(/backups/www/www_spravcesiti_net/wp-includes/Text/Diff/Renderer.php) [function.require]: failed to open stream: No such file or directory in /backups/www/www_spravcesiti_net/wp-includes/wp-diff.php on line 6
…
Fatal error: require() [function.require]: Failed opening required ‘/backups/www/www_spravcesiti_net/wp-includes/Text/Diff/Renderer.php’ (include_path=’.') in /backups/www/www_spravcesiti_net/wp-includes/wp-diff.php on line 6
reply »
codestyling
05.08.2008 | 13:08The system tries to load the needed files at backups/www/www_spravcesiti_net/wp-includes/wp-diff.php but can’t find the required file /backups/www/www_spravcesiti_net/wp-includes/Text/Diff/Renderer.php.
It seems, that you System runs FreeBSD (your Apache reports this). So it makes a great difference, if you have written (or uploaded) the path names in lowercase or as expected in capitalized manner as shipped by WP itself.
Please check the folder names below (and inclusive) wp-include/Text to be Text instead of text and all below affected. Unix makes a difference between upper/lowercase writing of Path names.
reply »
Milan Tuček
05.08.2008 | 16:04Dear codestyling,
all files below folder Text has been Capitalized. I have uploaded again original WP folder Text, then Your patch, and now it’s working! Thanks, und danke shon
But I have furher one qustion:
A have set up UPLOAD folder for media ‘wp-content/media/’. But after reinstalling WP 2.6 integrated wysiwyg editor don’t working correctly. - Wysiwyg Media library is empty and when i try upload new file/picture by button “choose files to upload”, file is uploaded to wp-content/uploads. But folder uploads don’t exist and uploaded file on server also don’t exist.
Thx for Your support and help,
Milan
reply »
codestyling
05.08.2008 | 16:12This seems to be this one bug inside WP2.6: Press This sideloader fixes and wp_handle_upload fixes
reply »
Milan Tuček
05.08.2008 | 18:07Super, issue is just gone! Thanks!
reply »
jespejo
01.08.2008 | 21:13Muchas gracias!
reply »
Richard Kacerek
03.08.2008 | 17:52Oh, wow that works!
reply »
impulse
03.08.2008 | 19:06bedankt! thank you, works perfect.
reply »
Jose
04.08.2008 | 20:26Fantástico! muchas gracias!
Dios te lo pague.!
reply »
carlo
05.08.2008 | 15:03Great!!!
You are the only that have solved this problem… thank you!
reply »
Libor
07.08.2008 | 00:07Hello,
I want to kindly ask for your help too. I replaced all files as suggested but the result is this? I am not really the IT guy so I have no idea where to start finding the problem. Thank you in advance.
Warning: require() [function.require]: Unable to access /home/ftponly/usr/gamiload/web/wp-includes/Text/Diff/Renderer.php in /home/ftponly/usr/gamiload/web/wp-includes/wp-diff.php on line 6Warning: require(/home/ftponly/usr/gamiload/web/wp-includes/Text/Diff/Renderer.php) [function.require]: failed to open stream: No such file or directory in /home/ftponly/usr/gamiload/web/wp-includes/wp-diff.php on line 6
Fatal error: require() [function.require]: Failed opening required ‘/home/ftponly/usr/gamiload/web/wp-includes/Text/Diff/Renderer.php’ (include_path=’.') in /home/ftponly/usr/gamiload/web/wp-includes/wp-diff.php on line 6
reply »
codestyling
07.08.2008 | 00:22It seems to be the same issue Milan had several comments backwards. He solved it by again uploading the original complete Text folder and 2nd upload the patched files overwriting the affected original.
I assume a broken FTP transfer, which is in a lot of cases the reason for errors. Please try this first. Also have a look at my answer above and the words about capitalized folder names.
reply »
Thu gian
08.08.2008 | 12:13Oh, great article
Thank you so much
Good luck to you
reply »
Parlottes
09.08.2008 | 18:44Fine !
Merci beaucoup pour la solution !
reply »
Perspectie
10.08.2008 | 21:18Thanks, very useful!
Who wanted the post revision history tracking anyway? A setting to limit the number of kept revisions (default 0) should have been better. Request this for 2.7?
reply »
codestyling
10.08.2008 | 21:28Sure, the installation should initially ask, if any revisions should be supported. Currently i work on a huge WP sparetime project to be released next week (hope so). After this i will inspect the revision feature more specific to find a better way avoid any revisions written. But my current time line is very restricted.
WP provides already at 2.6 a constant to be set at wp-config.php but it doesn’t disable the code execution even if no more revisions been shown.
define('WP_POST_REVISIONS', 0);reply »
Misutsu
12.08.2008 | 12:02Awesome !
Thank you !
reply »
conte
12.08.2008 | 13:23thanks a lot man!!! you rule.
greetings from italy.
ciao
reply »
Mariosos
20.08.2008 | 23:57Hey man - thank you very much for your bugfix.
Greets from Bavaria
reply »
raffaele
24.08.2008 | 13:03i have fixed this bug in another and very simple way!!!
You can see it in my website:
Click Here
reply »
codestyling
24.08.2008 | 13:14There are many ways to fix it. WordPress V2.6.1 already contains a fix therefore based on my error report at WP Trac and seems to use your suggestion. During development i like more self detecting code which enables the fact, that folders can be renamed, moved or something in this way. Thatswhy this self detecting apporach.
reply »
عاشق الصداقه
28.08.2008 | 12:42really , Very Thanks To You
The Error Gone
حقيقه : شكراً جزيلاً لك .. لقد ذهب الخطأ فعلاً
تحيتى وحبى وتقديرى
reply »
Wordghost
28.08.2008 | 22:28Thanks so much! You made my day
reply »
Fabiano Rangel
02.09.2008 | 12:44Great post!
Thank you very much!
from Brazil
reply »
Roberto
09.10.2008 | 19:33Thanks!!!!!!! You saved my Blog!!!
reply »
DrDaveHPP
11.10.2008 | 08:26Lifesaver! Many thanks - this was doing my head in.
reply »
Amy
16.11.2008 | 03:09Thank you very much!!!
reply »
tomO
23.11.2008 | 13:25i uploaded the files and now my error looks like:
*
Warning: Text_Diff::require_once(Text/Diff/Engine/native.php) [function.Text-Diff-require-once]: failed to open stream: No such file or directory in /home/osinski/public_html/rap-trojmiasto/wp-includes/Text/Diff.php on line 52
Fatal error: Text_Diff::require_once() [function.require]: Failed opening required ‘Text/Diff/Engine/native.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/osinski/public_html/rap-trojmiasto/wp-includes/Text/Diff.php on line 52
:/
HELP PLZ
reply »
Mubera
05.12.2008 | 05:41Thank you so much….great post and it did work after reinstalling original Text file and rewriting with your patch.
reply »
Mixa
20.01.2009 | 15:09Я маю цю проблему в 2.6.5! Скажіть, чи коректно буде використати ваш патч в даному випадку?
(2 comments merged, eng: I have this problem in 2.6.5! Tell me, if properly use a patch in this case? )
reply »
codestyling
20.01.2009 | 15:35As monitored at my bugfix page the Ticket 7391 should be fixed since 2.6.1 version of WordPress based on my suggestion and patch.
If the error still occures at your 2.6.5 version, some other reasons may be behind. A deeper analysis will be required and a crash trace (full errors) may be needed to find out what’s your specific reason.
reply »
monix
07.02.2009 | 15:37you saved my day!!!
for me too, worked perfectly!
thanks very much!!!
reply »
James Anthony
06.05.2009 | 09:46Hi there i m using Wordpres 2.7.1 i got this error appeared when i open my site
Warning: require_once(../wp-load.php) [function.require-once]: failed to open stream: No such file or directory in /home/admin565/public_html/discoverblack/wp-admin/update-links.php on line 16
Fatal error: require_once() [function.require]: Failed opening required ‘../wp-load.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/admin565/public_html/discoverblack/wp-admin/update-links.php on line 16
please help me out this erroe
reply »
codestyling
08.05.2009 | 22:27This seems to be a problem of your folder hierarchy. Your provider seems not to allow relative path names like ../wp-load.php at your domain. Please ask your provider, if he supports require calls of relative path and file names.
reply »
James Anthony
14.05.2009 | 16:10Thanks man.. i sent this msg to support let c when they will fix it..
thanks again
James
reply »
Chris
29.06.2009 | 13:02Many thanks for this, works perfectly and cured my headache!
reply »
Michael J
27.02.2010 | 04:54Cool, I’m using 2.6 and don’t want update new version.
reply »