I am having a weird issue with php preg_match. I am moving to my php
sites to a new server. On the old server all works well. On the new
server preg_match always returns false. If I log in via ssh and run
the script at the bash prompt as root preg_match works fine. Does
anyone have any thoughts on what would cause this issue? 6 2640
Hi,
Try setting error_reporting (E_ALL | E_STRICT) to see if any warnings
are being issued.
Print out the string you're searching in to see if it's what you
expect it to be...
Regards,
John Peters
On Mar 8, 8:54 pm, jsamdirect <supp...@jsamdi rect.comwrote:
I am having a weird issue with php preg_match. I am moving to my php
sites to a new server. On the old server all works well. On the new
server preg_match always returns false. If I log in via ssh and run
the script at the bash prompt as root preg_match works fine. Does
anyone have any thoughts on what would cause this issue?
On Mar 8, 9:49 pm, petersprc <peters...@gmai l.comwrote:
Hi,
Try setting error_reporting (E_ALL | E_STRICT) to see if any warnings
are being issued.
Print out the string you're searching in to see if it's what you
expect it to be...
Regards,
John Peters
I have determined (i think) that the issue is with apache. Is there a
way to compile apache so it will use the external pcre instead of the
internal?
On Mon, 10 Mar 2008 05:50:27 +0100, jsamdirect <su*****@jsamdi rect.com
wrote:
On Mar 8, 9:49 pm, petersprc <peters...@gmai l.comwrote:
>Hi,
Try setting error_reporting (E_ALL | E_STRICT) to see if any warnings are being issued.
Print out the string you're searching in to see if it's what you expect it to be...
Regards,
John Peters
I have determined (i think) that the issue is with apache. Is there a
way to compile apache so it will use the external pcre instead of the
internal?
<http://nl2.php.net/manual/en/ref.pcre.php>
"Installati on
Beginning with PHP 4.2.0 these functions are enabled by default. You can
disable the pcre functions with --without-pcre-regex. Use
--with-pcre-regex=DIR to specify DIR where PCRE's include and library
files are located, if not using bundled library."
--
Rik Wasmus
jsamdirect wrote:
On Mar 8, 9:49 pm, petersprc <peters...@gmai l.comwrote:
>Hi,
Try setting error_reporting (E_ALL | E_STRICT) to see if any warnings are being issued.
Print out the string you're searching in to see if it's what you expect it to be...
Regards,
John Peters
I have determined (i think) that the issue is with apache. Is there a
way to compile apache so it will use the external pcre instead of the
internal?
Why would the issue be with Apache? It doesn't have anything to do with
any of the pcre functions.
John has a good idea to start. Also, ensure display_errors is enabled.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
On Mar 10, 9:37 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
jsamdirect wrote:
On Mar 8, 9:49 pm, petersprc <peters...@gmai l.comwrote:
Hi,
Try setting error_reporting (E_ALL | E_STRICT) to see if any warnings
are being issued.
Print out the string you're searching in to see if it's what you
expect it to be...
Regards,
John Peters
I have determined (i think) that the issue is with apache. Is there a
way to compile apache so it will use the external pcre instead of the
internal?
Why would the issue be with Apache? It doesn't have anything to do with
any of the pcre functions.
John has a good idea to start. Also, ensure display_errors is enabled.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===
I get these errors:
[client 0.0.0.0] PHP Warning: preg_match: internal pcre_fullinfo()
error -3 in /var/www/vhosts/mydomain.com/httpdocs/config/functions.php
on line 101, referer: http://www.mysite.com/
I have two version of apache running. One is 2.0.59 and was installed
via yum. The other is 2.0.63 which I compiled and installed. The
2.0.59 works with no problem, while the 2.0.63 fails with the PHP
errors above.
Honestly, I have no clue to where the actual issue is. But is seems to
me that since I can run the script successfully at the command prompt,
i.e.; #php test.php, and it works with apache 2.0.59... that the issue
is with apache 2.0.63.
On Mar 10, 9:29 am, jsamdirect <supp...@jsamdi rect.comwrote:
On Mar 10, 9:37 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
jsamdirect wrote:
On Mar 8, 9:49 pm, petersprc <peters...@gmai l.comwrote:
>Hi,
>Try setting error_reporting (E_ALL | E_STRICT) to see if any warnings
>are being issued.
>Print out the string you're searching in to see if it's what you
>expect it to be...
>Regards,
>John Peters
I have determined (i think) that the issue is with apache. Is there a
way to compile apache so it will use the external pcre instead of the
internal?
Why would the issue be with Apache? It doesn't have anything to do with
any of the pcre functions.
John has a good idea to start. Also, ensure display_errors is enabled.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===
I get these errors:
[client 0.0.0.0] PHP Warning: preg_match: internal pcre_fullinfo()
error -3 in /var/www/vhosts/mydomain.com/httpdocs/config/functions.php
on line 101, referer:http://www.mysite.com/
I have two version of apache running. One is 2.0.59 and was installed
via yum. The other is 2.0.63 which I compiled and installed. The
2.0.59 works with no problem, while the 2.0.63 fails with the PHP
errors above.
Honestly, I have no clue to where the actual issue is. But is seems to
me that since I can run the script successfully at the command prompt,
i.e.; #php test.php, and it works with apache 2.0.59... that the issue
is with apache 2.0.63.
Looks like Jerry was right. I just reinstalled php by compiling it
without the pcre flag and it is working now. That is, php is now using
the internal bundled pcre instead of the one installed on the system This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: fartsniff |
last post by:
hello all,
here is a preg_match routine that i am using. basically, $image is set in
some
code above, and it can be either st-1.gif or sb-1.gif (actually it randomly
picks
them from about 100 gifs).
then it processes them based off of which image type it selected, either the
st- 's or
the sb- 's.
|
by: Mark Woodward |
last post by:
Hi all,
I'm trying to validate text in a HTML input field.
How do I *allow* a single quote?
// catch any nasty characters (eg !@#$%^&*()/\)
$match = '/^+$/';
$valid_srch = preg_match($match, $res_description);
if (!$valid_srch) {
...
|
by: mantrid |
last post by:
Hello
Found this piece of code using preg_match to check file types during upload
of files.
$allowed_file_types = "(jpg|jpeg|gif|bmp|png)";
preg_match("/\." . $allowed_file_types . "$/i",
$_FILES)
I understand the basic preg_match but am confused as to how the string
pattern part is working i.e.
"/\." . $allowed_file_types . "$/i"
|
by: cainwebdesign |
last post by:
I need to create a simple page to find the .gif file below from the
page below. No matter what I try it doesn't work.... Any ideas?
http://www.toysrus.com/product/index.jsp?productId=2327085
prod_AddtoCart.gif
|
by: mikeinspain |
last post by:
hi there..
I have a php form script that is pretty much there... I am however having a problem when I go to test the form. the mail comes through into my inbox displaying the information ok apart from the tel no.. field.. where it displays the entered email address.
the code is below.. any help appreciated... :-)
<?php
if (isset($_POST) && ($_POST=="send")) {
/******** START OF CONFIG SECTION *******/
| |
by: Henri |
last post by:
Hello,
I am trying to split a string that contains parentheses; the aim here is
to keep the part that's before the opening parenthese:
the string (quoted here) is "36 (72 cm)"
First I want to know if the string contains at least an openning
parenthese; if it does, I split it and extract the first token (ie "36 ").
My code follows
|
by: JanDoggen |
last post by:
function vldLicense($lic)
{
echo "called with lic: ". $lic . "<br>";
echo preg_match('', $lic) . "<br>";
if (preg_match('{4}-{4}-{4}-{4}', $lic) == 0) return false;
return true;
}
gives me:
|
by: chadsspameateremail |
last post by:
I might have found a problem with how preg_match works though I'm not
sure.
Lets say you have a regular expression that you want to match a string
of numbers. You might write the code like this:
preg_match( '/^+$/', $TestString );
OK everything seems fine. However, did you know if you pass the
following to preg_match: "12345\n" it will return that a match
occurred?!? Even though the newline is not a valid character in our
regular...
|
by: Thomas Mlynarczyk |
last post by:
Hello,
I want to split a given string into tokens which are defined by regexes:
// example tokens - a bit more complex in real
$tokens = array(
'NUMBER' ='~^\d+~',
'NAME' ='~^+~',
'ANY' ='~^.~' ); // make sure there is always a match
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |