XF 1.1 preg_match error during install (Fixed)

Cala_Marie

New member
I was able to fix this myself, so I'm posting this here for reference. If this belongs somewhere else or there's something I should change, please let me know.

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:
Code:
xenforo preg_match(): Compilation failed: unknown option bit(s) set at offset 0

I found out that it was being caused by mismatched PCRE versions in my server configuration.
  1. Connect to your server via SSH and log in as root.
  2. To confirm if your PCRE versions are mismatched or not, run:
    Code:
    pcretest -C PCRE | grep version && /opt/pcre/bin/pcretest -C PCRE | grep version
  3. The output of that command should resemble the following:
    Code:
    PCRE version 6.7 2006-12-07
    PCRE version 8.21 2011-12-12
  4. If the versions do not match like in the example above, continue to the next step.
  5. Run:
    Code:
    echo "/opt/pcre/lib/" >> /etc/ld.so.conf && echo "--with-pcre-regex=/opt/pcre" >> /var/cpanel/easy/apache/rawopts/all_php5
  6. 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:
    /scripts/easyapache --build
  7. Once it finishes, run the following to make sure Apache successfully restarted:
    Code:
    service httpd status
  8. Run the command in step 2 again. The versions should now match:
    Code:
    PCRE version 8.21 2011-12-12
    PCRE version 8.21 2011-12-12
  9. You should now be able to successfully install xenForo.
 
Last edited:
Looks like this was caused by the directory add-on; I would report it to the author in the add-on thread. Glad to see you purchased and are already using and experimenting with XenForo, welcome!
 
Looks like this was caused by the directory add-on; I would report it to the author in the add-on thread.
This happened to me during the initial xF setup, specifically at the admin account creation step (it would appear after clicking the button to create the account). I'm slightly confused now. :p

Glad to see you purchased and are already using and experimenting with XenForo, welcome!
Thanks! xF is actually a pleasure to deal with.
 
This happened to me during the initial xF setup, specifically at the admin account creation step (it would appear after clicking the button to create the account). I'm slightly confused now. :p


Thanks! xF is actually a pleasure to deal with.
If you were doing an initial setup, there is no way the following line should have been in your stack trace:
Code:
XenKingDir_ControllerPublic_Forum->actionIndex() in XenForo/FrontController.php at line 310

But glad you got it solved. :)
 
If you were doing an initial setup, there is no way the following line should have been in your stack trace:
Code:
XenKingDir_ControllerPublic_Forum->actionIndex() in XenForo/FrontController.php at line 310

A bunch of Ctrl+Zs in Notepad++ later, and I guess I hadn't copied the entirety of my own error so I copied that from somewhere else. Aaaahhhh I feel dumb now. :coffee: Thanks for pointing that out, I removed it from my original post so it doesn't throw anyone else off.

Edit: Looks like I got it from the cPanel forums.
 
A bunch of Ctrl+Zs in Notepad++ later, and I guess I hadn't copied the entirety of my own error so I copied that from somewhere else. Aaaahhhh I feel dumb now. :coffee: Thanks for pointing that out, I removed it from my original post so it doesn't throw anyone else off.

Edit: Looks like I got it from the cPanel forums.
Don't feel dumb, its an easy mistake. :) Thanks for removing it tho, and thanks for the useful guide!
 
Top Bottom