Welcome to Centmin Mod Community
Register Now

PHP 7.3 wont install

Discussion in 'Install & Upgrades or Pre-Install Questions' started by GASTAN, Apr 8, 2019.

  1. GASTAN

    GASTAN Member

    72
    11
    8
    Jun 28, 2017
    Ratings:
    +16
    Local Time:
    1:09 AM
    I was installing 9beta branch on updated minimal CentoOD 7 distro
    All, except PHP installed:
    Any idea what could be wrong?

    Code:
    CentOS Linux release 7.6.1810 (Core)
    Linux CentOS7 3.10.0-957.10.1.el7.x86_64 #1 SMP Mon Mar 18 15:06:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
    nginx version: nginx/1.15.10 (070419-091756-centos7-hyperv-xen-xen-domU)
    -bash: php: command not found
    mysqld  Ver 10.3.14-MariaDB for Linux on x86_64 (MariaDB Server)
    
    What I found in install log:

    Code:
    Generating phar.php
    /bin/sh: line 1: 20308 Illegal instruction     (core dumped) ` if test -x "/svr-setup/php-7.3.4/fpm-build/sapi/cli/php"; then /svr-setup/php-7.3.4/build/shtool echo -n -- "/svr-setup/php-7.3.4/f
    pm-build/sapi/cli/php -n"; if test "x" != "x"; then /svr-setup/php-7.3.4/build/shtool echo -n -- " -d extension_dir=/svr-setup/php-7.3.4/fpm-build/modules"; for i in bz2 zlib phar; do if test -f
     "/svr-setup/php-7.3.4/fpm-build/modules/$i.la"; then . /svr-setup/php-7.3.4/fpm-build/modules/$i.la; /svr-setup/php-7.3.4/build/shtool echo -n -- " -d extension=$dlname"; fi; done; fi; else /sv
    r-setup/php-7.3.4/build/shtool echo -n -- "/svr-setup/php-7.3.4/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.4/ext/phar/build_precommand.php > ext/phar/phar.php
    make: *** [ext/phar/phar.php] Error 132
    make: *** Waiting for unfinished jobs....
    
    real    2m44.117s
    user    14m1.198s
    sys     4m8.998s
    
    php_configure.inc make install
    Generating phar.phar
    make: *** [ext/phar/phar.phar] Illegal instruction (core dumped)
    
    real    0m0.211s
    user    0m0.127s
    sys     0m0.085s
    
    strip PHP binary...
    ls: cannot access /usr/local/bin/php: No such file or directory
    ls: cannot access /usr/local/bin/php-cgi: No such file or directory
    ls: cannot access /usr/local/sbin/php-fpm: No such file or directory
    

     
  2. eva2000

    eva2000 Administrator Staff Member

    42,749
    9,670
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,924
    Local Time:
    10:09 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
  3. GASTAN

    GASTAN Member

    72
    11
    8
    Jun 28, 2017
    Ratings:
    +16
    Local Time:
    1:09 AM
    It's VM on XenServer 6.5

    there are 7 CPUs, but I assume they are all same, so I pasted just cpu1
    Code:
    physical id     : 0
    siblings        : 4
    core id         : 0
    cpu cores       : 4
    apicid          : 0
    initial apicid  : 0
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 13
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov                                                                                                                   pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_goo                                                                                                                  d nopl eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_de                                                                                                                  adline_timer aes rdrand hypervisor lahf_lm fsgsbase smep erms
    bogomips        : 4200.14
    clflush size    : 64
    cache_alignment : 64
    address sizes   : 46 bits physical, 48 bits virtual
    power management:
    
    processor       : 1
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 62
    model name      : Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz
    stepping        : 4
    microcode       : 0x416
    cpu MHz         : 2100.038
    cache size      : 15360 KB
    physical id     : 0
    siblings        : 4
    core id         : 2
    cpu cores       : 4
    apicid          : 2
    initial apicid  : 2
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 13
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov                                                                                                                   pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_goo                                                                                                                  d nopl eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_de                                                                                                                  adline_timer aes rdrand hypervisor lahf_lm fsgsbase smep erms
    bogomips        : 4200.14
    clflush size    : 64
    cache_alignment : 64
    address sizes   : 46 bits physical, 48 bits virtual
    power management:
    
    lscpu:
    Code:
    Architecture:          x86_64
    CPU op-mode(s):        32-bit, 64-bit
    Byte Order:            Little Endian
    CPU(s):                8
    On-line CPU(s) list:   0-7
    Thread(s) per core:    1
    Core(s) per socket:    4
    Socket(s):             2
    NUMA node(s):          1
    Vendor ID:             GenuineIntel
    CPU family:            6
    Model:                 62
    Model name:            Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz
    Stepping:              4
    CPU MHz:               2100.038
    BogoMIPS:              4200.14
    Hypervisor vendor:     Microsoft
    Virtualization type:   full
    L1d cache:             32K
    L1i cache:             32K
    L2 cache:              256K
    L3 cache:              15360K
    NUMA node0 CPU(s):     0-7
    Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes rdrand hypervisor lahf_lm fsgsbase smep erms
    

    lscpu | egrep 'avx|avx2'
    returns nothing

    I am checking on weekly digest, and I remember seeing some issues regarding PHP 7.3 but I could not find it in the evening (maybe too tired)

    I'll check your link further. Is it possible to compile 7.3 anyway? Or could there by something changed on VM?
    AFAIK it's old CPU, old box, I dont assume AVX is not present
     
  4. GASTAN

    GASTAN Member

    72
    11
    8
    Jun 28, 2017
    Ratings:
    +16
    Local Time:
    1:09 AM
    XenServer 6.5sp1 is supposed to support AVX, but I am not sure IF I will be able to add it.
    I checked linked thread.
    I see 7.3 compilation without AVX is not available. The thing is, 7.2 wont compile either :(
    I am gonna check log, why, could it be AVX as well?
     
  5. eva2000

    eva2000 Administrator Staff Member

    42,749
    9,670
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,924
    Local Time:
    10:09 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    there's problem like https://community.centminmod.com/threads/php-missing-in-new-centminmod-installs.16977/#post-71939

    Problem is the web hosts Xen configuration it is using intel ivybridge cpu with avx supported by cpu but your web host isn't passing the avx cpu instruction flag from vps host node to the underlying guest Xen vps OS. PHP 7.3 uses avx instructions now if detected cpu supports it - it seems PHP is trying to compile PHP 7.3 with avx support but your Xen guest OS is NOT seeing the support.

    If your ivybridge cpu doesn't show avx cpu instructions in VPS, then your web host hasn't properly configured the VPS to pass that cpu instruction from VPS host node to VPS guest OS.

    With alot of VPS hosts, they have mix of cpus some supporting avx, some avx + avx2 and some very older than sandybridge with no avx support. But it's up to your web host to properly configure VPS guest OS.

    as i mentioned at https://community.centminmod.com/threads/php-missing-in-new-centminmod-installs.16977/#post-71939

    Though really you'd want a cpu that supports avx to actually make use of avx for PHP 7.3 as that is where the performance boost. Using PHP 7.3 without avx with reduced performance, you might as well just use PHP 7.2 then for that misconfigured VPS
     
  6. GASTAN

    GASTAN Member

    72
    11
    8
    Jun 28, 2017
    Ratings:
    +16
    Local Time:
    1:09 AM
    I do want AVX support, but even PHP 7.2 wont compile (same issue as 7.3)

    Code:
    Generating phar.php
    /bin/sh: line 1:  6223 Illegal instruction     (core dumped) ` if test -x "/svr-setup/php-7.2.17/fpm-build/sapi/cli/php"; then /svr-setup/php-7.2.17/build/shtool echo -n -- "/svr-setup/php-7.2.1
    7/fpm-build/sapi/cli/php -n"; if test "x" != "x"; then /svr-setup/php-7.2.17/build/shtool echo -n -- " -d extension_dir=/svr-setup/php-7.2.17/fpm-build/modules"; for i in bz2 zlib phar; do if te
    st -f "/svr-setup/php-7.2.17/fpm-build/modules/$i.la"; then . /svr-setup/php-7.2.17/fpm-build/modules/$i.la; /svr-setup/php-7.2.17/build/shtool echo -n -- " -d extension=$dlname"; fi; done; fi;
    else /svr-setup/php-7.2.17/build/shtool echo -n -- "/svr-setup/php-7.2.17/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.2.17/ext/phar/build_precommand.php > ext/phar/phar.php
    make: *** [ext/phar/phar.php] Error 132
    make: *** Waiting for unfinished jobs....
     
  7. eva2000

    eva2000 Administrator Staff Member

    42,749
    9,670
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,924
    Local Time:
    10:09 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    that is because your cpu flags passed through by your web host are severely limited from lscpu and /proc/cpuinfo output
    Code (Text):
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov   
    

    honestly, I'd switch web hosts for one that is properly configured !
     
  8. GASTAN

    GASTAN Member

    72
    11
    8
    Jun 28, 2017
    Ratings:
    +16
    Local Time:
    1:09 AM
    same with 7.1.28 :(

    I am gonna try 5.6.40, but I have a bad feeling it wont matter

    Code:
    Generating phar.php
    /bin/sh: line 1: 28206 Illegal instruction     (core dumped) ` if test -x "/svr-setup/php-7.1.28/fpm-build/sapi/cli/php"; then /svr-setup/php-7.1.28/build/shtool echo -n -- "/svr-setup/php-7.1.2
    8/fpm-build/sapi/cli/php -n"; if test "x" != "x"; then /svr-setup/php-7.1.28/build/shtool echo -n -- " -d extension_dir=/svr-setup/php-7.1.28/fpm-build/modules"; for i in bz2 zlib phar; do if te
    st -f "/svr-setup/php-7.1.28/fpm-build/modules/$i.la"; then . /svr-setup/php-7.1.28/fpm-build/modules/$i.la; /svr-setup/php-7.1.28/build/shtool echo -n -- " -d extension=$dlname"; fi; done; fi;
    else /svr-setup/php-7.1.28/build/shtool echo -n -- "/svr-setup/php-7.1.28/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.1.28/ext/phar/build_precommand.php > ext/phar/phar.php
    make: *** [ext/phar/phar.php] Error 132
    make: *** Waiting for unfinished jobs....
    
     
  9. eva2000

    eva2000 Administrator Staff Member

    42,749
    9,670
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,924
    Local Time:
    10:09 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Yeah it's to do with how your Xen VPS is configured unfortunately. You can verify the issue by trying a different web host VPS
     
  10. GASTAN

    GASTAN Member

    72
    11
    8
    Jun 28, 2017
    Ratings:
    +16
    Local Time:
    1:09 AM
    We were able to bump CPU flags to (no AVX):

    Code:
    Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes rdrand hypervisor lahf_lm fsgsbase smep erms
    
    but no joy.

    Is there a way for me to compile PHP without AVX support? hack some config scripts or something?
    I would rather have your compiled PHP that yum one...
     
  11. eva2000

    eva2000 Administrator Staff Member

    42,749
    9,670
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,924
    Local Time:
    10:09 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Unfortunately not right now. The problem could also be Xen + old Ivybridge cpu related too.

    Has Centmin Mod PHP ever installed properly on this specific VPS server before ?
     
  12. GASTAN

    GASTAN Member

    72
    11
    8
    Jun 28, 2017
    Ratings:
    +16
    Local Time:
    1:09 AM
    nope, it's brand new VPS
     
  13. GASTAN

    GASTAN Member

    72
    11
    8
    Jun 28, 2017
    Ratings:
    +16
    Local Time:
    1:09 AM
    I finally got XenServer 7.6 installed, and avx flag is available to VM and I could compile nginx and php
     
    • Informative Informative x 1
  14. eva2000

    eva2000 Administrator Staff Member

    42,749
    9,670
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,924
    Local Time:
    10:09 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Good to know :)