Welcome to Centmin Mod Community
Register Now

Upgrade PHP-FPM GEOIP 2 NO VALUE AFTER PHP 7.3.5 UPDATE

Discussion in 'Install & Upgrades or Pre-Install Questions' started by EckyBrazzz, May 3, 2019.

  1. EckyBrazzz

    EckyBrazzz Active Member

    395
    76
    28
    Mar 28, 2018
    Brazil
    Ratings:
    +146
    Local Time:
    4:49 PM
    1.17.x
    10.3.x
    Didn't touch anything at all....But after the PHP 7.3.5 upgrade this morning I noticed the bad php.info after some hard work :(
    php-info.png
     
  2. eva2000

    eva2000 Administrator Staff Member

    40,322
    8,930
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,753
    Local Time:
    5:49 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    did you answer yes to overwriting php.conf/php-fpm.conf file again ? ;)

    in your /root/centminlogs the latest php_upgrade log would have listing record of the php-fpm.conf backup file name you can restore

    command below with grep case insensitive match the keywords in the very last php_upgrade.log log (most recent) if you answered yes to overwriting the file
    Code (Text):
    grep -rin 'Backing up existing' $(find /root/centminlogs/ -type f -name "*_php_upgrade.log" | tail -1)

    example of modified grep keyword to match the word overwrite
    Code (Text):
    grep -rin 'overwrite' $(find /root/centminlogs/ -type f -name "*_php_upgrade.log" | tail -1)                  
    28:Want to update to latest php.conf ? (overwrites will auto backup existing php.conf)
    31:Update & overwrite your existing php.conf [y/n]: n
    

    technically that should ask if you want to overwrite php.conf and php-fpm.conf
     
    Last edited: May 3, 2019
  3. EckyBrazzz

    EckyBrazzz Active Member

    395
    76
    28
    Mar 28, 2018
    Brazil
    Ratings:
    +146
    Local Time:
    4:49 PM
    1.17.x
    10.3.x
    No, this time not. Learned my lesson the other time. If I did that the GEOIP 2 didn't show up in the phpinfo.
    I noticed more items with "NO VALUE" than before.

    Code (Text):
    Do you want to run YUM install checks ?  [y/n]
    
    This will increase your upgrade duration time wise.
    Check the change log centminmod.com/changelog.html
    to see if any Nginx or PHP related new additions
    which require checking YUM prequisites are met.
    If no new additions made, you can skip the
    YUM install check to speed up upgrade time.
    
     [y/n]:      ____   _   _  ____       _   _                                _
        |  _ \ | | | ||  _ \  _  | | | | _ __    __ _  _ __  __ _   __| |  ___
        | |_) || |_| || |_) |(_) | | | || '_ \  / _` || '__|/ _` | / _` | / _ \
        |  __/ |  _  ||  __/  _  | |_| || |_) || (_| || |  | (_| || (_| ||  __/
        |_|    |_| |_||_|    (_)  \___/ | .__/  \__, ||_|   \__,_| \__,_| \___|
                                        |_|     |___/
    
    PHP Upgrade/Downgrade - Would you like to continue? [y/n] y
    
    ----------------------------------------------------------------
    Install which version of PHP? (version i.e. 5.6.40, 7.0.33, NGDEBUG)
    PHP 7.x/7.1.x/7.2.x/7.3.x is GA Stable but still may have broken PHP extensions.
    NGDEBUG is PHP 7.4.0 dev builds minus incompatible PHP extensions
    ----------------------------------------------------------------
    
    Current PHP Version: 7.3.4
    
    Enter PHP Version number you want to upgrade/downgrade to: 7.3.5
    
    Do you still want to continue? [y/n] y
    
    ----------------------------------------------------------------
    existing php.ini will be backed up at /usr/local/lib/php.ini-oldversion_020519-071606
    Want to update to latest php.conf ? (overwrites will auto backup existing php.conf)
    existing php.conf will be backed up at /usr/local/nginx/conf/php.conf-oldversion_020519-071606
    ----------------------------------------------------------------
    Update & overwrite your existing php.conf [y/n]: n
    ----------------------------------------------------------------
    
     
  4. eva2000

    eva2000 Administrator Staff Member

    40,322
    8,930
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,753
    Local Time:
    5:49 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    GEOIP2 fastcgi_param settings still in /usr/local/etc/php-fpm.conf or gone after update ?
     
  5. eva2000

    eva2000 Administrator Staff Member

    40,322
    8,930
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,753
    Local Time:
    5:49 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    You can verify by inspecting your php_upgrade log more closely.

    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
     
  6. EckyBrazzz

    EckyBrazzz Active Member

    395
    76
    28
    Mar 28, 2018
    Brazil
    Ratings:
    +146
    Local Time:
    4:49 PM
    1.17.x
    10.3.x
    Well, all php-fpm.conf were gone. Wanted to show it but yeah, woke up at 02:00 AM and did cat > /usr/local/etc/php-fpm.conf..... instead of cat /usr/local/etc/php-fpm.conf.... little typo. ;) So, file empty..

    But it had the old date, and it was missing the GEOIP 2 items.

    And I edited my post just before yours and you can see that I did not press "y".

    First gonna revert the situation to the php 7.3.4 and the correct the /usr/local/etc/php-fpm.conf file and DUBBLE check that the GEOIP 2 shows up into my php info file.

    After that I will update again, check it and post if nessesary the files you asked at gist.github.com.

    So, better take a little nap now, and do my tasks to check if its a bug or not.
     
  7. eva2000

    eva2000 Administrator Staff Member

    40,322
    8,930
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,753
    Local Time:
    5:49 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    yes that would of emptied your php-fpm.conf file !

    if you did in past answer yes to overwrite, there would be backups date time stamped so if there are recent enough, you can restore php.conf and php-fpm.conf from those backups
    Code (Text):
    ls -lah /usr/local/etc/php-fpm.conf*
    -rw-r--r--. 1 root root 2.3K Dec 12 08:40 /usr/local/etc/php-fpm.conf
    -rw-r--r--  1 root root  23K Apr  4 09:55 /usr/local/etc/php-fpm.conf.default
    -rw-r--r--  1 root root 2.1K Dec  2 11:18 /usr/local/etc/php-fpm.conf-oldversion_021218-110301
    -rw-r--r--  1 root root 2.0K Dec  2 12:11 /usr/local/etc/php-fpm.conf-oldversion_021218-121007
    

    Code (Text):
    ls -lah /usr/local/nginx/conf/php.conf*
    -rw-r--r-- 1 root root 3.3K May  2 20:08 /usr/local/nginx/conf/php.conf
    -rw-r--r-- 1 root root 3.6K Dec  2 11:18 /usr/local/nginx/conf/php.conf-oldversion_021218-110301
    -rw-r--r-- 1 root root 3.6K Dec  2 12:12 /usr/local/nginx/conf/php.conf-oldversion_021218-121007
    
     
  8. EckyBrazzz

    EckyBrazzz Active Member

    395
    76
    28
    Mar 28, 2018
    Brazil
    Ratings:
    +146
    Local Time:
    4:49 PM
    1.17.x
    10.3.x
    Thanks, but already did that and my GEOIP 2 info is back again. But gonna test it anyway, downgrade to 7.3.4 and upgrade to 7.3.5. to check what happens with the /usr/local/etc/php-fpm.conf.

    Gonna forget the powernap and test it right away. First something to eat.
     
  9. EckyBrazzz

    EckyBrazzz Active Member

    395
    76
    28
    Mar 28, 2018
    Brazil
    Ratings:
    +146
    Local Time:
    4:49 PM
    1.17.x
    10.3.x
    Well, I did a down/upgrade and nothing changed. GEOIP 2 works so I wonder what went wrong. I can't reproduce what happend, so for a final test, I am going to use a snapshot that I made yesterday and try it again on a new droplet because there were also some other updates that I did before I upgraded PHP

    Code (Text):
     1105  [02.05.19] 06:39:25   crontab -e
     1106  [02.05.19] 07:14:05   centmin
     1107  [02.05.19] 07:14:56   pip install --upgrade pip
     1108  [02.05.19] 07:15:47   yum update --disableplugin=priorities --setopt=deltarpm=0 --enablerepo=remi
     1109  [02.05.19] 07:16:06   centmin
     1110  [02.05.19] 07:40:32   php -v
     1111  [02.05.19] 20:47:39   ls
     1112  [02.05.19] 20:47:51   cat > /usr/local/etc/php-fpm.conf
    


    Timestamps are GMT +1, not the Brazilian. Let the stupid typo here so that you can see that I really did nothing after the upgrade to PHP 7.3.5
     
    Last edited: May 3, 2019
    • Informative Informative x 1
  10. eva2000

    eva2000 Administrator Staff Member

    40,322
    8,930
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,753
    Local Time:
    5:49 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    check whether or not the geoip2db-update.sh cronjob (used to update geoip2 lite database) was run since the php upgrade that you saw GEOIP2 values disappear in phpinfo output
    Code (Text):
    grep 'geoip2db-update.sh' /var/log/cron
    
     
  11. EckyBrazzz

    EckyBrazzz Active Member

    395
    76
    28
    Mar 28, 2018
    Brazil
    Ratings:
    +146
    Local Time:
    4:49 PM
    1.17.x
    10.3.x
    Yep, Just before that I updated the PHP.
    Code (Text):
    grep 'geoip2db-update.sh' /var/log/cron
    May  2 02:20:01 server6 CROND[26293]: (root) CMD (/usr/local/src/centminmod/tools/geoip2db-update.sh >/dev/null 2>&1)
    

    But alreay saw a fix that you made.
    Code (Text):
    Date:   Fri May 3 18:48:56 2019 +1000
    
        update tools/geoipdb-update.sh & tools/geoip2db-update.sh in 123.09beta01
    
        ensure nginx and php-fpm services restarted on script runs to update geoip legacy and geoip2 lite databases
    
     
  12. eva2000

    eva2000 Administrator Staff Member

    40,322
    8,930
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,753
    Local Time:
    5:49 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    yeah updated 123.09beta01 with fix for that - when the geoip2db-update.sh cronjob runs to update geoip 2 lite database it seems nginx/php-fpm need a service restart for it to be able to read the updated geoip2db-update.sh database. I came across this when I setup my geoip2 lookup site at https://geoip.centminmod.com/v2/ the fields would go blank after geoip2db-update.sh cronjob ran and updated geoip2 lite database. I fixed it on my site but forgot to add fix to centmin mod :)
     
  13. EckyBrazzz

    EckyBrazzz Active Member

    395
    76
    28
    Mar 28, 2018
    Brazil
    Ratings:
    +146
    Local Time:
    4:49 PM
    1.17.x
    10.3.x
    Well, just did the upgrade to PHP 7.3.5 on with the old snapshot without running cmupdate. (There was an update!). But everything seems to be oke at the moment. GEOIP 2 data is in tact (Quicky changed the DNS at Cloudflare for this droplet and the domain where I have the PHP info), so I can't reproduce what happened.

    But noticed that the cron updated some stuff (during the upgrade of PHP) like the warning about pip and the other Yum packages when exiting
    Code (Text):
    * PHP compiled with CPU_MARCH=broadwell
    * PHP upgraded and auto reinstalled PHP extensions
    * PHP_PGO='y' detected. PHP compiled with Profile Guided Optimizations
    * https://software.intel.com/en-us/blogs/2015/10/09/pgo-let-it-go-php
    ***************************************************
       ____   _   _  ____    _   _                                _            _
      |  _ \ | | | ||  _ \  | | | | _ __    __ _  _ __  __ _   __| |  ___   __| |
      | |_) || |_| || |_) | | | | || '_ \  / _` || '__|/ _` | / _` | / _ \ / _` |
      |  __/ |  _  ||  __/  | |_| || |_) || (_| || |  | (_| || (_| ||  __/| (_| |
      |_|    |_| |_||_|      \___/ | .__/  \__, ||_|   \__,_| \__,_| \___| \__,_|
                                   |_|     |___/                                
    Total PHP Upgrade Time: 3997.291425676 seconds
    --------------------------------------------------------
         Centmin Mod Menu 123.09beta01 centminmod.com    
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  XCache Re-install
    7).  APC Cache Re-install
    8).  XCache Install
    9).  APC Cache Install
    10). Memcached Server Re-install
    11). MariaDB MySQL Upgrade & Management
    12). Zend OpCache Install/Re-install
    13). Install/Reinstall Redis PHP Extension
    14). SELinux disable
    15). Install/Reinstall ImagicK PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: zstd,pigz,pbzip2,lbzip2
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Install/Re-Install
    21). Update - Nginx + PHP-FPM + Siege
    22). Add Wordpress Nginx vhost + Cache Plugin
    23). Update Centmin Mod Code Base
    24). Exit
    --------------------------------------------------------
    Enter option [ 1 - 24 ] 24
    --------------------------------------------------------
    
    --------------------------------------------------------
    Please bookmark:
    --------------------------------------------------------
    ###############################################################
    * Getting Started Guide - http://centminmod.com/getstarted.html
    * Find the latest Centmin Mod version - http://centminmod.com
    * Centmin Mod FAQ - http://centminmod.com/faq.html
    * Change Log - http://centminmod.com/changelog.html
    * Google+ Page latest news http://centminmod.com/gpage
    * Community Forums https://community.centminmod.com (signup)
    ###############################################################
    # Cheap VPS Hosting at Digitalocean
    # https://www.digitalocean.com/?refcode=c1cb367108e8
    ###############################################################
    
     checking for YUM updates... please wait...
     no YUM updates available
    
    -------------------------------------------------------------
    * Current Nginx Version: 1.15.12 (300419-181532-centos7-kvm)
    * Latest Nginx Available: 1.15.12 (centminmod.com/nginxnews)
    -------------------------------------------------------------
    
    -------------------------------------------------------------
     Centmin Mod local code is up to date at /usr/local/src/centminmod
     no available updates at this time...
    -------------------------------------------------------------
    


    Cron log (cut out updates of domains)
    Crontab -e
    @eva2000 What do you think, leave this droplet running to verify and check later on if everything is in tact and destroy it tonight or mark it as resolved?
     
  14. eva2000

    eva2000 Administrator Staff Member

    40,322
    8,930
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,753
    Local Time:
    5:49 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    should be resolved if it was geoip2db-update.sh related
     
  15. EckyBrazzz

    EckyBrazzz Active Member

    395
    76
    28
    Mar 28, 2018
    Brazil
    Ratings:
    +146
    Local Time:
    4:49 PM
    1.17.x
    10.3.x
    Ok, Thanks, gona destroy it. Case Closed
     
    • Like Like x 1
..