Get the most out of your Centmin Mod LEMP stack
Become a Member

Install PHP Upgrade Gives 404s

Discussion in 'Install & Upgrades or Pre-Install Questions' started by gawk, Feb 24, 2018.

  1. gawk

    gawk New Member

    10
    5
    3
    Feb 24, 2018
    Ratings:
    +7
    Local Time:
    11:52 AM
    nginx-1.13.9
    MariaDB 10.3.4
    • CentOS Version: CentOS 7 64-bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.11.10
    • PHP Version Installed: 5.6.30
    • MariaDB MySQL Version Installed: 10.1.21
    • When was last time updated Centmin Mod code base ? : today
    • Persistent Config: No
    Hi, I'm trying to upgrade my PHP from 5.6 to 7.x (tried 7.0, 7.1 and 7.2), but I always get a 404 error that the PHP file download/mirror is unavailable.

    I'm using the latest 123.98beta01 version (fresh install from today).

    I'm guessing the mirror needs to be updated?
     
  2. eva2000

    eva2000 Administrator Staff Member

    37,234
    8,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,524
    Local Time:
    8:52 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    what output do you get for this command
    Code (Text):
    curl -s ipinfo.io/geo 2>&1 | sed -e 's|[{}]||' -e 's/\(^"\|"\)//g' -e 's|,||' | egrep -v 'phone|postal|loc' | awk -F ": " '/country/ {print $2}'
    

    Centmin Mod php downloads utilise php.net's mirror system to pick the closest geographic mirror available on php.net to your server IP's reported geolocation data. It could be the mirror you picked up for your server is broken at php.net and needs updating in Centmin Mod code. The output for the above command lists the country code for your server's IP geolocation data.
     
  3. eva2000

    eva2000 Administrator Staff Member

    37,234
    8,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,524
    Local Time:
    8:52 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Also every centmin.sh menu option has a full server log created with time stamped file name at /root/centminlogs. You can check that specific error log for clues or copy and paste log contents and post to pastebin.com or gist.github.com for sharing.

    To troubleshoot, you need to check the the php upgrade logs at /root/centminlogs and instructions under Sharing logs and errors heading for using Pastebin.com or Gists to share a sanitised version of the contents of the nginx_upgrade and php_upgrade logs. You can see full details at How to troubleshoot Centmin Mod initial install issues

    if you type this command it lists all logs in date ascending order so latest log at bottom
    Code (Text):
    ls -lArt /root/centminlogs

    so copy the entire contents of latest php_upgrade log to gist.github.com or pastebin.com

    you can use grep to filter the logs, i.e. look for nginx_upgrade or php in log name
    Code (Text):
    ls -lahrt /root/centminlogs/ | egrep 'nginx_upgrade|php_upgrade'
    

    Code (Text):
    ls -lahrt /root/centminlogs/ | egrep 'nginx_upgrade|php_upgrade'
    -rw-r--r--  1 root root  2.6M Oct  3 03:48 centminmod_1.2.3-eva2000.09.001_031016-034409_php_upgrade.log
    -rw-r--r--  1 root root  664K Oct 12 09:24 centminmod_1.2.3-eva2000.09.001_121016-092406_nginx_upgrade.log
    

    So the last php upgrade log was named centminmod_1.2.3-eva2000.09.001_031016-034409_php_upgrade.log and located at /root/centminlogs/centminmod_1.2.3-eva2000.09.001_031016-034409_php_upgrade.log
    then use cat command to output the contents of that log.

    clear your ssh window buffer/screen and type
    Code (Text):
    cat /root/centminlogs/centminmod_1.2.3-eva2000.09.001_031016-034409_php_upgrade.log

    then select and copy and paste output to pastebin.com or gist.github.com file to share. If your SSH client's scroll buffer isn't large enough using cat might not output the entire log file contents, so you may need to download the log and use local text editor to open and copy and paste.

    so only need content of a specific log, in this case most recent php_upgrade.log logs
     
  4. gawk

    gawk New Member

    10
    5
    3
    Feb 24, 2018
    Ratings:
    +7
    Local Time:
    11:52 AM
    nginx-1.13.9
    MariaDB 10.3.4
    Hi eva,

    Thanks for the awesome and educational reply! Not only am I close to having an ultra-fast web server, but I'm getting into CentOS too :p

    Anyway, I have the info you wanted:

    - The mirror php.net uses (found via your curl command) for my server is FR (France).

    I don't have a nginx_upgrade in my log files (grep comes up empty), but I have the latest php_upgrade here:
    centminmod_123.09beta01.b015_230218-225442_php_upgrade.log ยท GitHub

    Seems to be a local problem with the French mirror. It's been down for 8+ hours now.
     
    • Like Like x 1
  5. eva2000

    eva2000 Administrator Staff Member

    37,234
    8,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,524
    Local Time:
    8:52 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Glad to see CentOS is to your liking :) Ah not a problem with php.net mirror but your specified php version needs to be exact so 7.0.27, 7.1.14 or 7.2.2 not just 7.1
    Code (Text):
    FR server detected
     ____   _   _  ____       ____                          _                    _
    |  _ \ | | | ||  _ \  _  |  _ \   ___ __      __ _ __  | |  ___    __ _   __| |
    | |_) || |_| || |_) |(_) | | | | / _ \\ \ /\ / /| '_ \ | | / _ \  / _` | / _` |
    |  __/ |  _  ||  __/  _  | |_| || (_) |\ V  V / | | | || || (_) || (_| || (_| |
    |_|    |_| |_||_|    (_) |____/  \___/  \_/\_/  |_| |_||_| \___/  \__,_| \__,_|
                                                                                
    HTTP/1.1 404 Not Found
    Initializing download: http://php.net/get/php-7.1.tar.xz/from/this/mirror
    HTTP/1.1 404 Not Found
    Error: php-7.1.tar.xz download failed.
    
     
..