Joomla! Discussion Forums



It is currently Thu Nov 26, 2009 7:32 am (All times are UTC )

 




Post new topic Reply to topic  [ 3 posts ] 
Author Message
Posted: Fri Dec 28, 2007 11:27 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Fri Dec 28, 2007 11:24 pm
Posts: 2
Hi,

I recently upgraded from php4/apache1.3 to php5/apache2.2. Now some topics on the forum don't display any more. In the errorlog is this error:

8: Undefined offset: 0
File: /home/xxx/public_html/joomla/components/com_smf/smf.class.php
Line: 455

or

8: Undefined offset: 0
File: /home/xxx/public_html/joomla/components/com_smf/smf.class.php
Line: 449


This is line 441-462 from smf.class.php. It has something to do with $matches[0] returning a empty value I think. Something similair as in this topic: http://www.joomlahacks.com/component/op ... pic,2503.0 Only there it is a notice, and on my site the forum disappears.

Code:
            if (empty($headers) || empty($keywords) || empty($css)) {
                //if one is empty rebuild all
                $headers = '';
                $keywords = '';
                $css = '';
                $this->debug .= 'loading headers';
                $regex = '/<head>.*<\/head>/smi';
                preg_match($regex, $buffer, $matches);
                $headers = $matches[0];

                $regex = '/name="keywords" .*" \/>/i';
                preg_match($regex, $headers, $matches);
                $search = array ('/.*content="(.*)".*/i');
                $replace = array ('$1');
                $keywords = preg_replace($search, $replace, $matches[0]);

                $regex = '/<link rel="stylesheet" .*" \/>/';
                preg_match_all($regex, $headers, $matches);

                foreach ($matches[0] as $key => $val) {
                    $css .= $val."\n";
                }


Could someone please help?


Top
   
 
Posted: Sun Dec 30, 2007 5:52 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Fri Dec 28, 2007 11:24 pm
Posts: 2
Nobody has a idea what is causing this? I did some more research, and I found only 1 other person with the same problem. It was caused by an corrupted table. All my tables are fine according to MySQL. I also noticed that these forumtopics are only not readable by moderators and higher, and some members. When I log out, or log in to a normal user account the topic displays just fine.

I'm runing joomla 1.1.13, SMF 1.1.4, JSMF 2.0.2.1 with php 5.2.5 en apache 2.2.6.

If anyone could help me with this, it would be really appreciated!


Top
   
 
Posted: Mon Mar 03, 2008 7:02 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Fri Mar 03, 2006 3:26 pm
Posts: 267
Location: Canuck via MKE
Repairing some corrupt tables in the DB solved this for me. There are some other fixes discussed on joomlahacks.com.

_________________
Victor Drover - Curator, Joomla Extensions Directory
http://dev.anything-digital.com
The home of JCal Pro (the Joomla event calendar) and sh404SEF - SEO & security for Joomla


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

Quick reply

 



Who is online

Users browsing this forum: No registered users and 2 guests


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