I can not run update.php, I did it php5 update.php as well. It gives me : "parse error, unexpected T_ARRAY, expecting '&' or T_VARIABLE in .../w/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php on line 221"
MediaWiki 1.16.0, PHP 5.2.9 (cgi), MySQL 5.0.91mm-log, Semantic MediaWiki (Version 1.5.1.1)
/** * Formats an array of message strings so that it appears as a tooltip. * $icon should be one of: 'warning' (default), 'info'. * * @param array $messages * @param string $icon Acts like an enum. Callers must ensure safety, since this value is used directly in the output. * @param string $seperator * * @return string */ Line221: "function smwfEncodeMessages( array $messages, $icon = 'warning', $seperator = ' <!--br-->' ) { if ( count( $messages ) > 0 ) { SMWOutputs::requireHeadItem( SMW_HEADER_TOOLTIP ); foreach( $messages as &$message ) $message = htmlspecialchars( $message ); $messageString = implode( $seperator, $messages ); return '<span class="smwttpersist"><span class="smwtticon">' . $icon . '.png</span><span class="smwttcontent">' . $messageString . '</span> </span>'; } else { return ''; } }"
What is wrong? -- Natasha Brown skype: russian_natasha
On Thu, Aug 12, 2010 at 6:06 PM, Natasha Brown learnrussianspeakrussian@gmail.com wrote:
I can not run update.php, I did it php5 update.php as well. It gives me : "parse error, unexpected T_ARRAY, expecting '&' or T_VARIABLE in .../w/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php on line 221"
MediaWiki 1.16.0, PHP 5.2.9 (cgi), MySQL 5.0.91mm-log, Semantic MediaWiki (Version 1.5.1.1)
What does "php -v" output? For me it's
PHP 5.3.2-1ubuntu4.2 with Suhosin-Patch (cli) (built: May 13 2010 20:01:00) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
If it says PHP 4.anything, "php" is the wrong command to use. Ask your host what the correct command is to access PHP5 from the command line. It might be "php5", or something else.
On 13/08/10 08:06, Natasha Brown wrote:
I can not run update.php, I did it php5 update.php as well. It gives me : "parse error, unexpected T_ARRAY, expecting '&' or T_VARIABLE in .../w/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php on line 221"
Line221: "function smwfEncodeMessages( array $messages, $icon = 'warning', $seperator = ' <!--br-->' ) {
Array type hinting is supported in PHP 5.1+. You say you have 5.2.9 but you probably don't, you probably have 5.0. The version you see on the command line doesn't have to be the same as the one it uses for the web.
-- Tim Starling
Tim Starling <tstarling <at> wikimedia.org> writes:
On 13/08/10 08:06, Natasha Brown wrote:
I can not run update.php, I did it php5 update.php as well. It gives me : "parse error, unexpected T_ARRAY, expecting '&' or T_VARIABLE in .../w/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php on line 221"
Line221: "function smwfEncodeMessages( array $messages, $icon = 'warning', $seperator = ' <!--br-->' ) {
Array type hinting is supported in PHP 5.1+. You say you have 5.2.9 but you probably don't, you probably have 5.0. The version you see on the command line doesn't have to be the same as the one it uses for the web.
Thanks Tim and Aryeh,
My hosting have sorted it out! Apparently I had to pay attention to the error that was saying:
Cannot get command line arguments, register_argc_argv is set to false
To resolve the problem they have created a php.ini file with the following line: register_argc_argv = true. After that the update.php script has been executed and completed successfully.
I am grateful for your help and support. I have only started the project because I have read somewhere that it was easy. I have forgot where I have read it, but I am ever so thankful for the person who wrote it: he gave me chance to discover things. I am so impressed with the work that you have done and still doing. I hope that I can be of any use, but I am old and my brain is a bit rusty.
I am lucky with the hosting as well, they have been very patient with me. I can only hope that the next update I will run by myself.
Natasha Brown http://wikiTranslate.org
wikitech-l@lists.wikimedia.org