Code Styling Project

It’s not a bug, it’s always a feature.
  • Deutsch
  • English
  • rss
  • Home
  • Blog
  • Imprint
  • Development
  • Manuals
  • Bugfixing

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.

Categories
English, WordPress (US)
Comments rss
Comments rss

« WordPress error during translation file usage - the reason WordPress 2.6.1 loads too many script.aculo.us components »

49 responses    Leave a comment

David Blacker

David Blacker

24.07.2008 | 05:48

THANK YOU SOOOOOOOOOOO MUCH!!!!

EVERYTHING IS WORKING NOW!

reply »

PietroSkanta

PietroSkanta

24.07.2008 | 11:31

Everything is working for me too!

Thank you very much! :D

reply »

Helran

Helran

24.07.2008 | 17:20

Thank you :)
Now that’s working !

reply »

cyp

cyp

26.07.2008 | 21:00

MERCI !

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

Turi

27.07.2008 | 14:44

YOU’RE GREAT!!!! YOU ROCK XD

It work properly….words of a sicilian boy! ;-)

reply »

Ani

Ani

28.07.2008 | 00:49

Thank you. You saved me ;-)

reply »

Andreas Hörl

Andreas Hörl

28.07.2008 | 16:44

Thanks a lot, this patch works also for the WP version 2.6 with the german theme installed.
Greetings from Austria.

reply »

Erik Toolanen

Erik Toolanen

29.07.2008 | 07:59

Big ups!

reply »

Morkai

Morkai

29.07.2008 | 14:26

Thank you, patch works fine!
Greetings from Italy.

reply »

RamziD

RamziD

29.07.2008 | 14:43

Thanks a lot ! your patch solved the mysterious error messages I was receiving ;)

reply »

Nico

Nico

01.08.2008 | 20:06

Sorry, 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 4

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 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

codestyling

02.08.2008 | 12:53

It 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

milan

05.08.2008 | 12:54

Hi, 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

codestyling

05.08.2008 | 13:08

The 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

Milan Tuček

05.08.2008 | 16:04

Dear 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

codestyling

05.08.2008 | 16:12

This seems to be this one bug inside WP2.6: Press This sideloader fixes and wp_handle_upload fixes

reply »

Milan Tuček

Milan Tuček

05.08.2008 | 18:07

Super, issue is just gone! Thanks! :-)

reply »

jespejo

jespejo

01.08.2008 | 21:13

Muchas gracias!

reply »

Richard Kacerek

Richard Kacerek

03.08.2008 | 17:52

Oh, wow that works!

reply »

impulse

impulse

03.08.2008 | 19:06

bedankt! thank you, works perfect.

reply »

Jose

Jose

04.08.2008 | 20:26

Fantástico! muchas gracias!
Dios te lo pague.!

reply »

carlo

carlo

05.08.2008 | 15:03

Great!!!
You are the only that have solved this problem… thank you!

reply »

Libor

Libor

07.08.2008 | 00:07

Hello,

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 6
Warning: 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

codestyling

07.08.2008 | 00:22

It 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

Thu gian

08.08.2008 | 12:13

Oh, great article
Thank you so much
Good luck to you

reply »

Parlottes

Parlottes

09.08.2008 | 18:44

Fine !
Merci beaucoup pour la solution !

reply »

Perspectie

Perspectie

10.08.2008 | 21:18

Thanks, 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

codestyling

10.08.2008 | 21:28

Sure, 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

Misutsu

12.08.2008 | 12:02

Awesome !

Thank you !

reply »

conte

conte

12.08.2008 | 13:23

thanks a lot man!!! you rule.
greetings from italy.
ciao

reply »

Mariosos

Mariosos

20.08.2008 | 23:57

Hey man - thank you very much for your bugfix.

Greets from Bavaria

reply »

raffaele

raffaele

24.08.2008 | 13:03

i have fixed this bug in another and very simple way!!!

You can see it in my website:
Click Here

reply »

codestyling

codestyling

24.08.2008 | 13:14

There 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:42

really , Very Thanks To You
The Error Gone :)
حقيقه : شكراً جزيلاً لك .. لقد ذهب الخطأ فعلاً
تحيتى وحبى وتقديرى

reply »

Wordghost

Wordghost

28.08.2008 | 22:28

Thanks so much! You made my day :)

reply »

Fabiano Rangel

Fabiano Rangel

02.09.2008 | 12:44

Great post!
Thank you very much!
from Brazil

reply »

Roberto

Roberto

09.10.2008 | 19:33

Thanks!!!!!!! You saved my Blog!!!

reply »

DrDaveHPP

DrDaveHPP

11.10.2008 | 08:26

Lifesaver! Many thanks - this was doing my head in.

reply »

Amy

Amy

16.11.2008 | 03:09

Thank you very much!!!

reply »

tomO

tomO

23.11.2008 | 13:25

i 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

Mubera

05.12.2008 | 05:41

Thank you so much….great post and it did work after reinstalling original Text file and rewriting with your patch.

reply »

Mixa

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

codestyling

20.01.2009 | 15:35

As 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

monix

07.02.2009 | 15:37

you saved my day!!!
for me too, worked perfectly!

thanks very much!!!

reply »

James Anthony

James Anthony

06.05.2009 | 09:46

Hi 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

codestyling

08.05.2009 | 22:27

This 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

James Anthony

14.05.2009 | 16:10

Thanks man.. i sent this msg to support let c when they will fix it..

thanks again
James

reply »

Chris

Chris

29.06.2009 | 13:02

Many thanks for this, works perfectly and cured my headache! :-)

reply »

Michael J

Michael J

27.02.2010 | 04:54

Cool, I’m using 2.6 and don’t want update new version.

reply »

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Navigation

  • Common
  • jQuery at WordPress
  • WordPress (US)

Search

Newer Posts ...

  • How to use Wordpress Metaboxes at own plugins
  • PHP function setlocale() … and numbers can be damaged
  • WordPress Localization - Features and future Development
  • WordPress Category Tree Chaos at “Write Posts”
  • WordPress 2.6.1 loads too many script.aculo.us components

Older Posts ...

  • WordPress error during translation file usage - the reason
  • WordPress 2.5.1 - multi-lingual admin login (beta download)
  • WordPress 2.5.1 multi-lingual (1 of 3)
  • 3rd relaunch of this domain
rss Comments rss valid xhtml 1.0 design by jide powered by Wordpress get firefox