Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default PHP 7.3 preg_xxxxx Warnings

    Basically running Zen Cart version 1.5.6b plus a few additional corrections which means also basically ZC 1.5.7 on PHP 7.3.6, Apache Linux 4.14.117-grsec-grsec+, PHP memory limit just increased from 96M to 128M to try to remove the generation of warnings like described below (no effect).

    Searched the internet and it seems that the solution to this is to modify the php.ini to disable pcre.jit... After I modified my php.ini to disable pcre.jit, the messages were no longer being generated, but now I wonder if there is some other effect such as a performance hit or something.

    Anyways, these are examples of warnings I was receiving in a single mydebug log working in the above environment just by accessing admin/server_info.php:
    Code:
    PHP Warning:  preg_replace(): JIT compilation failed: no more memory in admin/includes/extra_configures/enable_error_logging.php on line 38
    PHP Warning:  preg_match(): JIT compilation failed: no more memory in admin/includes/initsystem.php on line 30
    PHP Warning:  preg_replace(): JIT compilation failed: no more memory in includes/classes/db/mysql/query_factory.php on line 84
    PHP Warning:  preg_match(): JIT compilation failed: no more memory in admin/includes/extra_configures/enable_error_logging.php on line 20
    PHP Warning:  preg_match(): JIT compilation failed: no more memory in includes/classes/db/mysql/query_factory.php on line 475
    PHP Warning:  preg_replace(): JIT compilation failed: no more memory in includes/functions/sessions.php on line 143
    PHP Warning:  preg_replace(): JIT compilation failed: no more memory in admin/includes/functions/general.php on line 3767
    PHP Warning:  preg_replace(): JIT compilation failed: no more memory in admin/includes/init_includes/init_templates.php on line 35
    PHP Warning:  preg_replace_callback(): JIT compilation failed: no more memory in includes/classes/class.base.php on line 136
    PHP Warning:  preg_match_all(): JIT compilation failed: no more memory in admin/includes/classes/class.admin.zcObserverLogEventListener.php on line 185
    PHP Warning:  preg_replace(): JIT compilation failed: no more memory in admin/includes/functions/general.php on line 136
    PHP Warning:  preg_replace(): JIT compilation failed: no more memory in admin/includes/functions/general.php on line 137
    PHP Warning:  preg_replace(): JIT compilation failed: no more memory in admin/includes/classes/class.admin.zcObserverLogEventListener.php on line 140
    PHP Warning:  preg_match(): JIT compilation failed: no more memory in admin/includes/init_includes/init_errors.php on line 210
    PHP Warning:  preg_split(): JIT compilation failed: no more memory in admin/includes/functions/general.php on line 1142
    PHP Warning:  preg_replace(): JIT compilation failed: no more memory in includes/functions/plugin_support.php on line 63
    PHP Warning:  preg_match(): JIT compilation failed: no more memory in includes/classes/db/mysql/query_factory.php on line 488
    Again to correct this, I added to my php.ini file (or equivalent file to assign php settings):

    Code:
    pcre.jit = 0
    Last edited by mc12345678; 27 Jun 2019 at 10:20 PM. Reason: Delete [FONT] tags.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #2
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    267
    Plugin Contributions
    0

    Default Re: PHP 7.3 preg_xxxxx Warnings

    Hi,
    Interesting issue! I wonder if this has to do with PCRE to PCRE2 migration in PHP7.3 and the need to do checks of regexps for compatibility (like escaping hyphens), since PHP does not do linting of regexps at lint time.
    Last edited by gernot; 28 Jun 2019 at 05:57 AM.
    Zen Cart 1.5.6c modified to support Japanese language (postage module support work in progress). Upgraded incrementally each version from initial 1.5.5d.

  3. #3
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    267
    Plugin Contributions
    0

    Default Re: PHP 7.3 preg_xxxxx Warnings

    Just a though, do preg_match statements need '/ ... /' surrounding the regexp?
    (face palm, I see ~...~ stands in for /.../)
    I also see it is reported as PHP bug.
    Last edited by gernot; 28 Jun 2019 at 06:10 AM.
    Zen Cart 1.5.6c modified to support Japanese language (postage module support work in progress). Upgraded incrementally each version from initial 1.5.5d.

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,695
    Plugin Contributions
    123

    Default Re: PHP 7.3 preg_xxxxx Warnings

    Quote Originally Posted by mc12345678 View Post
    Again to correct this, I added to my php.ini file (or equivalent file to assign php settings):

    Code:
    pcre.jit = 0
    Yep, did same thing. For MAMP users, this will be File->Edit Template->PHP->[Current version from Main Window]-> search for this setting and update it as shown above.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #5
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: PHP 7.3 preg_xxxxx Warnings

    Thoughts on this being something attempted to be set in the loading of Zen Cart? Is it something that can/should otherwise be resolved by some sort of code change to allow the just-in-time loading and not experience the out-of-memory issue?

    I mean, loading the server_info page really doesn't do much in way of complex work other than loading the admin header, putting a few things together for the upper page display and then the output of phpinfo(). Most of what is provided above as warning points is cleaning up the provided data. Yes that's pretty much what the preg_ functions are for, just saying.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Replies: 38
    Last Post: 1 Nov 2018, 09:28 PM
  2. Writeable configure.php warnings
    By gmahler5th in forum Installing on a Linux/Unix Server
    Replies: 7
    Last Post: 5 Aug 2008, 03:32 AM
  3. configure.php warnings in my 1.3.8 install
    By alhakeem2001 in forum Upgrading from 1.3.x to 1.3.9
    Replies: 19
    Last Post: 14 Dec 2007, 09:40 AM
  4. PHP warnings
    By LEP in forum General Questions
    Replies: 4
    Last Post: 6 Jun 2006, 10:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR