phpBB move - topics displaying outside table

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785

phpBB move - topics displaying outside table

Postby Gasdoc » Fri Oct 20, 2006 11:29 am

Hi
I've just moved my phpBB2 forum from "Fasthosts" to my own PC using Dynamic IP domain management with "No-IP".
I have the devside.net server package running Apache2 and php5.
My Fasthosts forum used an MSSQL database which seemed to rapidly fill up and was expensive.
I was however able to convert this with a small free utility to MySQL.
The forum works as it did before with one fault:

When viewing a "Topic" the appearance of the page changes dramatically.
The table containing the posts is left aligned and fills only about 60% of the page and it looks as if this is related to later posts being outside the table filling the right hand side of the page further down the page. Even further down the page the posts return to the lefthand side and remain outside the table. The first 5 posts display and then the "top of page" link moves to outside the 6th posts table.

There do appear to be some other problems such as "quotes" not appearing correctly.

I would be most grateful for any suggestions even if it meant just pointing me in the right direction. Unfortunately my phpBB is modded with a theme and some personal frontpage tweaks. So I have to ask the wider community for any clues you might have.

Below is a link to a suitable "Topic" page.

http://www.smokingcafe.com/phpBB2/viewtopic.php?t=24

I've soured the files viewtopic.php and viewtopic_body.tpl and cannot find any errors. I am left thinking it must be a database translation problem but can't find any relevant field using phpmyadmin.
I've turned on long arrays in php5 and the other problem is that php5 is not supported for phpBB2 although several posters have said it seems to work well.

If anyone has any other suggestions I would be most grateful.

Thanks
Phil
User avatar
Gasdoc
Registered User
 
Posts: 19
Joined: Fri Jul 28, 2006 2:13 pm
Location: Basingstoke UK

Postby Brf » Fri Oct 20, 2006 1:49 pm

You have a broken "begin-quote" tag in that last post of proper width. The End-Quote tag is closing your post-table.

Are you updated properly to 2.0.21?
User avatar
Brf
Support Team Member
Support Team Member
 
Posts: 31192
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

[quote]

Postby Gasdoc » Sat Oct 21, 2006 7:23 am

That sounds right but the begin quote is there its just displaying as text. Is that because the number within the quote tag is not referencing a valid quote? So either the number is wrong or the quote doesn't exist?

I have only ever installed phpBB 2.0.21 once. If there was an update doesn't it have a new version number?
User avatar
Gasdoc
Registered User
 
Posts: 19
Joined: Fri Jul 28, 2006 2:13 pm
Location: Basingstoke UK

Postby karlsemple » Sat Oct 21, 2006 7:28 am

then open your includes/functions_post.php


Find(around line 61):
Code: Select all
   foreach ($message_split as $part)
      {
         $tag = array(array_shift($matches[0]), array_shift($matches[1]), array_shift($matches[2]));
         $message .= preg_replace($html_entities_match, $html_entities_replace, $part) . clean_html($tag);
      }



after it make sure you have:
Code: Select all
$message = addslashes($message);
      $message = str_replace('"', '\"', $message);


and NOT:
Code: Select all
$message = addslashes($message);
      $message = str_replace('"', '\"', $message);
$message = str_replace('"', '\"', $message);



OR
Code: Select all
$message = addslashes($message);
      $message = str_replace('"', '\"', $message);
$message = str_replace('"', '\\"', $message);


OR
Code: Select all
$message = addslashes($message);
$message = str_replace('"', '\\"', $message);
Image
User avatar
karlsemple
Support Team Member
Support Team Member
 
Posts: 39388
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK

functions_post.php

Postby Gasdoc » Sat Oct 21, 2006 9:34 am

Yeah that code is correct in my file.
User avatar
Gasdoc
Registered User
 
Posts: 19
Joined: Fri Jul 28, 2006 2:13 pm
Location: Basingstoke UK

Re: functions_post.php

Postby karlsemple » Sat Oct 21, 2006 9:37 am

Gasdoc wrote:Yeah that code is correct in my file.



i dare you are correct, but i have had users tell me that in the past and then it turns out after pages of support that they have not :) if possible could you copy the contents of functions_post.php into a text file, save the text file and then upload it to your webhost and post the url to the text file here so i can just have a quick look if possible :)
Image
User avatar
karlsemple
Support Team Member
Support Team Member
 
Posts: 39388
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK

txt file url

Postby Gasdoc » Sat Oct 21, 2006 9:47 am

Thanks for your interest....
http://www.smokingcafe.com/functions_post.txt

As a troubleshooting step I have disabled bbcode posting.
Does it help to see how the code displays now?....

http://www.smokingcafe.com/phpBB2/viewtopic.php?t=24

Cheers Karlsemple!
User avatar
Gasdoc
Registered User
 
Posts: 19
Joined: Fri Jul 28, 2006 2:13 pm
Location: Basingstoke UK

Re: txt file url

Postby karlsemple » Sat Oct 21, 2006 9:57 am

Gasdoc wrote:Thanks for your interest....
http://www.smokingcafe.com/functions_post.txt

As a troubleshooting step I have disabled bbcode posting.
Does it help to see how the code displays now?....

http://www.smokingcafe.com/phpBB2/viewtopic.php?t=24

Cheers Karlsemple!



this is a long shot i saw this posted somewhere else for a similar problem :)

Open common.php

Find:
Code: Select all
unset($dbpasswd);


After that line add this line:

Code: Select all
$db->sql_query("SET SESSION sql_mode=''");
Image
User avatar
karlsemple
Support Team Member
Support Team Member
 
Posts: 39388
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK

common.php

Postby Gasdoc » Sat Oct 21, 2006 9:24 pm

That didn't make any difference.
We can't be far away from the solution.
Thanks so far.
Phil
User avatar
Gasdoc
Registered User
 
Posts: 19
Joined: Fri Jul 28, 2006 2:13 pm
Location: Basingstoke UK

Solved

Postby Gasdoc » Tue Oct 24, 2006 7:32 pm

Well perhaps not fully explained but I noticed all the text with a " in had had a / inserted before the ". i.e /"blah blah/".
When I examined all the post_text fields in the database I found that to be the case. It did not happen with a test new post.
So I can only assume that the conversion utility(MSSQL to MySQL) for some reason (a bug) made this "adjustment".
I have manually edited them out and all is well. It would have taken me much longer to work out the correct sql to do it automatically and anyway it was necessary to prove the theory.
Still many thanks for all your help.
Phil
User avatar
Gasdoc
Registered User
 
Posts: 19
Joined: Fri Jul 28, 2006 2:13 pm
Location: Basingstoke UK


Return to 2.0.x Support Forum

Who is online

Users browsing this forum: Yahoo [Bot] and 18 guests