Joomla! Discussion Forums



It is currently Tue Nov 24, 2009 5:21 pm (All times are UTC )

 




Post new topic Reply to topic  [ 1 post ] 
Author Message
Posted: Wed Jun 18, 2008 4:23 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun May 13, 2007 2:31 pm
Posts: 9
I have read about this problem over and over again - it happened to me as well. My setup was:

J!1.12
CB 1.1
SMF 1.1.2
JSMF 2.0

Everything was fine until suddenly any topic that had more than 1 page was not showing up (people have experienced funny other issues too). I went around hunting for solutions but nothing helped. It seems as it is an issues with the php 5.2.5 upgrade - almost everybody who has experienced this is because of the upgrade.

My 1st instinct was to take the time to upgrade J!1.15, and SMF to 1.1.4 and use the new JSMF 2.0.21a bridge - that didn't help.

Solution 1: (didn't work for me because not all shared hosts allow this)

.htaccess

add the following line to switch to php 5.1

Code:
AddHandler application/x-httpd-php51 .php .php5 .php4 .php3


Soluiton 2: (also didn't work for me)

Simply go to the Admin section of SMF - Posts and Topics, and change your posts displayed per page to something lower (play with the values, apparently results vary)

Solution 3: (this worked for me :))

Open smf.class.php in /components/com_smf

find:
Code:
$regex = array('/<!DOCTYPE.*<body>/smi', '/<\/body>/i', '/<\/html>/i');
$buffer = preg_replace($regex, array('', '', ''), $buffer);
unset($matches, $keywords, $css, $search, $replace, $headers, $regex);


replace with:
Code:
//Regex broken with PHP 5.2.5           
//$regex = array('/<!DOCTYPE.*<body>/smi', '/<\/body>/i', '/<\/html>/i');
//$buffer = preg_replace($regex, array('', '', ''), $buffer);
//unset($matches, $keywords, $css, $search, $replace, $headers, $regex);
$needle = '<body>';
$buffer = strstr($buffer, $needle);
$buffer = substr($buffer, strlen($needle));
$regex = array('/<\/body>/i', '/<\/html>/i');
$buffer = preg_replace($regex, array('', ''), $buffer);
unset($matches, $keywords, $css, $search, $replace, $headers, $regex, $needle);


The explanation for this was:
Quote:
"it is related to the new php 5.2.5 versions regular expression library. most isps have recently updated. either this is a bug or something they have changed in how the regexes are evaluated"


Joomlahacks seems to be down atm hence why I have put together the above-list of suggested fixes - 1 worked for me, hopefully this will work for some of you too.

Good Luck

PS. I am not sure if I am breaking any SMF licenses here - if I am plz feel free to delete this post.


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group