Hello Folks,
I have just updated our wiki from LTS version 1.23.14 to 1.23.15 and hit a problem. Although I seem to have found the cause, I thought I would write this in case anyone is interested.
I downloaded :
https://releases.wikimedia.org/mediawiki/1.23/mediawiki-1.23.15.tar.gz
Unpacked, copied settings, images etc. , ran the maintenance/update.php script, all seemed well.
But accessing the wiki gave me an error :
"Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /homepages/44/d450433756/htdocs/mediawiki-1.23.15/vendor/param-processor/param-processor/DefaultConfig.php on line 24"
Going back to (on disk) .14 worked (thank goodness).
Looking more closely, I could see that "vendor" is not a folder in the MW source but seems to come from PHP "Composer.phar". I use "Composer" because it is the recommended way to update the SubPageList extension per :
https://github.com/JeroenDeDauw/SubPageList/blob/master/doc/INSTALL.md
So I run :
php5.5 composer.phar self-update php5.5 composer.phar update
and this pulls in the SubPageList extension and creates the "vendor" folder.
To get the wiki working again, I reinstalled but did NOT use Composer to get the SubPageList extension (or anything).
Maybe there is a problem with Composer (at least the updated version) and MW 1.23.15? I am very happy that the wiki is running again and using .15.
Cheers,
Hi,
On 08/24/2016 07:59 AM, Alastair Sherringham wrote:
"Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /homepages/44/d450433756/htdocs/mediawiki-1.23.15/vendor/param-processor/param-processor/DefaultConfig.php on line 24"
php5.5 composer.phar self-update php5.5 composer.phar update
What version of PHP is your webserver using? You are using PHP5.5 to run composer, so it downloads the latest version of param-processor that is compatible with PHP5.5. However it seems your web server is not running 5.5 apparently, so it fatals.
If you don't have the same version of PHP installed for CLI usage as your webserver, you can fake it by using https://getcomposer.org/doc/06-config.md#platform.
-- Legoktm
Hello,
Thanks for the reply.
I am not sure what version of Apache is used (I do not have permission to see a lot).
A "HEAD" tells me :
Server: Apache X-Powered-By: PHP/5.5.38
and a phpinfo() shows :
PHP version 5.5.38 CGI/FastCGI
but "SERVER_SOFTWARE" is just "Apache" - so not sure what version.
Everything looks like PHP 5.5 though but it could be something along the lines you mention.
Cheers,
Alastair
On Wed, Aug 24, 2016, at 10:22 PM, Legoktm wrote:
Hi,
On 08/24/2016 07:59 AM, Alastair Sherringham wrote:
"Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /homepages/44/d450433756/htdocs/mediawiki-1.23.15/vendor/param-processor/param-processor/DefaultConfig.php on line 24"
php5.5 composer.phar self-update php5.5 composer.phar update
What version of PHP is your webserver using? You are using PHP5.5 to run composer, so it downloads the latest version of param-processor that is compatible with PHP5.5. However it seems your web server is not running 5.5 apparently, so it fatals.
If you don't have the same version of PHP installed for CLI usage as your webserver, you can fake it by using https://getcomposer.org/doc/06-config.md#platform.
-- Legoktm
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Don't forget to check the command line version for comparison
On Thursday, August 25, 2016, Legoktm legoktm.wikipedia@gmail.com wrote:
Hi,
On 08/25/2016 01:49 AM, Alastair Sherringham wrote:
I am not sure what version of Apache is used (I do not have permission to see a lot).
Sorry, I meant the PHP your webserver is running. You can visit Special:Version on your wiki and it'll tell you.
-- Legoktm
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Thanks. Yes, I forgot about Special:Version. It says :
MediaWiki : 1.23.15 PHP : 5.5.38 (cgi-fcgi)
On the command line I get :
$ php5.5 --version PHP 5.5.38 (cgi-fcgi) (built: Jul 25 2016 08:25:16)
$ php5.5-cli --version PHP 5.5.38 (cli) (built: Jul 25 2016 08:25:07)
(php5 gives me "PHP 5.2.17 (cgi-fcgi)" but I don't think I've ever used that on the CLI)
Maybe I used "php5.5-cli" with Composer (I don't recall)? Would that cause a problem?
Anyway, this is something I had not thought about previously at all - and I have been updating between each LTS release without problems. Now I know to be careful.
Cheers, Alastair
On Thu, Aug 25, 2016, at 10:16 PM, Legoktm wrote:
Hi,
On 08/25/2016 01:49 AM, Alastair Sherringham wrote:
I am not sure what version of Apache is used (I do not have permission to see a lot).
Sorry, I meant the PHP your webserver is running. You can visit Special:Version on your wiki and it'll tell you.
-- Legoktm
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org