https://bugzilla.wikimedia.org/show_bug.cgi?id=35008

Sam Sexton <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |

--- Comment #5 from Sam Sexton <[email protected]> 2012-03-08 10:59:16 
UTC ---
Hi Sam - I've reviewed the instructions and tried reverting as you suggested,
but still get the same error ...

[7083](root@ntm-igdev02)/usr/local/apache2/htdocs/wiki: grep Syn
LocalSettings.php
# 120305 Added SyntaxHighlight_GeSHi.
# 120305: added SyntaxHighlight_GeSHi:
require_once('extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php');
[7084](root@ntm-igdev02)/usr/local/apache2/htdocs/wiki: cd extensions
10:19
[7085](root@ntm-igdev02)/usr/.../extensions: ls -lR SyntaxHighlight_GeSHi/
SyntaxHighlight_GeSHi/:
total 121
-rw-r--r--   1 daemon   wiki        1757 Jul 23  2008 README
-rw-r--r--   1 daemon   wiki        8320 Mar  6 10:35
SyntaxHighlight_GeSHi.class.php
-rw-r--r--   1 daemon   wiki       44944 Jul 23  2008
SyntaxHighlight_GeSHi.i18n.php
-rw-r--r--   1 daemon   wiki        2828 Jul 23  2008 SyntaxHighlight_GeSHi.php
[7086](root@ntm-igdev02)/usr/.../extensions: cd SyntaxHighlight_GeSHi/
10:19
[7087](root@ntm-igdev02)/usr/.../SyntaxHighlight_GeSHi: tail *class*            
                        wfLoadExtensionMessages( 'SyntaxHighlight_GeSHi' );
                        if( !class_exists( 'GeSHi' ) )
                                require( 'geshi/geshi.php' );
# 120305 Sam Sexton Replaced above with our names and had to add extensions/.
#                               require(
'extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php' );
                        self::$initialised = true;
                }
                return true;
        }
}
[7088](root@ntm-igdev02)/usr/.../SyntaxHighlight_GeSHi: 


I then edited and previewed this page (this is the text copied from the
displayed page):

User:Sam.Sexton/sample.pl
< User:Sam.Sexton
<syntaxhighlight lang="-"></syntaxhighlight> 
<syntaxhighlight lang="perl">
!/bin/perl -w
Sample to demonstrate syntax highlighter
open IN,"/tmp/infile"; $STUFF = (<IN>); close IN; print "I've stuffed myself";
</syntaxhighlight>

and I then get:

    Warning: SyntaxHighlight_GeSHi::require(geshi/geshi.php)
[syntaxhighlight-geshi.require]: failed to open stream: No such file or
directory in
/usr/local/apache2/htdocs/wiki/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php
on line 269

    Fatal error: SyntaxHighlight_GeSHi::require() [function.require]: Failed
opening required 'geshi/geshi.php'
(include_path='/usr/local/apache2/htdocs/wiki:/usr/local/apache2/htdocs/wiki/includes:/usr/local/apache2/htdocs/wiki/languages:.:/php/includes')
in
/usr/local/apache2/htdocs/wiki/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php
on line 269



If I then adjust the require in SyntaxHighlight_GeSHi.class.php to match the
dir and file names, as in the instructions, I just get:

    Fatal error: Class 'GeSHi' not found in
/usr/local/apache2/htdocs/wiki/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php
on line 171

which seems like a step in the right direction to me...?


Here's the line referred to in the error:

   169    private static function prepare( $text, $lang ) {
   170      self::initialise();
   171      $geshi = new GeSHi( $text, $lang );
   172      if( $geshi->error() == GESHI_ERROR_NO_SUCH_LANG )
   173        return null;
   174      $geshi->set_encoding( 'UTF-8' );
   175      $geshi->enable_classes();
   176      $geshi->set_overall_class( "source-$lang" );
   177      $geshi->enable_keyword_links( false );
   178      return $geshi;
   179    }
   180

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to