Skip to content
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

Upgrade error - PHP Parse error: syntax error, unexpected ')', expecting '(' #1892

Closed
wirerydr opened this issue Sep 3, 2017 · 3 comments
Closed

Comments

@wirerydr
Copy link

wirerydr commented Sep 3, 2017

NOTE: This issue may appear similiar to #1856, and in-fact it is the same problem. That other issue was specific to upgrading from one development commit to another. Since it didn't involve any released versions and therefore wouldn't impact many people, I closed it.

This report is more general - it is an attempt to upgrade from (what I think is) the latest released version (master commit 11fb31e) to any development commit after cdf1327. I'm worried this may illustrate what might happen when the next version of TeamPass is released and everyone tries to upgrade to it.

Steps to reproduce

  1. Complete a fresh install of the most recent master commit (11fb31e, on 2017-Jul-27), either from the release ZIP file or from a cloned repo (I tried both).
  2. Log into the fresh install as administrator (after manually deleting install/) to verify the install was good.
  3. Start an upgrade to any development commit after cdf1327. I have tried several commits, including 6bb32ae, the latest as of 2017-Sep-02.
  4. Continue the upgrade until Step 5 - Miscellaneous is reached.
  5. Provide the current SK directory, and click <LAUNCH>

Expected behaviour

The step should complete successfully, after-which it should become possible to click <NEXT> to move to the next step.

Actual behaviour

As shown in the screenshot below, Please wait... appears with a spinning icon which then halts. Repeatedly clicking <LAUNCH> repeats these results. The following error appears in the Apache log each time:

[Sun Sep 03 01:28:34.000420 2017] [php7:notice] [pid 6878] [client 192.168.240.120:53004] PHP Parse error:  syntax error, unexpected ')', expecting '(' in /opt/teampass/teampass__TEST__20170902-6bb32ae/includes/config/tp.config.php on line 4, referer: https://www.example.com/tptest/install/upgrade.php

Failure Screenshot

image

DB Table _misc

I think you mentioned earlier that this problem might occur if the misc table had been emptied. After observing the failure my misc table contains 119 rows. Here's the first page:
image

Server configuration

Operating system: Fedora 26 (x86_64)

Web server: Apache 2.4

Database: MariaDB 10.1

PHP version: 7.1

Teampass version: master commit 11fb31e, upgrading to anything after cdf1327.

Teampass configuration file:

<?php
global $SETTINGS;
$SETTINGS = array
);

Updated from an older Teampass or fresh install: Updated

nilsteampassnet added a commit that referenced this issue Sep 3, 2017
Code review regarding #1892
@wirerydr
Copy link
Author

wirerydr commented Sep 6, 2017

Tested this by upgrading from most recent master release 11fb31e to latest development commit a2214c1. Was successfully able to get past the Step 5 - Miscellaneous screen, and complete the installation. Successfully logged into Teampass (with one caveat - see NOTE below) with administrator credentials.

I am unsure if you are finished with your code-review regarding this issue, so I am leaving it open for your final decision.

NOTE

The install/ directory was not automatically removed by the upgrade process. My first attempt to log in after completing the upgrade failed with a displayed warning about this. After I manually deleted it, I was able to successfully log in. If you want, let me know and I will raise and document a new issue about this.

@nilsteampassnet
Copy link
Owner

Thank you @wirerydr

I'm still working on it and need to perform some more tests and code review before closing.
I didn't notice that the install folder was not deleted on first home page opening.

nilsteampassnet added a commit that referenced this issue Sep 7, 2017
Fix for #1892 (remove install/ on upgrade)
@nilsteampassnet
Copy link
Owner

I think this point is now closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants