You are not logged in.

#1 2011-05-23 22:37:05

savager1
Member
Registered: 2008-12-28
Posts: 5

mediawiki / dokuwiki issues with pcre

Hello,

I have searched here and can find similar posts, however, they are quite old and I also have read the forum rules and I believe it warrants a new post, please let me know if this is not the case.

I'm having some issues installing mediawiki or dokuwiki.

So, I can install them fine and set everything up but I am getting the following error: (and funny things happen like I try to login with my initial admin account and it just says that I have to fill out all fields...which were filled out)

[Wed May 18 11:05:28 2011] [error] [client 10.0.2.2] PHP Warning:  preg_replace(): Compilation failed: unknown option bit(s) set at offset 0 in /srv/http/dokuwiki/inc/utf8.php on line 422, referer: http://localhost:5080/dokuwiki/doku.php?id=start&do=register

From the previous posts I thought it was something to do with enabling utf8 in pcre. I also read that you have to link to the system ie. core pcre from apache, which I have also tried.

I have done the following:

* compiled from source pcre (I tried this without removing the core pcre, I thought that it would be OK. I thought that when I installed the new version it would overwrite the installed one...

* compiled from source apache with pcre flag to use the system installed pcre...

* installed php, have also tried compiling this as well.

It's just a personal wiki so no biggie and I know I can use other software but it has me curious now as to what's going on.

Thanks in advance.

edit: I should have mentioned it's a fresh download/install: Linux archie 2.6.33-ARCH #1 SMP PREEMPT Thu May 13 12:06:25 CEST 2010 i686 Pentium II (Klamath) GenuineIntel GNU/Linux

Last edited by savager1 (2011-05-23 23:05:07)

Offline

#2 2011-05-23 23:32:28

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: mediawiki / dokuwiki issues with pcre

Can you post the links to the similar issues you've found?
When you say you installed php, did you install the one from the repos? I'm sure how compatible Arch an Archie are.

Offline

#3 2011-05-23 23:51:50

chr0nik
Member
From: Michigan, USA
Registered: 2011-03-13
Posts: 31

Re: mediawiki / dokuwiki issues with pcre

What's this look like for you?

[notme@nothere ~]$ pcretest -C
PCRE version 8.12 2011-01-15
Compiled with
  UTF-8 support
  Unicode properties support
  Newline sequence is LF
  \R matches all Unicode newlines
  Internal link size = 2
  POSIX malloc threshold = 10
  Default match limit = 10000000
  Default recursion depth limit = 10000000
  Match recursion uses stack

Create an info.php in /srv/http with this body

<?php phpinfo(); ?>

then browse to that page (http://localhost:5080/info.php). If you then use your browser's find-on-page function to search for 'pcre', do you see '--with-pcre-regex=/usr' listed in the Configure Command section near the top of the page? Farther down the page you'll find a pcre section as well indicating whether pcre support is enabled and the version in use. What's that say?

Offline

#4 2011-05-24 00:26:28

savager1
Member
Registered: 2008-12-28
Posts: 5

Re: mediawiki / dokuwiki issues with pcre

Hello,

Thanks for your replies.

karol:
I have tried to install both from repos and also compile from source.
link from 2010 -> https://bbs.archlinux.org/viewtopic.php?id=106313

chr0nik

[root@archie ~]# pcretest -C
PCRE version 8.12 2011-01-15
Compiled with
  UTF-8 support
  Unicode properties support
  Newline sequence is LF
  \R matches all Unicode newlines
  Internal link size = 2
  POSIX malloc threshold = 10
  Default match limit = 10000000
  Default recursion depth limit = 10000000
  Match recursion uses stack
[root@archie ~]#

phpinfo:

PHP Version 5.3.6
Configure Command: '--with-pcre-regex=/usr'
pcre
PCRE (Perl Compatible Regular Expressions) Support     enabled
PCRE Library Version     8.02 2010-03-19

Directive    Local Value    Master Value
pcre.backtrack_limit    100000    100000
pcre.recursion_limit    100000    100000

Thanks

Last edited by savager1 (2011-05-24 00:38:24)

Offline

#5 2011-05-24 02:18:35

chr0nik
Member
From: Michigan, USA
Registered: 2011-03-13
Posts: 31

Re: mediawiki / dokuwiki issues with pcre

And what PHP, Apache & PCRE are you using presently, the ones you built from source? PHP is using PCRE provided by Apache which somehow differs from the version of PCRE you currently have installed.

Shutdown Apache and run it like this

strace httpd -X 2>&1 | grep pcre

You should immediately see some output like

open("/usr/lib/tls/x86_64/libpcre.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libpcre.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64/libpcre.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libpcre.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libpcre.so.0", O_RDONLY)     = 3

at which point you can just hit Ctrl+C. At least you'll know what lib Apache is using or if there's no output I would assume Apache is using the version of PCRE bundled with the source you pulled down & compiled.

I have this setup working, apache-php-dokuwiki installed via pacman (and have since I switched to arch recently,) so I'm a little confused. My installed version of PCRE matches what phpinfo() reports - that's the only difference I see (well, outside of you compiling from source & Arch vs. Archie.)

Offline

#6 2011-05-24 02:48:36

savager1
Member
Registered: 2008-12-28
Posts: 5

Re: mediawiki / dokuwiki issues with pcre

Hello chr0nik,

hmm, I am guessing this means that pcre isn't quite right:

(no output is seen immediately)

[root@archie ~]# strace httpd -X 2>&1 | grep pcre
[root@archie ~]#

[root@archie ~]# pacman -Ss pcre
core/pcre 8.12-1 [installed]
    A library that implements Perl 5-style regular expressions

Offline

#7 2011-05-24 03:21:31

chr0nik
Member
From: Michigan, USA
Registered: 2011-03-13
Posts: 31

Re: mediawiki / dokuwiki issues with pcre

Apache needs to be compiled against the pcre library you have installed by calling configure with

--with-pcre=/usr

The version of Apache you are running presently must be using a built-in version of libpcre, namely 8.02.

(This is where the thread you linked to wound up as well.)

Offline

#8 2011-05-24 16:40:32

savager1
Member
Registered: 2008-12-28
Posts: 5

Re: mediawiki / dokuwiki issues with pcre

Hey chr0nik,

Can I just apologize.

I should have also done this before trying other stuff.

I had done a 'pacman -Sy' and checked most of my packages, but I hadn't done a 'pacman -Syu'.

I tried it again tonight and found that after Syu and then postgres followed by apache/php/mediawiki or dokuwiki it works out of the box.

Thanks for your time and sorry again.

Thanks

Offline

#9 2011-05-24 17:14:02

chr0nik
Member
From: Michigan, USA
Registered: 2011-03-13
Posts: 31

Re: mediawiki / dokuwiki issues with pcre

Sweet. Glad it works. Eventually I'll remember to suggest updating before delving into troubleshooting. smile

Offline

Board footer

Powered by FluxBB