Join the community today
Become a Member

Beta Branch auto patch PHP 7.3.0 for serious Zend Opcache bug

Discussion in 'Centmin Mod Github Commits' started by eva2000, Dec 12, 2018.

  1. eva2000

    eva2000 Administrator Staff Member

    55,229
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,831
    Local Time:
    9:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    auto patch PHP 7.3.0 for serious Zend Opcache bug


    - for 123.0beta01, auto patch PHP 7.3.0 for Zend Opcache bug PHP 7.3.0, 7.2.13, 7.1.25, 7.0.33, 5.6.39 Released. The fixes are scheduled for PHP 7.3.1 for non-Centmin Mod systems though while Centmin Mod 123.09beta01 PHP 7.3.0 will get a patch fix via this update
    - patched PHP routines are logged to /root/centminlogs/patch_php_*.log date timestamped logs
    - be sure to updated 123.09beta01 via cmupdate command before re-running centmin.sh menu option 5 to reinstall PHP 7.3.0 if you're using that version

    Continue reading...

    123.09beta01 branch
     
  2. eva2000

    eva2000 Administrator Staff Member

    55,229
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,831
    Local Time:
    9:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    example cmupdate for 123.09beta01 code update
    Code (Text):
    cmupdate
    No local changes to save
    Updating 138a600..1f1fe67
    Fast-forward
     inc/php_patch.inc          |  14 +++++++++++++-
     patches/php/77275fix.patch | 135 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     2 files changed, 148 insertions(+), 1 deletion(-)
     create mode 100644 patches/php/77275fix.patch
    

    and after centmin.sh menu option 5 php 7.3.0 recompile patch log - you can ignore the failed patch of NEWS text file
    Code (Text):
    cat /root/centminlogs/patch_php_111218-180310.log
    
    patching PHP Zend Opcache Bug
    https://bugs.php.net/bug.php?id=77275
    
    dos2unix: converting file 77275fix.patch to Unix format ...
    patching file NEWS
    Hunk #1 FAILED at 33.
    1 out of 1 hunk FAILED -- saving rejects to file NEWS.rej
    patching file Zend/zend_compile.c
    patching file ext/opcache/Optimizer/compact_literals.c
    patching file ext/opcache/Optimizer/zend_optimizer.c
    patching file ext/opcache/tests/bug77275.phpt
    
     
  3. eva2000

    eva2000 Administrator Staff Member

    55,229
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,831
    Local Time:
    9:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    testing 77275 bug fix via test
    Code (Text):
    wget -O 77275test.php https://gist.github.com/centminmod/d631afac6859695c1a7e60b3f595e755/raw/77275.php
    php -f 77275test.php
    

    correct output should result in
    Code (Text):
    php -f 77275test.php
    string(1) "a"
    

    incorrect bugged output results in
    Code (Text):
    php -f 77275test.php
    string(1) "b"
    
     
  4. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    1:42 PM
    Nginx 1.17.9
    MariaDB 10.3.22
    So it is safe enough to upgrade to php 7.3.0 with newest 2.0.12 xenforo?
     
  5. eva2000

    eva2000 Administrator Staff Member

    55,229
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,831
    Local Time:
    9:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    there seems to be more PHP 7.3.0 bugs being reported in PHP 7.3.1 NEWS change log they're prepping so probably use on test forum only and not production live site/forum as yet. PHP 7.3.1 would contain more bug fixes that this patch I did.
     
  6. pdinh97qng

    pdinh97qng Member

    121
    15
    18
    Jan 24, 2016
    Ratings:
    +39
    Local Time:
    4:42 AM
    :ROFLMAO: I just upgraded to PHP 7.3.0 about a hour ago. As I saw the XenForo 2.0.12 released + this topic in the morning!:cry: Hopefully everything works fine!
     
  7. eva2000

    eva2000 Administrator Staff Member

    55,229
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,831
    Local Time:
    9:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Use PHP 7.3.0 only on test forum and use PHP 7.2.13 on live forums for now until PHP 7.3.1 is out. This auto patch fix just makes testing Xenforo test forums on PHP 7.3.0 safer but there's probably more bugs in PHP 7.3.0 that will be fixed in 7.3.1
     
  8. pdinh97qng

    pdinh97qng Member

    121
    15
    18
    Jan 24, 2016
    Ratings:
    +39
    Local Time:
    4:42 AM
    Nothing happened yet! And my forum is not to big so it's ok for me now!! I will downgrade back to php 7.2 incase something weird happen
     
  9. eva2000

    eva2000 Administrator Staff Member

    55,229
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,831
    Local Time:
    9:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    I'd at least recompile PHP 7.3.0 with above patch fix for Zend Opcache bug as it can cause data loss.
     
  10. pdinh97qng

    pdinh97qng Member

    121
    15
    18
    Jan 24, 2016
    Ratings:
    +39
    Local Time:
    4:42 AM
    Thank you! I already recompiled. When will you upgrade to XenForo 2.x.x as 1.5 will not receive update in next few months
     
  11. eva2000

    eva2000 Administrator Staff Member

    55,229
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,831
    Local Time:
    9:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  12. pdinh97qng

    pdinh97qng Member

    121
    15
    18
    Jan 24, 2016
    Ratings:
    +39
    Local Time:
    4:42 AM
    It's end of 2018 now :yuck: Even that XF2 has been out for a while but some add-ons only available in XF1. XF1 still a decent choice for now