This assumes that you are using WHM / cPanel and Apache on a dedicated or virtual private server, and that you have SSH and root access to said server.
I received this error during the initial install of xF, specifically at the admin account creation step:
xenforo preg_match(): Compilation failed: unknown option bit(s) set at offset 0
- Connect to your server via SSH and log in as root.
- To confirm if your PCRE versions are mismatched or not, run:
pcretest -C PCRE | grep version && /opt/pcre/bin/pcretest -C PCRE | grep version
- The output of that command should resemble the following:
PCRE version 6.7 2006-12-07 PCRE version 8.21 2011-12-12
- If the versions do not match like in the example above, continue to the next step.
echo "/opt/pcre/lib/" >> /etc/ld.so.conf && echo "--with-pcre-regex=/opt/pcre" >> /var/cpanel/easy/apache/rawopts/all_php5
- The following will cause your website to be temporarily inaccessible!
Apache and friends need to be rebuilt so they can make use of this new, correct configuration. Run:Code:
- Once it finishes, run the following to make sure Apache successfully restarted:
service httpd status
- Run the command in step 2 again. The versions should now match:
PCRE version 8.21 2011-12-12 PCRE version 8.21 2011-12-12
- You should now be able to successfully install xenForo.