[wp-trac] [WordPress Trac] #43109: RegEx in parse_db_host() can cause notices and headers sent too early (was: WP 4.9.2)

WordPress Trac noreply at wordpress.org
Wed Jan 17 19:29:54 UTC 2018


#43109: RegEx in parse_db_host() can cause notices and headers sent too early
--------------------------+------------------------------
 Reporter:  gallerycy     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Database      |     Version:  4.9
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by Clorith):

 * version:  4.9.2 => 4.9
 * component:  General => Database


Comment:

 Hi there, and welcome to WordPress Trac!

 Some quick digging shows that this has happened to a few people after 4.9
 introduced a new function, would you be able to share some more
 information with us about your setup, most notably what version of PHP you
 are using and if you know it, is it a Windows or linux based host?

 For reference, this relates to the `parse_db_host()` function and the
 RegEx used there to split up hosts and ports.

 There's [https://wordpress.org/support/topic/preg_match-compilation-
 failed-at-wp-db-php-on-line-1657 been some digging on the forums], and is
 likely caused by outdated PCRE libraries, we can work around this by using
 a slightly different syntax it seems ([https://wordpress.org/support/topic
 /preg_match-compilation-failed-at-wp-db-php-on-
 line-1657/page/3/#post-9708603 See Otto's comment])

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43109#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list