Learn about Centmin Mod LEMP Stack today
Register Now

Beta Branch update inc/php_upgrade.inc add PHPPGO_INDEXPATH variable support in 1…

Discussion in 'Centmin Mod Github Commits' started by eva2000, Oct 1, 2016.

  1. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    1:14 PM
    Nginx 1.13.x
    MariaDB 5.5
    update inc/php_upgrade.inc add PHPPGO_INDEXPATH variable support in 123.09beta01

    You can set in persistent config file /etc/centminmod/custom_config.inc the variable PHPPGO_INDEXPATH which you point to full path of your PHP web applications index.php page which is used for Profiled Guided Optimization PHP 7 training. This works when you set PHP_PGO='y' for PHP 7 based recompile/compiles via centmin.sh menu option 5 as outlined at Added Profile Guided Optimizations To Boost PHP 7 Performance

    So in your persistent config file /etc/centminmod/custom_config.inc set and set PHPPGO_INDEXPATH to say the full path to where you installed wordpress blog i.e. /home/nginx/domains/domain.com/public/index.php for wordpress index.php page:

    Code (Text):
    PHP_PGO='y'
    PHPPGO_INDEXPATH='/home/nginx/domains/domain.com/public/index.php'
    


    then run centmin.sh menu option 5 to recompile PHP 7 (only works on PHP 7 not PHP 5.6 and lower).

    Continue reading...

    123.09beta01 branch
     
    Last edited: Oct 2, 2016
    • Informative Informative x 1
  2. Sunka

    Sunka Active Member

    888
    230
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +376
    Local Time:
    5:14 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    For xenforo we do not need it to setup PHPPGO_INDEXPATH variable, or?
     
  3. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    1:14 PM
    Nginx 1.13.x
    MariaDB 5.5
    if you want you can for train PHP 7 for xenforo :)
     
  4. Sunka

    Sunka Active Member

    888
    230
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +376
    Local Time:
    5:14 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    Would there be some bad things because of that?

    Index path should be like this?
    If something wrong happened, I have to only remove PHPPGO_INDEXPATH variable and recompile php again (I could leave as it is now PHP_PGO='y')?
     
  5. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    1:14 PM
    Nginx 1.13.x
    MariaDB 5.5
    yes

    try and see :)
     
  6. Sunka

    Sunka Active Member

    888
    230
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +376
    Local Time:
    5:14 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    Let try then!
    (that is my 5th recompiling today because of your code updating (y))
     
    • Like Like x 1
  7. Sunka

    Sunka Active Member

    888
    230
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +376
    Local Time:
    5:14 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    Done. And now, what?

    Php "train" between two recompiling. What to do now?
     
  8. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    1:14 PM
    Nginx 1.13.x
    MariaDB 5.5
    PHP_PGO='y' does it all both recompiles during single centmin.sh menu option 5 run so nothing else to do but use your sites like normal :)
     
    • Like Like x 1
  9. hendry

    hendry Member

    59
    13
    8
    Sep 19, 2016
    Ratings:
    +17
    Local Time:
    10:14 AM
    nginx/1.11.4
    MariaDB 10
    • Like Like x 1
  10. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    1:14 PM
    Nginx 1.13.x
    MariaDB 5.5
    good to hear - more speed is good :D
     
    • Like Like x 1
  11. elargento

    elargento Member

    284
    16
    18
    Jan 4, 2016
    Ratings:
    +37
    Local Time:
    12:14 AM
    10
    Did you notice any difference?
     
  12. Sunka

    Sunka Active Member

    888
    230
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +376
    Local Time:
    5:14 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    I am not sure :LOL:
    But probably it is better.
    It can not hurt anyway ;)
     
    • Funny Funny x 1
  13. Jimmy

    Jimmy Premium Member Premium Member

    1,026
    231
    63
    Oct 24, 2015
    East Coast USA
    Ratings:
    +555
    Local Time:
    11:14 PM
    1.13.x
    MariaDB 10.1.x
    I have PHP_PGO='y' on both my live and dev server. On my dev server I see a database called pgo_train, but that dbase is absent from my live server. Just curious why it's showing up on one server, but absent from the other. Both servers were setup exactly the same.
     
  14. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    1:14 PM
    Nginx 1.13.x
    MariaDB 5.5
    both PHP 7.x based ? PGO only supported by PHP 7.x

    PGO only happens up php upgrade routines via centmin.sh menu option 5 and not initial install routines usually
     
  15. Jimmy

    Jimmy Premium Member Premium Member

    1,026
    231
    63
    Oct 24, 2015
    East Coast USA
    Ratings:
    +555
    Local Time:
    11:14 PM
    1.13.x
    MariaDB 10.1.x
    Yea, I'm on 7.1.4. I installed php a couple of times. Always on 7.1.4. Just did another php install via option 5 on the live machine, still no pgo_train in the database.
     
  16. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    1:14 PM
    Nginx 1.13.x
    MariaDB 5.5
    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
     
  17. Jimmy

    Jimmy Premium Member Premium Member

    1,026
    231
    63
    Oct 24, 2015
    East Coast USA
    Ratings:
    +555
    Local Time:
    11:14 PM
    1.13.x
    MariaDB 10.1.x
  18. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    1:14 PM
    Nginx 1.13.x
    MariaDB 5.5
    Looks like PGO training script is giving 500 internal errors
    Code (Text):
    PHPMUVER = 7.1
    PHP_PGO = y
    make -j14 prof-gen
    CCACHE_DISABLE=1 make PROF_FLAGS=-fprofile-generate all
    make[1]: Entering directory `/svr-setup/php-7.1.4/fpm-build'
    
    Build complete.
    Don't forget to run 'make test'.
    
    make[1]: Leaving directory `/svr-setup/php-7.1.4/fpm-build'
    
    real    0m0.043s
    user    0m0.034s
    sys    0m0.009s
    /svr-setup/php_pgo_training_scripts /svr-setup/php-7.1.4/fpm-build
    Saved working directory and index state WIP on master: 3f4a289 Merge pull request #1 from bogdanandone/master
    HEAD is now at 3f4a289 Merge pull request #1 from bogdanandone/master
    Already up-to-date.
    /svr-setup/php-7.1.4/fpm-build
    PHP Parse error:  syntax error, unexpected 'C' (T_STRING), expecting ',' or ')' in /svr-setup/php_pgo_training_scripts/constants.php on line 32
    ./sapi/cgi/php-cgi -T100 /svr-setup/php_pgo_training_scripts/index.php
    PHP Parse error:  syntax error, unexpected 'C' (T_STRING), expecting ',' or ')' in /svr-setup/php_pgo_training_scripts/constants.php on line 32
    Status: 500 Internal Server Error
    Content-type: text/html; charset=UTF-8
    

    did you set a PHPPGO_INDEXPATH path ? that is buggy for anything other than wordpress so don't set the PHPPGO_INDEXPATH variable and try

    or could be PHP 7.1 incompatibilities
     
  19. Jimmy

    Jimmy Premium Member Premium Member

    1,026
    231
    63
    Oct 24, 2015
    East Coast USA
    Ratings:
    +555
    Local Time:
    11:14 PM
    1.13.x
    MariaDB 10.1.x
    I didn't set the PHPPGO_INDEXPATH because I'm going to have several sites on the live server. My dev server didn't have that set either, but added the dbase.
     
  20. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    1:14 PM
    Nginx 1.13.x
    MariaDB 5.5
    strange testing right now and PHP 7.1.4 with PHP_PGO='y' work fine on CentOS 7.3 123.09beta01 system