PHP 5.4 after-install: preg_match(): Compilation failed: unknown option bit(s) set at offset 0

后端 未结 4 448
余生分开走
余生分开走 2020-12-16 05:20

I recently upgraded my PHP to version 5.4.1 on my Lion OS X 64bit, I\'m getting an error thrown in Codeigniter:

Severity: Warning

Message: preg_match(): Com         


        
4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-16 06:16

    My Solution was near to what @bigZero proposed.

    I couldn't make it work on brew because when I tried to install pcre v8.12 on brew it was not possible because it was (maybe) erased from the repository. I mean, it is shown on brew versions pcre but when I tried to install it failed to download from ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/

    So I had to download the pcre 8.12 source code from http://www.pcre.org, compile it and install it. I used the following configure: ./configure --prefix=/usr --enable-utf8 --enable-unicode-properties

    I tried to recompile php (in my case 5.4.10) without the --with-pcre-regex option (as suggested by @scott-harwell. But it failed while compiling. Than I added --with-pcre-regex=/usr/ and it finally worked.

提交回复
热议问题