Questions tagged [pcre]
The pcre tag has no usage guidance.
46
questions
1
vote
1
answer
360
views
Apache RedirectMatch not matching double slash
I want to redirect URLs with multiple consecutive slashes (e.g. //) in the path to have only one consecutive slash, e.g.
https://example.com/a//b/c/ → https://example.com/a/b/c/.
My .htaccess file ...
0
votes
0
answers
281
views
how to implement pcre command filter and postmap on postfix
i am using postfix 3.3.0
i have in main.cf
smtpd_command_filter = pcre:/etc/postfix/command_filter
in comman_filter
/^(RCPT\s+TO:\s*<(.*)@domaina.com>)/ RCPT TO:<[email protected]>
whene ...
0
votes
1
answer
1k
views
Regexp for header_checks in postfix
All my users use outlook, so the From field reaches the postfix like this:
From: "Name and Surname" [email protected].
I need a regular expression to change the address, I have this in ...
0
votes
0
answers
87
views
Regex on htaccess file gives INTERNAL REDIRECT error
I'm trying to create a redirect rule that matches the following urls:
en/property/rotterdam/apartment/lorem-ipsum-dolor-sit-amet/v-9/
en/property/rotterdam/apartment/lorem-ipsum-dolor-sit-amet/9/
en/...
2
votes
2
answers
3k
views
nginx stream map with wildcard
I am really bad with regex. I am trying to do this in nginx:
stream {
map $ssl_preread_server_name $name {
api.dom1.com dom1_backend;
*.dom2.com dom2_backend;
}
upstream ...
0
votes
1
answer
155
views
How to build PCRE 8.44 without linking to gcc
I'm building a custom version of Apache HTTPD with a whole slew of extra modules. As part of this, I'm linking against PCRE 8.44, which is working fine. However, lib/libpcrecpp.so.0.0.2 has a ...
4
votes
1
answer
8k
views
grant PHP permission to allocate executable memory
I received this message during an iTop installation. If you google this, it appears on commercial websites above their content.
Warning: filter_var(): Allocation of JIT memory failed, PCRE JIT will ...
6
votes
1
answer
2k
views
Apache HTTPd 2.2 is ignoring LocationMatch regex
I am trying to create a Reverse Proxy that match every URL except one in Apache 2.2.
It works on Apache 2.4 (Centos 7), but not in Apache 2.2 (Centos 6.6) ...
# Do not modify this
<LocationMatch "^...
-1
votes
1
answer
2k
views
nginx URL rewriting regex when URL contains a specific word but not other
Please consider the following URLs.
https://products.example.com/family/child
https://products.example.com/products/family/child
https://products.example.com/family/children
https://products.example....
0
votes
1
answer
2k
views
How to match nginx location block for non-whitespace character
I'm trying to configure a workaround for google's WontFix search behavior in nginx by having a simple subfolder for my searches.
So far this is what I have.
location ~* ^/search/(.*\..*)$ {
...
0
votes
1
answer
104
views
Nginx: is there an advantage, real or theoretical, of using "^.+\.ext$" instead of "\.ext$" in a regular expression location block?
Is there any reason, real or theoretical, that:
location ~* ^.+\.js$ {
access_log off;
log_not_found off;
expires max;
}
would be preferable over:
location ~* \.js$ {
access_log off;...
13
votes
1
answer
8k
views
Why is it unnecessary to escape "/" in Nginx regular expressions?
So I've made it a thing to finally learn about regular expressions. Normally when working with regular expressions it is necessary to escape delimiters (like "/") with a "\". But when I'm using ...
3
votes
0
answers
681
views
Postfix: Enforce sender address for some users only
I am looking for an option to enforce an envelope sender address in postfix for selected users, only. E.g., I want to permit [email protected] to send mails as [email protected], only, while all other ...
2
votes
1
answer
535
views
Multi-line PCRE w\ lookhead, count matches
I am trying to perform a regex that matches if both the word cat AND dog are in the regex with multi-line support
matches
cat asdjfaldsfj dog
####
does NOT match
cat adfasdf8989
####
matches
dog ...
2
votes
2
answers
4k
views
Upgrade PCRE to 8.40 on CentOS 7
When I do yum installed | grep pcre I get:
pcre.x86_64 8.32-15-el7_2.1 @updates
pcre-devel.x86_64 8.32-15-el7_2.1 @updates
How do I upgrade these to the most recent versions (...
0
votes
1
answer
936
views
Compile PHP 7.1.5 with PCRE 8.40
I tried to compile a PHP 7.1.5 with PCRE 8.40 on a legacy Ubuntu 12.04.05 LTS:
1, I compiled PCRE 8.40 from source to /usr/local/pcre.
2, configure PHP:
./configure --prefix=/usr/local/php7 --with-...
2
votes
2
answers
3k
views
Clamd won't start after update
Since updating clamd to 0.99.2-1.e15 on our RedHat 5 x86_64 system, it has failed to start successfully. The error we get is as follows:
LibClamAV Error: cli_pcre_compile: PCRE compilation failed at ...
0
votes
1
answer
1k
views
Apache location directive - PCRE negative combinations (match all but..)
Yes, I'm stuck still using apache2.2 on a system and I'm trying to use a PCRE with the apache Location directive looking for any URL not containing any images or similar. Here's some things I've ...
0
votes
2
answers
2k
views
Blacklisted client: why did Postfix not reject this email?
Answer
The best answer was on the postfix-users mailing list and it is summarized here for the benefit of serverfault's users.
I had forgotten soft_bounce = yes. Always switch it back to no after ...
1
vote
0
answers
1k
views
clamav installation with pcre in Amazon Linux
When we install ClamAV in our Amazon Linux ElasticBeanstalk instance with yum install clamav it gets installed without PCRE support, although the libraries are present in the instance.
LibClamAV ...
0
votes
1
answer
2k
views
rewrite nginx not capture optional value
I'm migrating a configuration to a new CMS and there are urls with the structure in the current page "/view-article/ID", some shortening of links added parameters to the end as "/view-article/ID/{...
0
votes
1
answer
5k
views
util_pcre.c:104: undefined reference to `pcre_free' while compiling Apache HTTPD 2.4.17. collect2: error: ld returned 1 exit status
On a new EC2, I am facing one type of problem while compiling httpd. It seems like code of Apache cannot find functions / function definitions from libraries.
Steps I took on a fresh RHEL to install ...
1
vote
1
answer
743
views
dict_pcre.so missing on debian
I've installed postfix as I normally do, using apt-get install postfix, but for some reason it's not including dict_pcre.so in the install. Is there something I've overlooked, or rather how and where ...
1
vote
2
answers
2k
views
Varnish installer cannot find PCRE when it is already installed
I am trying to install Varnish-Cache 4 on my Mac OS X 10.9.3.
But I get this error:
checking for PCRE... no
configure: error: Package requirements (libpcre) were not met:
No package 'libpcre' found
...
0
votes
1
answer
1k
views
Postfix regex for smtpd_command_filter
Some of my users are using Gmail to send mail to our domain (The mail server for which is hosted on a CentOS 5 machine with postfix). Sometimes, but not all the time, when they do, they get a ...
2
votes
1
answer
72
views
postfix HOLD Recieved non authenticated
i'm wondering if is possibile to put on hold emails that not have authenticated in Recieved header .
i've tryed with a simple negate operazione with pcre
!/^Received:.*Authenticated*/ HOLD
but don'...
1
vote
2
answers
5k
views
postfix pcre conditional REPLACE
I need to modify the "From:" header line in incoming e-mail messages only if "Message-Id:" starts with a defined string. So in main.cf I put:
header_checks = pcre:/etc/postfix/header_checks
and ...
4
votes
1
answer
6k
views
pcregrep is not matching regex (multiline?)
I don't understand why is first two is a match/hit, yet third is a miss?
-bash-3.2# cat 1361492805.M171838P41834.mx1.alexus.biz\,S\=12921\:2\,Sijm | pcregrep -q '.*languager.*' ; echo $?
0
-bash-3.2# ...
1
vote
4
answers
2k
views
greping multiple lines from MySql binlog
I have binlog from MySQL and I need to output certain time frame into a seperate file, how would I do that?
here is sample of what binlog file contains:
# at 460
#130120 0:09:17 server id 1 ...
0
votes
4
answers
1k
views
how to fix "Package pcre-6.6-6.el5_6.1.x86_64 already installed and latest version" alert need to update it to pcre-8.31?
Goodafternoon,
I am trying to update my pcre-6.6-6.el5_6.1.x86_64 package to pcre-8.31 following is my steps to do so:
Step
1: cd /etc/yum.repos.d
Made repository utter-ramblings.repo in it.
...
2
votes
3
answers
6k
views
Postfix: postmap error with pcre
I am using postfix-pcre on debian linux.
When I run postmap /etc/postfix/smtp_header_checks.pcre and postmap pcre:/etc/postfix/smtp_header_checks.pcre, I get the following error:
postmap: warning: ...
14
votes
2
answers
23k
views
What are PCRE limits?
In ModSecurity there are PCRE limits exceeded errors.
I know I can fix this by setting rules such as:
SecPcreMatchLimit 150000
SecPcreMatchLimitRecursion 150000
But, what are these rules actually ...
-1
votes
1
answer
1k
views
How do I recompile apache in CentOS? [closed]
I need to recompile apache with an external PCRE library. Any help would be much appreciated. Thanks.
1
vote
2
answers
13k
views
Postfix, sender_bcc - send copy on multiple adress
I have sender_bcc_maps = pcre:/etc/postfix/conf/sender_bcc in my postfix
in this file I have rules such as
/[email protected]/ [email protected]
Now i need to send blind copy to more than one email.
...
13
votes
4
answers
28k
views
mod_security - PCRE limits exceeded
Just about on every request I am getting the following error:
Rule execution error - PCRE limits exceeded (-8): (null).
After a bunch of googling the only solutions seem to be
a) Add the following ...
0
votes
1
answer
2k
views
using regex "\.php$" requires PCRE library in nginx.conf
I noticed while make install nginx, it told me PCRE is not available.
I installed PCRE: yum install -y pcre
When I restarted nginx, it shows this error:
using regex ".php$" requires PCRE ...
0
votes
1
answer
2k
views
Nginx can't find PCRE library on Ubuntu Server
I have been trying to get my Passenger and Nginx setup to work with php files but I am having problems with the PCRE regular expressions library. Install all went fine so I'm assuming it found the ...
0
votes
1
answer
1k
views
Using PCRE 8.20 with Nginx 1.0.11 and Passenger
I downloaded and extracted the nginx source to ~/nginx-1.0.11, then downloaded PCRE 8.20 directly since the latest version of the Passenger installer can't download it automatically. I did the typical ...
0
votes
1
answer
386
views
CentOS 5.0 PCRE Unicode properties support solution
I am getting the output of "pcretest -C"
UTF-8 support
**No Unicode properties support**
Newline character is LF
Internal link size = 2
POSIX malloc threshold = 10
Default match limit = ...
6
votes
3
answers
25k
views
Fixing Shared PCRE Library on CentOS
This is less a question about PCRE, and more a question about updating shared libraries. The distribution of CentOS I'm running only allows for yum upgrades to version 6.6, or somewhere similar.
I'm ...
4
votes
1
answer
2k
views
How to get pcre 8.x on Ubuntu 10.04 (Linode)
I'm trying to set up Bug Genie 3.x on my Linode server, and it is complaining because I have pcre 7.8 instead of 8.x. Doing an apt-get update and upgrade doesn't help and says that I have the latest ...
5
votes
2
answers
39k
views
PECL install/phpize error
This is my PHP setup
##################################################################
# setup PHP
##################################################################
# we use this to make inline ...
6
votes
2
answers
1k
views
Followed a terrible guide and ran "yum remove pcre*" on my CentOS 5.5. Now it appears the server is down
What can I do? Even "yum" is not available.
0
votes
2
answers
7k
views
nginx folder redirect
I'm trying redirect from an exact folder in nginx.conf
Given the URL:
domain.com/path1/path2/path3
Redirect to:
sub.domain.com/path1/path2/path3
Here's what I have so far:
location ~* ^/path1[\/?]$...
3
votes
3
answers
1k
views
PHP Kohana CentOS 5
Trying to deploy a Kohana based project in CentOS 5. Installed PHP 5.3.1 but still getting the following error.
Warning: preg_match() [function.preg-match]: Compilation failed: this version of PCRE ...
1
vote
1
answer
4k
views
PCRE isn't UTF8 enabled
I am attempting to run a regex on my site, and I am getting this response:
Compilation failed: support for \P,
\p, and \X has not been compiled at
offset 1
After googling for a bit, I've found ...