Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

preg_match_all -> infinite loop ?! php bug ?
Goto page Previous  1, 2
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
ruudboon
Smarty Rookie


Joined: 03 Mar 2007
Posts: 8

PostPosted: Sat Mar 03, 2007 3:54 pm    Post subject: Reply with quote

Same problem over here.
Upgrade to php 5.2.1_3 doesn't help.
Downgraded pcre to 6.7 work fine (Pfff..)
Is this a bug in Smarty or in pcre?
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Sat Mar 03, 2007 5:18 pm    Post subject: Reply with quote

Why don't you ask in a PCRE related Forum/Mailing List?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ruudboon
Smarty Rookie


Joined: 03 Mar 2007
Posts: 8

PostPosted: Sun Mar 04, 2007 12:00 pm    Post subject: Reply with quote

Because i'm not sure if it is related to PCRE or to smarty and I solved the problem with the help from this topic.
I've post a bug report on the sourceforge project of PCRE.
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Sun Mar 04, 2007 8:26 pm    Post subject: Reply with quote

I cannot reproduce this. Not even with pcre 7.0.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
drucci
Smarty n00b


Joined: 17 Jan 2007
Posts: 3

PostPosted: Mon Mar 05, 2007 12:17 am    Post subject: Reply with quote

I encountered the same problem, trying an alternate version of pcre.
I was using pcre-utf8-7

FreeBSD 6.2-RELEASE
php5-5.2.1_3
php5-pcre-5.2.1_3


Fixed by downgrading pcre! (tried reinstalling php5-pcre-5.2.1_3, didnt help)
_________________
Hi
Back to top
View user's profile Send private message Visit poster's website
ruudboon
Smarty Rookie


Joined: 03 Mar 2007
Posts: 8

PostPosted: Mon Mar 05, 2007 9:42 am    Post subject: Reply with quote

Could it be a freebsd problem messju? Are your running freebsd?
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Mon Mar 05, 2007 9:50 am    Post subject: Reply with quote

ruudboon wrote:
Could it be a freebsd problem messju?


Since all people who report here are running FreeBSD, it looks like a FreeBSD related problem.

Quote:
Are your running freebsd?


yes, I tested on FreeBSD (of course).
Back to top
View user's profile Send private message Send e-mail Visit poster's website
drucci
Smarty n00b


Joined: 17 Jan 2007
Posts: 3

PostPosted: Tue Mar 06, 2007 12:23 pm    Post subject: Reply with quote

messju, did you try to reproduce it with ports/devel/pcre-utf8/

Also, i noticed that if i downgraded and did not restart my webserver, the bug would persist on php scripts handled via apache until I restarted.
_________________
Hi
Back to top
View user's profile Send private message Visit poster's website
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Tue Mar 06, 2007 12:47 pm    Post subject: Reply with quote

drucci wrote:
messju, did you try to reproduce it with ports/devel/pcre-utf8/


How do you I tell ports to use a certain version of libpcre for php5-pcre?
(EDIT: especially for the apache2-sapi of php5 which seems to use some other pcre as the CGI/CLI-sapi)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
drucci
Smarty n00b


Joined: 17 Jan 2007
Posts: 3

PostPosted: Tue Mar 06, 2007 1:27 pm    Post subject: Reply with quote

Hmm, now I'm second guessing myself w/ whether or not pcre7.0 was actually being used by php. I have 6.6_1 installed but php says its using 6.7... In any case, if I deinstall that pcre & install ports/devel/pcre-utf8/ its enough to cause the infinite loop regardless if php is actually using that library or not. I'm going to reinstall my current copy of pcre and reinstall pcre-utf8 and see if php_info says I'm using that..

php still reports that its using 6.7
_________________
Hi
Back to top
View user's profile Send private message Visit poster's website
elibrarian
Smarty n00b


Joined: 07 Mar 2007
Posts: 1
Location: Michigan

PostPosted: Wed Mar 07, 2007 6:42 pm    Post subject: Found a solution ... Reply with quote

On FreeBSD (v6.2 at least) installs, using the latest from the ports tree, this error will occur depending on where the pcre.so module is referenced/placed in the php/extensions.ini file!

It was in the middle somewhere, and at the end (after reinstalling php5-pcre), and it did not work. I put it at the top of the file, and everything seems to be OK ... so far!

Jim Stewart
Back to top
View user's profile Send private message Visit poster's website
ruudboon
Smarty Rookie


Joined: 03 Mar 2007
Posts: 8

PostPosted: Thu Mar 08, 2007 1:25 pm    Post subject: Reply with quote

messju wrote:
How do you I tell ports to use a certain version of libpcre for php5-pcre? (EDIT: especially for the apache2-sapi of php5 which seems to use some other pcre as the CGI/CLI-sapi)

Use the port : portdowngrade to downgrade pcre

- Make deinstall in the port pcre
-I use portdowngrade to downgrade the port.
- Make install in the port pcre
Back to top
View user's profile Send private message
ruudboon
Smarty Rookie


Joined: 03 Mar 2007
Posts: 8

PostPosted: Tue Mar 13, 2007 11:05 am    Post subject: Reply with quote

Bug fixed.

See http://bugs.php.net/bug.php?id=40630&edit=1
Back to top
View user's profile Send private message
sayad
Smarty n00b


Joined: 28 Feb 2008
Posts: 4

PostPosted: Sat Mar 15, 2008 11:06 pm    Post subject: Reply with quote

Thanks ruudboon. Smile










__
Pur Water Filter
Back to top
View user's profile Send private message
ruudboon
Smarty Rookie


Joined: 03 Mar 2007
Posts: 8

PostPosted: Sun Mar 16, 2008 12:45 pm    Post subject: Reply with quote

No Prob Cool
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP