1
libervis
PukiWikiMod parser error: unexpected T_STRING - what's that?
  • 2004/10/31 4:03

  • libervis

  • Not too shy to talk

  • Posts: 183

  • Since: 2004/7/4 1


Hello.. I just installed PukiWikiMod 0.08, but i am getting this error when trying to enter it's administration:

Parse error: parse error, unexpected T_STRING in /home/libervis/public_html/modules/pukiwiki/language/english/admin.php on line 50

I checked the 50th line of that admin file and i don't se absulotely anything mentioning T_STRING.

The content of it is actually this:

// $Id: admin.php,v 1.5 2003/10/31 12:22:59 nao-pon Exp $
// FIXME: not good at English. :P

define("_AM_WIKI_TITLE0""PukiWikiMod initial setting.");
define("_AM_WIKI_INFO0""In order to carry out initial setting, please access the following two link places and perform processing.");
define("_AM_WIKI_DB_INIT""DataBace initialization.");
define("_AM_WIKI_PAGE_INIT""Page relation initialization.");

define("_AM_WIKI_TITLE1""Preferences");
define("_AM_WIKI_TITLE2""Change Permission");
define("_AM_WIKI_SUBMIT""Submit");
define("_AM_WIKI_ENABLE""enable");
define("_AM_WIKI_DISABLE""disable");
define("_AM_WIKI_NOLEAVE""reject");
define("_AM_WIKI_LEAVE""leave");
define("_AM_WIKI_NONAVI""hide");
define("_AM_WIKI_NAVI""show");

define("_AM_DBUPDATED""The writing to a file was completed.");

define("_AM_WIKI_ERROR01""not writable");

define("_AM_WIKI_DEFAULTPAGE""Default Page");
define("_AM_WIKI_MODIFIER""Modifier");
define("_AM_WIKI_MODIFIERLINK""Modifier's Homepage");
define("_AM_WIKI_FUNCTION_FREEZE""Enable Freeze");
define("_AM_WIKI_ADMINPASS""The password to unfreeze
¡Êtype a new password only when changing it.¡Ë"
);
define("_AM_WIKI_CSS""Styles of page that override default style(This can be useful to change style of PukiWiki pages to fit them your theme)");

define("_AM_WIKI_PERMIT_CHANGE""A directory with the file which wants to change a permission
(Recommended to use this for uninstalling this module onlyBasically chmod to 0666)"
);
define("_AM_WIKI_ANONWRITABLE""Who is permitted to edit pages");
define("_AM_WIKI_HIDE_NAVI""Hide the navigation menu at the top of pages hen frozen (Always shown if Webmasters logged in)");
define("_AM_WIKI_MAIL_SW""Notify by email when edited by");
define("_AM_WIKI_ALL""All users");
define("_AM_WIKI_REGIST""All registered users");
define("_AM_WIKI_ADMIN""Webmasters only");
define("_AM_WIKI_MAIL_ALL""All users");
define("_AM_WIKI_MAIL_NOADMIN""All users except Webmasters");
define("_AM_WIKI_MAIL_NONE""Nobody");

define("_AM_WIKI_FUNCTION_UNVISIBLE""Enable perusal authority for every page.");
define("_AM_WIKI_BACKUP_TIME""The interval of fixed backup.(hour) [every updating at 0]");
define("_AM_WIKI_BACKUP_AGE""Maximum generations of backup.");
define("_AM_WIKI_PCMT_PAGE"'The default of the new creation page name in pcomment plug-in.(Installation page name is set to %s.)');
define("_AM_WIKI_USER_DIR"'The format at the time of the name input in form.(Name at the time of contribution goes into %1$s)ex. [[%1$s>user/%1$s]]When not setting up here, a setup with each plug-in is applied.');
define("_AM_WIKI_FUNCTION_JPREADING""Is kana reading acquisition of the page name by ChaSen and KAKASI confirmed?");
define("_AM_WIKI_KANJI2KANA_ENCODING""The kanji code used for delivery with ChaSen/KAKASI (UNIX systems EUC-JP and Win systems S-JIS is foundations.)");
define("_AM_WIKI_PAGEREADING_CHASEN_PATH""Execution file path of ChaSen (it sets up according to each one of environment);
define("
_AM_WIKI_PAGEREADING_KAKASI_PATH", "Execution file path of KAKASI (it sets up according to each one of environment)");
define("
_AM_WIKI_PAGEREADING_CONFIG_PAGE", "The name of the page which stored page name reading.");
define("
_AM_WIKI_SITE_NAME", "Name of this site's wiki");
define("_AM_WIKI_FUNCTION_TRACKBACK", "Enable TrackBack");
?>


Does anyone has a clue on what could cause such error and how could i fix it.

Thank you
Daniel

2
ackbarr
Re:PukiWikiMod parser error: unexpected T_STRING - what's that?

This is a great example of how to troubleshoot a PHP error. The above php error indicates that the PHP parser was not expecting a string.

Lines 49&50 of the script:
define("_AM_WIKI_PAGEREADING_CHASEN_PATH""Execution file path of ChaSen (it sets up according to each one of environment);
define("
_AM_WIKI_PAGEREADING_KAKASI_PATH", "Execution file path of KAKASI (it sets up according to each one of environment)");

Can any one spot the problem with this code? Those with good eyes will notice that the string on line 49 never ends (Note the missing quotation at the end of the statement).

The error shows up in line 50, because if you do not finish a string on 1 line (line 49) in PHP the parser will keep working until it finds the end of the string (line 50). Errors in php usually occur before the actual error in the code.

The corrected version of the code might look like this:
define("_AM_WIKI_PAGEREADING_CHASEN_PATH""Execution file path of ChaSen (it sets up according to each one of environment)");
define("_AM_WIKI_PAGEREADING_KAKASI_PATH""Execution file path of KAKASI (it sets up according to each one of environment)");

3
libervis
Re:PukiWikiMod parser error: unexpected T_STRING - what's that?
  • 2004/10/31 4:27

  • libervis

  • Not too shy to talk

  • Posts: 183

  • Since: 2004/7/4 1


Thank you very much Ackbarr. That little thing solved the problem..

Thanks
Daniel

4
wcrwcr
Re:PukiWikiMod parser error: unexpected T_STRING - what's that?
  • 2004/10/31 9:54

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Great tip ackbar
It deserves a FAQ?s placement.

May I assume that parse erros in some cases could be due a blank line or a misplaced space?

Regards,
Wilson

Login

Who's Online

420 user(s) are online (55 user(s) are browsing Support Forums)


Members: 0


Guests: 420


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits