Tried to upgrade to 3.1

Discussion in 'General' started by KurtHamm, Sep 27, 2016.

  1. KurtHamm

    KurtHamm New Member

    It looks like it is going, but then I get this. I have tried to reinstall from fresh restores, but can't get past this. After this, I try to go to hosting panel (8080) and just get the header and a box. Nothing else.

    Thanks for any assistance.

    Kurt

    Reconfigure Crontab? (yes,no) [yes]:

    Updating Crontab
    Restarting services ...
    Update finished.
    /usr/local/ispconfig/server/scripts/update_from_tgz.sh: line 21: -d: command not found
    /usr/local/ispconfig/server/scripts/update_from_tgz.sh: line 26: syntax error near unexpected token `else'
    /usr/local/ispconfig/server/scripts/update_from_tgz.sh: line 26: `else'
    /usr/local/bin/ispconfig_update.sh: line 4: ate.php: command not found
     
  2. KurtHamm

    KurtHamm New Member

    got it
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    What was the cause of the problem?
     
  4. KurtHamm

    KurtHamm New Member

    Well, I was using the .sh update script and that giving me the problem. THen, I followed the instructions to upgrade at the bottom of the release announcement. That finished fine and everything seems to be working. I am not getting the web panel probably because of some SSL problem.

    All I see is:
    upload_2016-9-27_15-18-47.png
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Hmm, that's not the new UI. Close the browser and open it again, just to ensure that you dont have a old session open. If this wont help, login to phpmyadmin, go to the dbispconfig database and there to the sys_user table, edit the "admin" user and set the value of the app_theme field to the value "default".
     
  6. diablo666

    diablo666 Active Member HowtoForge Supporter

    After upgrade,
    i've got the same error at the end.
    Code:
    Updating Crontab
    Restarting services ...
    Update finished.
    /usr/local/ispconfig/server/scripts/update_from_tgz.sh: riga 21: -d: comando non trovato
    /usr/local/ispconfig/server/scripts/update_from_tgz.sh: riga 26: errore di sintassi vicino al token non atteso "else"
    /usr/local/ispconfig/server/scripts/update_from_tgz.sh: riga 26: `else'
    /usr/local/bin/ispconfig_update.sh: riga 4: ate.php: comando non trovato
    
    But i'm able to login to the panel, with the new interface.

    Update
    I've checked the file /usr/local/ispconfig/server/scripts/update_from_tgz.sh and the problems seems with

    Code:
            php -q \
            -d disable_classes= \
            -d disable_functions= \
            -d open_basedir= \
            update.php
    
    -d options are not recognized
     
    Last edited: Sep 27, 2016
  7. Jesse Norell

    Jesse Norell Active Member

    That 'command not found' sounds like the shell giving an error, not php complaining of a bad option. Try this to verify -d works for you:
    Code:
    php -d open_basedir= -r 'print "hello\n";'
    Make sure your /bin/sh is bash, not dash (sh --version). And can you run that update script manually under sh -x and post the output, eg.:
    Code:
    cd /tmp
    wget https://git.ispconfig.org/ispconfig/ispconfig3/blob/stable-3.1/server/scripts/update_from_tgz.sh
    sh -x ./update_from_tgz.sh
    
    I've run it myself on debian 8 and found no error/problem.
     
    Last edited: Sep 28, 2016
  8. Jesse Norell

    Jesse Norell Active Member

    fwiw, I tried that script under dash and it ran fine, so that's likely not the problem. Please post that "sh -x" output if you can.
     
  9. KurtHamm

    KurtHamm New Member

    My panel issue was a previous session in the browser. Problem solved. What a great upgrade! Outstanding job.
     
    till likes this.
  10. Jesse Norell

    Jesse Norell Active Member

    I believe what's going on is the update_from_tgz.sh script itself has been overwritten with a new version while it is still executing.

    When it was run the file was 420 characters long (see https://git.ispconfig.org/ispconfig/ispconfig3/blob/stable-3.0.5/server/scripts/update_from_tgz.sh), that script completed with no errors; then bash reads the file from position 420 to EOF and continues executing; at this point the file looks like https://git.ispconfig.org/ispconfig/ispconfig3/blob/stable-3.1/server/scripts/update_from_tgz.sh so characters 421-EOF which are being executed are:
    Code:
    _functions= \
            -d open_basedir= \
            update.php
        cd /tmp
        rm -rf "${tmpdir}"
    else
            echo "Unable to download the update."
        exit 1
    fi
    
    exit 0
    The _functions= is a valid variable assignment, making "-d" the next command to be executed, and dropping execution into the middle of an if/else/fi block which bash never saw the start of, hence the 'else' error. It's harmless, no damage is done with the commands that are executed.

    If this is worth fixing, the new update_from_tgz.sh script will need to be padded so execution can continue sanely at character 421, and identify (by the absence a previously set variable) that is is being run after having been overwritten, and simply exit. Whether it's worth it or not probably depends on how many people complain about that error. :)
     
    till likes this.
  11. diablo666

    diablo666 Active Member HowtoForge Supporter

    I've tested the command you wrote, but all seems work right.

    Code:
    [email protected]:~# php -d open_basedir= -r 'print "hello\n";'
    hello
    [email protected]:~#
    
    So as you mentions, may be a bug fixed during the night.
    I hope the error will not crash my installation...
     
  12. Jesse Norell

    Jesse Norell Active Member

    Yeah, the issue isn't related to the php command at all. It will be a one-time issue when you update from 3.0.5 (or anything < 3.1) to 3.1. If you try to reproduce it by re-running the ispconfig_update.sh script, you won't be able to, the error won't happen again the next time.
    nope, it's harmless
     
  13. dicenl

    dicenl New Member

    on both my ispconfig servers (Centos 6 and Debian 8) i get the same errors:

    Update finished.
    /usr/local/ispconfig/server/scripts/update_from_tgz.sh: line 21: -d: command not found
    /usr/local/ispconfig/server/scripts/update_from_tgz.sh: line 26: syntax error near unexpected token `else'
    /usr/local/ispconfig/server/scripts/update_from_tgz.sh: line 26: `else'
    /usr/local/bin/ispconfig_update.sh: line 4: ate.php: command not found

    After the update on centos 6 it works nonetheless, but on my debian 8 server, after the update i cant login to the webinterface. I also did the manual update and it finished with:

    Updating Crontab
    Restarting services ...
    Update finished.
    + cd /tmp
    + rm -rf /tmp/update_from_tgz.sh.aqmR4AVrsg
    + exit 0

    But still cant login to the webinterface on debian 8. Could it be a browser cashe issue? (its my production server so i reverted to the last snapshot as soon as i saw i couldnt login)
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    @dicenl: Your login problem is not related to the error message of the shell script. Login issues are most likely browser cache problems when an old session was active. Possible solutions:

    1) Close the browser and open it again.
    2) Empty browser cache.
    3) Truncate the sys_session table in the dbispconfig database with phpmyadmin.
     
  15. dicenl

    dicenl New Member

    Ok tnx. I'll try it again tonight when nobody will be working on the server. I'll let you know the outcome!
     
  16. dicenl

    dicenl New Member

    Tnx Till. I think it was only the browser cache. I used an other browser and could login at once. Firefox still wouldnt. I truncated the sys_session table, still didnt work, and after clearing the browser history it did.

    3.1 looks great by the way!! Keep up the good work!
     
    till likes this.

Share This Page