1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Upgrade with CLI

Discussion in 'Installation, Upgrade, and Import Support' started by RobParker, Oct 14, 2013.

  1. RobParker

    RobParker Well-Known Member

    I just upgraded with the CLI as it was timing out with the normal way.

    It finished with this:

    Running upgrade to 1.2.0 Beta 4, step 3... done.
    Running upgrade to 1.2.0, step 1... done.
    Rebuilding / importing data...
    Upgrade completed successfully!

    I'm slightly confused though as I was upgrading from 1.1.4 to 1.2.2. Did it get as far as 1.2.2?

    In my ACP it says 1.2.2 at the top...
  2. RobParker

    RobParker Well-Known Member

    Also another problem, because I ran the CLI upgrade as the root user, it's not giving me permission to upgrade styles.

    An exception occurred: file_put_contents(/home/sites/dev.spurscommunity.co.uk/public_html/internal_data/templates/S.1,L.1,alert_post_tag.php): failed to open stream: Permission denied in /home/sites/dev.spurscommunity.co.uk/public_html/library/XenForo/Template/FileHandler.php on line 95

    I assume I need to chown stuff back to being owned by apache?
  3. Mike

    Mike XenForo Developer Staff Member

    Those reflect the steps being run. Not all versions have explicit steps. When you started it, it would've confirmed the version that you were upgrading to.
  4. Mike

    Mike XenForo Developer Staff Member

    Yeah, chown them.
  5. RobParker

    RobParker Well-Known Member

    Current version: 1010570
    Upgrade target: 1020270 (1.2.2)

    I chowned the templates and it got further:

    An exception occurred: file_put_contents(/home/sites/dev.spurscommunity.co.uk/public_html/internal_data/templates/S.9,L.0,account.css.php): failed to open stream: Permission denied in /home/sites/dev.spurscommunity.co.uk/public_html/library/XenForo/Template/FileHandler.php on line 95

    It's written up to the S.8 files but I'm not sure why it's not writing the S.9 files.
  6. Mike

    Mike XenForo Developer Staff Member

    Probably worth chmodding them to 0777. Alternatively, just turn off template files, delete the files and then turn the option back on.

    The problem is that when via CLI, you're running as a different user so our attempt to be smart with chmodding fails (and it also creates them as the wrong user compared to normal execution, as noted).

    You can also workaround this by explicitly specifying chmod values in config.php.
    RobParker likes this.
  7. RobParker

    RobParker Well-Known Member

    Quick question @Mike , if I use the CLI to upgrade but my SSH connection to the server breaks before it finishes, will the process run to completion?
  8. Mike

    Mike XenForo Developer Staff Member

  9. RobParker

    RobParker Well-Known Member


    So I can just run the CLI upgrader again?
  10. Mike

    Mike XenForo Developer Staff Member

    RobParker likes this.

Share This Page