PCRE Unicode
Mar 31, 2009
I've been looking around for this for hours now and i can't seem to get my head around it. The situation is this:
I have been creating a PHP script for a while now, which extensively uses unicode characters and checking. Now during development, i only checked it on my localhost installation and a virtual linux machine. It all worked there.
Yesterday it was finished and i uploaded it to a beta site for testing, and i found that PHP doesn't recognise unicode regular expressions (perl compatible).
I think that my installed PCRE version is not compiled with UTF8 support. I could not find any updated RPM's for my Fedora installation, so i went ahead and downloaded the latest PCRE, compiled it with unicode support and installed it into the same path as the old one.
I thought that would fix it, but both linux and PHP still claim the old version is installed.
I'm completely lost now. I can't Remove the old version through Yum since that would remove over 450 packages from the system, making both the system and Plesk unusable.
Is there anyone here who knows how to handle this? I usually fix my own stuff, but somehow this is way beyond what i did before
System: Fedora Core 5
PCRE: 6.3
View 2 Replies
Jul 31, 2007
I just installed lighttpd from source and used the following options:
Code:
./configure --host=i686-redhat-linux-gnu
--build=i686-redhat-linux-gnu
--target=i386-redhat-linux
--program-prefix= --prefix=/usr
--exec-prefix=/usr
--bindir=/usr/bin
--sbindir=/usr/sbin
--sysconfdir=/etc
--datadir=/usr/share
--includedir=/usr/include
--libdir=/usr/lib
--libexecdir=/usr/libexec
--localstatedir=/var
--sharedstatedir=/usr/com
--mandir=/usr/share/man
--infodir=/usr/share/info
--with-openssl
--with-pcre
--with-zlib
--with-bzip2
--disable-ipv6
--with-PACKAGE=mod_redirect
--with-rewrite
--with-redirect
--with-ssi
--with-linux-aio
--with-lua
Now the config i'm going to use is the one lxadmin (host-in-abox) generated for me. I'm basically just trying to install lighttpd with LUA support, but I couldn't figure out how to do that with YUM. Anyway, when i try to load lighty with the lxadmin config, it says i don't have PCRE support when clearly i have it installed.
Code:
/usr/sbin/lighttpd -V
Features:
- IPv6 support
- zlib support
- bzip2 support
+ crypt support
- SSL Support
+ PCRE support
- mySQL support
- LDAP support
- memcached support
- FAM support
+ LUA support
- xml support
- SQLite support
- GDBM support
[root@server lighttpd-1.4.16]# lighttpd start -f /etc/lighttpd/lighttpd.conf
can't handle '$HTTP[url] =~ ...' as you compiled without pcre support.
(perhaps just a missing pcre-devel package ?)
2007-07-31 18:46:09: (configfile.c.853) source: /etc/lighttpd/lighttpd.conf line: 132 pos: 3 parser failed somehow near here: {
I also have the pcre-devel package installed. YUM says i do anyway.
pcre-devel.i386 6.6-1.1 installed
pcre.i386 6.6-1.1 installed
Code:
[root@server lighttpd-1.4.16]# rpm -qa pcre
pcre-6.6-1.1
Any idea what's going on? Alternatively, i would love a solution on how to install the RPM package with LUA support, as i think it's possible?
Code:
lighttpd.i386 1.4.15-1 installed
Matched from:
lighttpd
A fast webserver with minimal memory-footprint (lighttpd)
lighttpd is intented to be a frontend for ad-servers which have to deliver
small files concurrently to many connections.
Available rpmbuild rebuild options :
--with : ssl mysql lua memcache
View 3 Replies
View Related
Jan 27, 2007
From the ModSecurity manual:
Quote:
By default ModSecurity relies on the regular expression library built into Apache for pattern matching.
This works well with Apache 2.x but not so much with Apache 1.x. The Apache 1.x regular expression
engine is several times slower. Since 1.9.2 it is possible to compile ModSecurity for Apache 1.x against
an external regular expression library (PCRE, [url] the same library used in Apache 2.x)
and achieve significant performance increase. This is achieved with the USE_PCRE compile-time flag.
If you have PCRE already installed on your system it may be sufficient to compile ModSecurity like this:
Code:
# <apache1-home>/bin/apxs -DUSE_PCRE -cia mod_security.c
Ok, so I tried and got this error:
Code:
[root@servidor1 customapache]# apxs -DUSE_PCRE -cia mod_security.c
gcc -DLINUX=22 -DHAVE_SET_DUMPABLE -I/usr/include/gdbm -DMOD_SSL=208128 -DUSE_HSREGEX -DEAPI -fpic -DSHARED_MODULE -I/usr/include/apache -DUS
E_PCRE -c mod_security.c
mod_security.c:37:18: pcre.h: No such file or directory
mod_security.c: In function `my_pregcomp':
mod_security.c:929: error: `PCRE_CASELESS' undeclared (first use in this function)
mod_security.c:929: error: (Each undeclared identifier is reported only once
mod_security.c:929: error: for each function it appears in.)
mod_security.c:929: warning: assignment makes pointer from integer without a cast
mod_security.c: In function `my_regexec':
mod_security.c:940: error: `PCRE_ERROR_NOMATCH' undeclared (first use in this function)
apxs:Break: Command failed with rc=1
I double checked if I have PCRE installed:
Code:
[root@servidor1 customapache]# yum search pcre
pcre.i386 4.5-3.2.RHEL4 installed
Matched from:
pcre
Perl-compatible regular expression library.
PCRE has its own native API, but a set of "wrapper" functions that are based on
the POSIX API are also supplied in the library libpcreposix. Note that this
just provides a POSIX calling interface to PCRE: the regular expressions
themselves still follow Perl syntax and semantics. The header file
for the POSIX-style functions is called pcreposix.h.
[url]
And I even located the /lib/libpcre.so.0.0.1 and copied it to /usr/lib/apache/libpcre.so, with no sucess. Got the same error.
Has anyone sucessfully compiled mod_security with PCRE and can help me?
More info on this slow down issue here: [url]
View 6 Replies
View Related