Welcome to Centmin Mod Community
Register Now

PHP-FPM Installing zend opcache on php 5.4.x on Centminmod

Discussion in 'Install & Upgrades or Pre-Install Questions' started by pamamolf, May 12, 2016.

  1. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    9:57 PM
    Nginx-1.26.x
    MariaDB 10.6.x
    Hi

    I need to keep the old version (php 5.4.x) for a test site and i want to ask how can i install zend opcache as if i am not wrong is not included on 5.4.x ?


    Thanks
     
  2. eva2000

    eva2000 Administrator Staff Member

    55,239
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    4:57 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    centmin mod auto detects php 5.4 and will install the zend opcache php extension automatically out of the box with 123.08stable and 123.09beta01 and higher

    if you don't have it you can use centmin.sh menu option 12 and submenu options to install zend opcache
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    9:57 PM
    Nginx-1.26.x
    MariaDB 10.6.x
    Try to install it (php 5.4.45) using latest beta centminmod but link seems to be dead :(

    Code:
    DE server detected
    HTTP/1.1 404 Not Found
    Download php-5.4.45.tar.xz ...
    Initializing download: http://php.net/get/php-5.4.45.tar.xz/from/this/mirror
    HTTP/1.1 404 Not Found
    Error: php-5.4.45.tar.xz download failed.
    check Centmin Mod log for details at /root/centminlogs/
    Aborting script...
     
  4. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    8:57 PM
    1.9.9
    10.1.10
    @eva2000 Only php >= 5.5 has .tar.xz compression.
    Php 5.4 has .tar.gz and .tar.bz2 compression only.
     
  5. eva2000

    eva2000 Administrator Staff Member

    55,239
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    4:57 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yes 123.09beta01 should have detection for php 5.4 and tar.gz vs 5.5+ xz at centminmod/php_upgrade.inc at 123.09beta01 · centminmod/centminmod · GitHub for upgrades
    Code (Text):
    if [[ "$PHPMUVER" != '5.5' || "$PHPMUVER" != '5.6' || "$PHPMUVER" != '5.7' || "$PHPMUVER" != '7.0' || "$PHPMUVER" != '7.1' ]]; then
        PHPEXTSION='gz'
        PHPTAR_FLAGS='xzf'
    fi

    for php initial installs centminmod/centmin.sh at 123.09beta01 · centminmod/centminmod · GitHub
    Code (Text):
    if [[ "$INITIALINSTALL" = [yY] ]]; then
        PHPXZ_CHECK=$(echo "$PHP_VERSION" | cut -d . -f1,2)
        if [[ "$PHPXZ_CHECK" != '5.5' || "$PHPXZ_CHECK" != '5.6' || "$PHPXZ_CHECK" != '5.7' || "$PHPXZ_CHECK" != '7.0' || "$PHPXZ_CHECK" != '7.1' ]]; then
            PHPEXTSION='gz'
            PHPTAR_FLAGS='xzf'
        fi
    fi
     
    Last edited: May 13, 2016
  6. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    8:57 PM
    1.9.9
    10.1.10
    Ahh didn't check the code since I'm on mobile ;)
    So then perhaps @pamamolf is using .08stable branch?
     
  7. eva2000

    eva2000 Administrator Staff Member

    55,239
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    4:57 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    123.08stable doesn't use .xz extension php downloads at all, so it is 123.09beta01 of some variant
     
  8. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    9:57 PM
    Nginx-1.26.x
    MariaDB 10.6.x
    I am using the latest 09 beta and i think it must be fixed using a new link or something as it is not possible to install it :(

    I try it on a new server by installing from scratch Centminmod 09 beta latest editing centmin.sh and setting php to 5.4.45 and it should work out of the box but not :(
     
    Last edited: May 13, 2016
  9. eva2000

    eva2000 Administrator Staff Member

    55,239
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    4:57 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    To troubleshoot, you need to check the the nginx upgrade log 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 initial install log. You can see full details at How to troubleshoot Centmin Mod initial install issues

    when you run centmin.sh menu option 4 there's a nginx upgrade log or initial install log timestamped at /root/centminlogs

    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 nginx_upgrade log or install log to gist.github.com or pastebin.com
     
  10. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    9:57 PM
    Nginx-1.26.x
    MariaDB 10.6.x
    It seems that i confuse you again with my bad english :(

    There is no nginx logs at all as i told you that is a new fresh install of Centminmod and when i got the error for php then the script stop and not continue to create any related logs.

    Only one log file related with this error:

    Code:
    DE server detected
    HTTP/1.1 404 Not Found
    Download php-5.4.45.tar.xz ...
    Initializing download: http://php.net/get/php-5.4.45.tar.xz/from/this/mirror
    HTTP/1.1 404 Not Found
    Error: php-5.4.45.tar.xz download failed.
    check Centmin Mod log for details at /root/centminlogs/
    Aborting script...
    No more details but i think the error is clear that something is wrong with the php 5.4.45 link ......
     
  11. eva2000

    eva2000 Administrator Staff Member

    55,239
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    4:57 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    for initial installs there is an install log
     
  12. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    9:57 PM
    Nginx-1.26.x
    MariaDB 10.6.x
  13. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    9:57 PM
    Nginx-1.26.x
    MariaDB 10.6.x
    Digital Ocean vps with 1gb ram and Centos 7.2 64Bit.....
     
  14. eva2000

    eva2000 Administrator Staff Member

    55,239
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    4:57 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  15. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    9:57 PM
    Nginx-1.26.x
    MariaDB 10.6.x
    Thanks :)

    Can i reinstall Centminmod or i must reinstall Centos first?
     
  16. eva2000

    eva2000 Administrator Staff Member

    55,239
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    4:57 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    fresh install.. i think bug is for initial php 5.4 installs, try updating php 5.4.45 via centmin.sh menu option 5 first before fresh install to confirm upgrade php routine detects 5.4.45 tar.gz properly
     
  17. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    9:57 PM
    Nginx-1.26.x
    MariaDB 10.6.x
    via centmin.sh menu option 5 is ok :)


    Code:
    DE server detected
    Initializing download: http://de1.php.net/get/php-5.4.45.tar.gz/from/this/mirror
    File size: 15879453 bytes
    Opening output file php-5.4.45.tar.gz
    Starting download
    
    Connection 3 finished                                                          ]
    Connection 0 finished                                                          ]
    Connection 1 finished                                                          ]
    [100%] [..................................................] [  26.6MB/s] [00:00]
    
    Downloaded 15.1 Megabyte in 0 seconds. (27205.04 KB/s)
    I will reinstall later and try to install Centminmod again...

    Thanks :)
     
    Last edited: May 14, 2016
  18. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    9:57 PM
    Nginx-1.26.x
    MariaDB 10.6.x
    I just reinstall server and try to install Centminmod latest one with your latest fix and it downloads it now but can't extract it :(

    Code:
    DE server detected
    Download php-5.4.45.tar.gz ...
    Initializing download: http://de1.php.net/get/php-5.4.45.tar.gz/from/this/mirror
    File size: 15879453 bytes
    Opening output file php-5.4.45.tar.xz
    Starting download
    
    Connection 2 finished                                                          ]
    Connection 1 finished                                                          ]
    Connection 3 finished                                                          ]
    Connection 0 finished                                                          ]
    
    Downloaded 15.1 Megabyte in 1 second. (14927.49 KB/s)
    Download done.
    tar (child): php-5.4.45.tar.gz: Cannot open: No such file or directory
    tar (child): Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now
    Error: php-5.4.45.tar.gz extraction failed.
    check Centmin Mod log for details at /root/centminlogs/
    Aborting script...
    It seems when is download it was auto renamed ?

    as i can see:

    Code:
    /svr-setup/php-5.4.45.tar.xz
     
    Last edited: May 14, 2016
  19. eva2000

    eva2000 Administrator Staff Member

    55,239
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    4:57 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    weird both .tar.gz and .tar.xz are mentioned

    what is output for these commands
    Code (Text):
    cd /svr-setup
    tar xvzf php-5.4.45.tar.gz
    

    Code (Text):
    ls -lAhrt /svr-setup | grep php-5.4.45
    
     
  20. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    9:57 PM
    Nginx-1.26.x
    MariaDB 10.6.x
    Code:
    [root@server centminmod-123.09beta01]# cd /svr-setup
    [root@server svr-setup]# tar xvzf php-5.4.45.tar.gz
    tar (child): php-5.4.45.tar.gz: Cannot open: No such file or directory
    tar (child): Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now
    and

    Code:
    [root@server svr-setup]# ls -lAhrt /svr-setup | grep php-5.4.45
    -rw-r--r--  1 root root    16M May 13 13:06 php-5.4.45.tar.xz
    With your fix it looks like that is pointing to correct download link .gz but for unknown reason is saved as .xz and the extract command is looking for .gz :(