Want more timely Centmin Mod News Updates?
Become a Member

Install Fresh Install Centminmod, can't run php

Discussion in 'Install & Upgrades or Pre-Install Questions' started by babyshark, Oct 19, 2019.

  1. babyshark

    babyshark New Member

    20
    5
    3
    Jan 22, 2019
    Ratings:
    +7
    Local Time:
    1:28 AM
    Hi,

    I was install Centminmod a couple time, all is ok.

    Today I install Centminmod on my local PC, fresh install CentOS Linux release 7.7.1908 (Core)

    Install lasted Centminmod version

    Code:
    yum -y update; curl -O https://centminmod.com/betainstaller73.sh && chmod 0700 betainstaller73.sh && bash betainstaller73.sh
    
    After install, can't run php file on browser => get error 502 Bad Gateway

    on ssh

    Code:
     php -v
    -bash: php: command not found
    
    run service php-fpm status
    php-fpm.png


    Code:
    ---------------------------------------------------------------------------
    Total Curl Installer YUM or DNF Time: 196.9667 seconds
    Total YUM Time: 21.877784180 seconds
    Total YUM or DNF + Source Download Time: 69.6800
    Total Nginx First Time Install Time: 299.2080
    Total PHP First Time Install Time: 562.6160
    Download From Github Time: 6.8923
    Total Time Other eg. source compiles: 311.9085
    Total Centmin Mod Install Time: 1243.4125
    ---------------------------------------------------------------------------
    Total Install Time (curl yum + cm install + zip download): 1447.2715 seconds
    ---------------------------------------------------------------------------
    2 Intel(R) Celeron(R) CPU G3900 @ 2.80GHz
    2 799.975
    ---------------------------------------------------------------------------
    my install logs

    https://zerobin.net/?45992df2b53a5355#FAp017mglGYSQkaZUTHW8aF8kQ41mnj86LjagCZnyyA=

    Thanks
     
    Last edited: Oct 19, 2019
  2. eva2000

    eva2000 Administrator Staff Member

    42,078
    9,497
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,613
    Local Time:
    4:28 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Centmin Mod PHP 7.3 compile routine/GCC 8 compiler isn't liking your specific Intel Celeron G3900 cpu it seems with typical errors like
    Code (Text):
    Generating phar.php
    /bin/sh: line 1:  5621 Illegal instruction     ` if test -x "/svr-setup/php-7.3.10/fpm-build/sapi/cli/php"; then /svr-setup/php-7.3.10/build/shtool echo -n -- "/svr-setup/php-7.3.10/fpm-build/sapi/cli/php -n"; if test "x" != "x"; then /svr-setup/php-7.3.10/build/shtool echo -n -- " -d extension_dir=/svr-setup/php-7.3.10/fpm-build/modules"; for i in bz2 zlib phar; do if test -f "/svr-setup/php-7.3.10/fpm-build/modules/$i.la"; then . /svr-setup/php-7.3.10/fpm-build/modules/$i.la; /svr-setup/php-7.3.10/build/shtool echo -n -- " -d extension=$dlname"; fi; done; fi; else /svr-setup/php-7.3.10/build/shtool echo -n -- "/svr-setup/php-7.3.10/fpm-build/sapi/cli/php"; fi;` -n -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0' /svr-setup/php-7.3.10/ext/phar/build_precommand.php > ext/phar/phar.php
    make: *** [ext/phar/phar.php] Error 132
    make: *** Waiting for unfinished jobs....
    
    real    5m16.570s
    user    8m23.738s
    sys    1m57.950s
    
    php_configure.inc make install
    Generating phar.phar
    make: *** [ext/phar/phar.phar] Illegal instruction
    

    which means PHP-FPM failed to compile/build hence PHP not available.

    could be if your cpu doesn't support avx/avx2 cpu instructions which PHP 7.3 started using or cpu supports avx/avx2 but turned off in bios or not passed on by virtualization host config if using kvm/xen/vmware or openvz

    what is output for your server for command below
    Code (Text):
    lscpu

    It's an known issue with some cpus right now.

    You can try setting MARCH_TARGETNATIVE='n' in persistent config file /etc/centminmod/custom_config.inc and then running centmin.sh menu option 5 to compile PHP 7.3.10 and see if that helps though I suspect it won't. For that cpu, for now might need fresh CentOS 7 install with betainstaller72.sh for PHP 7.2 which doesn't use avx instructions from cpu.

    Edit: looks like both march=native and march=x86_64 have avx instructions disabled for your cpu in GCC 8.3.1
    Code (Text):
     -march=                             skylake              |      -march=                             x86-64
      -mavx256-split-unaligned-load     [disabled]          |      -mavx256-split-unaligned-load     [enabled]
      -mavx256-split-unaligned-store     [disabled]          |      -mavx256-split-unaligned-store     [enabled]
      -mpclmul                            [enabled]          |      -mpclmul                            [disabled]
      -msse3                              [enabled]          |      -msse3                              [disabled]
      -msse4                              [enabled]          |      -msse4                              [disabled]
      -msse4.1                            [enabled]          |      -msse4.1                            [disabled]
      -msse4.2                            [enabled]          |      -msse4.2                            [disabled]
      -mssse3                             [enabled]          |      -mssse3                             [disabled]
      -mtune=                             skylake              |      -mtune=                             generic
    

    Code (Text):
    -march=                             skylake
      -mavx                               [disabled]
      -mavx2                              [disabled]
      -mavx256-split-unaligned-load     [disabled]
      -mavx256-split-unaligned-store     [disabled]
      -mavx5124fmaps                      [disabled]
      -mavx5124vnniw                      [disabled]
      -mavx512bitalg                      [disabled]
      -mavx512bw                          [disabled]
      -mavx512cd                          [disabled]
      -mavx512dq                          [disabled]
      -mavx512er                          [disabled]
      -mavx512f                           [disabled]
      -mavx512ifma                        [disabled]
      -mavx512pf                          [disabled]
      -mavx512vbmi                        [disabled]
      -mavx512vbmi2                       [disabled]
      -mavx512vl                          [disabled]
      -mavx512vnni                        [disabled]
      -mavx512vpopcntdq                   [disabled]
      -mpclmul                            [enabled]
    

    Code (Text):
    -march=                             x86-64
      -mavx                               [disabled]
      -mavx2                              [disabled]
      -mavx256-split-unaligned-load     [enabled]
      -mavx256-split-unaligned-store     [enabled]
      -mavx5124fmaps                      [disabled]
      -mavx5124vnniw                      [disabled]
      -mavx512bitalg                      [disabled]
      -mavx512bw                          [disabled]
      -mavx512cd                          [disabled]
      -mavx512dq                          [disabled]
      -mavx512er                          [disabled]
      -mavx512f                           [disabled]
      -mavx512ifma                        [disabled]
      -mavx512pf                          [disabled]
      -mavx512vbmi                        [disabled]
      -mavx512vbmi2                       [disabled]
      -mavx512vl                          [disabled]
      -mavx512vnni                        [disabled]
      -mavx512vpopcntdq                   [disabled]
      -mpclmul                            [disabled]
    
     
  3. eva2000

    eva2000 Administrator Staff Member

    42,078
    9,497
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,613
    Local Time:
    4:28 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    can you post the output for both these commands

    Code (Text):
    /opt/rh/devtoolset-8/root/usr/bin/gcc -c -Q -march=native --help=target | egrep 'march|mavx|mpclmul|mtune'

    and
    Code (Text):
    /opt/rh/devtoolset-8/root/usr/bin/gcc -c -Q -march=native -mavx -mavx2 --help=target | egrep 'march|mavx|mpclmul|mtune'


    Ah I also remember Intel Skylake cpus didn't get full GCC compiler detection support until GCC 9 so GCC 8.3.1 used by Centmin Mod might be a version too low as well.
     
  4. babyshark

    babyshark New Member

    20
    5
    3
    Jan 22, 2019
    Ratings:
    +7
    Local Time:
    1:28 AM
    Hi, first of all, thank you very much

    /opt/rh/devtoolset-8/root/usr/bin/gcc -c -Q -march=native --help=target | egrep 'march|mavx|mpclmul|mtune'

    Code:
     -march=                               skylake
      -mavx                                 [disabled]
      -mavx2                                [disabled]
      -mavx256-split-unaligned-load         [disabled]
      -mavx256-split-unaligned-store        [disabled]
      -mavx5124fmaps                        [disabled]
      -mavx5124vnniw                        [disabled]
      -mavx512bitalg                        [disabled]
      -mavx512bw                            [disabled]
      -mavx512cd                            [disabled]
      -mavx512dq                            [disabled]
      -mavx512er                            [disabled]
      -mavx512f                             [disabled]
      -mavx512ifma                          [disabled]
      -mavx512pf                            [disabled]
      -mavx512vbmi                          [disabled]
      -mavx512vbmi2                         [disabled]
      -mavx512vl                            [disabled]
      -mavx512vnni                          [disabled]
      -mavx512vpopcntdq                     [disabled]
      -mpclmul                              [enabled]
      -mtune-ctrl=
      -mtune=                               skylake
    


    /opt/rh/devtoolset-8/root/usr/bin/gcc -c -Q -march=native -mavx -mavx2 --help=target | egrep 'march|mavx|mpclmul|mtune'

    Code:
     -march=                               skylake
      -mavx                                 [enabled]
      -mavx2                                [enabled]
      -mavx256-split-unaligned-load         [disabled]
      -mavx256-split-unaligned-store        [disabled]
      -mavx5124fmaps                        [disabled]
      -mavx5124vnniw                        [disabled]
      -mavx512bitalg                        [disabled]
      -mavx512bw                            [disabled]
      -mavx512cd                            [disabled]
      -mavx512dq                            [disabled]
      -mavx512er                            [disabled]
      -mavx512f                             [disabled]
      -mavx512ifma                          [disabled]
      -mavx512pf                            [disabled]
      -mavx512vbmi                          [disabled]
      -mavx512vbmi2                         [disabled]
      -mavx512vl                            [disabled]
      -mavx512vnni                          [disabled]
      -mavx512vpopcntdq                     [disabled]
      -mpclmul                              [enabled]
      -mtune-ctrl=
      -mtune=                               skylake
    

    I will install Centminmod with php 7.2 now.
    but is there any another problem with old CPU (or i must upgrade new cpu), It's local server, I want test carefully my website before upload to real server, I want test in same environment (centminmod).

    Thanks
     
  5. eva2000

    eva2000 Administrator Staff Member

    42,078
    9,497
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,613
    Local Time:
    4:28 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    it's not that your cpu is old, it's just the GCC 8.3.1 compiler used to build PHP is probably older and can't properly detect your newer Skylake cpu but can also because your local server bios or settings have cpu disabling AVX instructions which PHP 7.3+ need or expect when it sees Skylake cpu reported.

    you can verify if your cpu has AVX and AVX2 instructions via cpu flags reported from command - according to Intel ARK database your cpu supports AVX/AVX2 so avx and avx2 flags should show from lscpu output
    Code (Text):
    lscpu
    
     
    • Like Like x 1
  6. babyshark

    babyshark New Member

    20
    5
    3
    Jan 22, 2019
    Ratings:
    +7
    Local Time:
    1:28 AM
    Hi

    lscpu

    Code:
    Architecture:          x86_64
    CPU op-mode(s):        32-bit, 64-bit
    Byte Order:            Little Endian
    CPU(s):                2
    On-line CPU(s) list:   0,1
    Thread(s) per core:    1
    Core(s) per socket:    2
    Socket(s):             1
    NUMA node(s):          1
    Vendor ID:             GenuineIntel
    CPU family:            6
    Model:                 94
    Model name:            Intel(R) Celeron(R) CPU G3900 @ 2.80GHz
    Stepping:              3
    CPU MHz:               800.146
    CPU max MHz:           2800.0000
    CPU min MHz:           800.0000
    BogoMIPS:              5616.00
    Virtualization:        VT-x
    L1d cache:             32K
    L1i cache:             32K
    L2 cache:              256K
    L3 cache:              2048K
    NUMA node0 CPU(s):     0,1
    Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave rdrand lahf_lm abm 3dnowprefetch intel_pt ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust erms invpcid rdseed smap clflushopt xsaveopt xsavec xgetbv1 dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear spec_ctrl intel_stibp flush_l1d
    
     
  7. eva2000

    eva2000 Administrator Staff Member

    42,078
    9,497
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,613
    Local Time:
    4:28 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    yeah i am not seeing avx or avx2 flags in lscpu output when it's expected for that cpu so maybe your bios settings have incorrectly disabled AVX support or your cpu's motherboard bios needs update ?
     
    • Like Like x 1
  8. babyshark

    babyshark New Member

    20
    5
    3
    Jan 22, 2019
    Ratings:
    +7
    Local Time:
    1:28 AM
    from wiki AVX
    Advanced Vector Extensions - Wikipedia

    Code:
    Not all CPUs from the listed families support AVX. Generally, CPUs with the commercial denomination "Core i3/i5/i7" support them, whereas "Pentium" and "Celeron" CPUs don't.
    
    so my CPU not support. thank @eva2000, reinstall cenminmod with php 7.2 now.
     
  9. eva2000

    eva2000 Administrator Staff Member

    42,078
    9,497
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,613
    Local Time:
    4:28 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Ah Celerons don't have AVX support !! Thanks for that tidbit of info - rarely do I deal with Celeron cpus these days ! So yeah for now PHP 7.2 would be ideal. I'll have to figure out how to support PHP 7.3 and 7.4 with cpus without AVX support.

    Or you can swap out your Intel Celeron G3900 for a Intel Core i3-9100F which would have much high clock speeds and AVX support which lend nicely for Centmin Mod and source compiles of Nginx/PHP-FPM which are faster with high cpu clock speeds and more cpu threads.
     
    • Agree Agree x 1
  10. babyshark

    babyshark New Member

    20
    5
    3
    Jan 22, 2019
    Ratings:
    +7
    Local Time:
    1:28 AM
    Downgrading to php 7.2 (fresh cenminmod with php 7.2) still not work, same old problem,

    so install centminmod with custom cofig MARCH_TARGETNATIVE='n' => It's worked.

    Maybe upgrading my PC in the future :)
     
    • Informative Informative x 1
  11. eva2000

    eva2000 Administrator Staff Member

    42,078
    9,497
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,613
    Local Time:
    4:28 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Thanks for the update :)
     
    • Like Like x 1