-
-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse error on "update.php" at installation of Semantic MediaWiki #4148
Comments
### Issue
after installing SMW correctly with composer, I run update.php form the
manitenance directory and I get the message : Parse error: syntax error,
unexpected '?' in /home/.../maintenance/update.php on line 254
Well, if you look at the mentioned line you'll find `??` and as far as
I remember that is an issue in MediaWiki that relates to the used
syntax.
For details, see [0, 1] where it has been noted "... A user reported
in #mediawiki today with this exact situation (using php 7.1 but his
webhoster had php cli symlinked to to php56)."
@kghbln Given that users are hitting this issue, I think it is time to
see to it that this is backported soonish and have a MW 1.33.1
release.
[0] https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/522095/
[1] https://phabricator.wikimedia.org/T213893#5320412
…On 7/16/19, henrigilabert ***@***.***> wrote:
### Setup and configuration
- SMW version: 3.0.2
- MW version:1.33.0
- PHP version:7.1.30
- DB system (MySQL, Blazegraph, etc.) and version: MySQL 5.6.40-84
_Note that it is **required** to provide the setup and configuration
information. If you believe to have detected a regression after updating
your software please also provide information about your previous setup as
well. **In any case only this information will enable us to allocate
appropriate review time.** Thank you for you help._
### Issue
after installing SMW correctly with composer, I run update.php form the
manitenance directory and I get the message : Parse error: syntax error,
unexpected '?' in /home/.../maintenance/update.php on line 254
### Stack trace
Produces a [stack
trace](https://www.semantic-mediawiki.org/wiki/Help:Identifying_bugs) and/or
outputs:
```
Placeholder for the stack trace or code!
```
### Steps to reproduce
_It is recommend to use the
[sandbox](https://sandbox.semantic-mediawiki.org) to demonstrate the
observed issue, otherwise provide us with a simple reproducible use case._
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#4148
|
I have created a back-port of one of the commits. Let's see what happens. Anyways I am pretty sure that we will not see a new MW release soon. This is just the way it is. |
Thank you for your help, I've applied corrections suggested, the script update.php lokks ok... but now I have Parse error: syntax error, unexpected '?' in /home/.../maintenance/Maintenance.php on line 882. |
@henrigilabert I believe your hoster has to remove PHP 5.6 from the system. The change will only give you a graceful failure the issue will persist no matter what you do. |
According to mediawiki info the PHP version is 7.1.30
Cordialement, - Best regards - Mit freundlichen Grüßen - Met vriedelijke groeten - Saludos - Salut - Hälsningar - Ciao
Tél. 06.75.23.84.11 email henri.gilabert@sla.lu<mailto:henri.gilabert@sla.lu>
Henri GILABERT
|
I am not sure if you read the linked information. |
I did and I double checked the PHP version of the hoster, see below
[cid:image001.jpg@01D53BE8.FCF788F0]
Cordialement, - Best regards - Mit freundlichen Grüßen - Met vriedelijke groeten - Saludos - Salut - Hälsningar - Ciao
Tél. 06.75.23.84.11 email henri.gilabert@sla.lu<mailto:henri.gilabert@sla.lu>
Henri GILABERT
|
I created a help page for this |
update.php lokks ok... but now I have Parse error: syntax error, unexpected
'?' in /home/.../maintenance/Maintenance.php on line 882.
the line of code in the script is : $this->setParam( $options, $bits[0],
$bits[1] ?? 1 );
Again, this is a syntax related issue because MW 1.33 requires "...
requires PHP 7.0.13 or later." [0] but somehow your PHP linked library
uses anything but PHP 7 even though `Special:Version` shows 7.1*.
Whether you have SMW installed or not, this issue will remain as long
as your hosting provider is linking to an unsupported PHP.
Details about the `??` (Null coalescing operator) can be found at [1].
[0] https://github.com/wikimedia/mediawiki/blob/REL1_33/RELEASE-NOTES-1.33#L485-L488
[1] https://www.php.net/manual/en/migration70.new-features.php
…On 7/16/19, henrigilabert ***@***.***> wrote:
Thank you for your help, I've applied corrections suggested, the script
update.php lokks ok... but now I have Parse error: syntax error, unexpected
'?' in /home/.../maintenance/Maintenance.php on line 882.
the line of code in the script is : $this->setParam( $options, $bits[0],
$bits[1] ?? 1 );
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#4148 (comment)
|
After reading your help page I’ve checked the command line php version and… it is version 5.6.40
There is nothing I can do ?
Cordialement, - Best regards - Mit freundlichen Grüßen - Met vriedelijke groeten - Saludos - Salut - Hälsningar - Ciao
Tél. 06.75.23.84.11 email henri.gilabert@sla.lu<mailto:henri.gilabert@sla.lu>
Henri GILABERT
|
What about contacting your hoster about this? I have already suggested this. |
I got an answer from the hoster : the command line has to pb php71 to have it running php 7.1
Now the issue is fixed but I have an other problem from update.php telling me that my composer.lock is not up to date
Cordialement, - Best regards - Mit freundlichen Grüßen - Met vriedelijke groeten - Saludos - Salut - Hälsningar - Ciao
Tél. 06.75.23.84.11 email henri.gilabert@sla.lu<mailto:henri.gilabert@sla.lu>
Henri GILABERT
|
Have you considered looking at our troubleshooting page? |
Setup and configuration
Issue
After installing SMW correctly with composer, I run update.php form the manitenance directory and I get the message :
Parse error: syntax error, unexpected '?' in /home/.../maintenance/update.php on line 254
The text was updated successfully, but these errors were encountered: