Path problem after moving from one directory to another

Converting from other board software? Good decision! Need help? Have a question about a convertor? Wish to offer a convertor package? Post here.
Ideas Centre
Locked
Bono007
Registered User
Posts: 14
Joined: Sat Jun 14, 2003 10:20 am
Contact:

Path problem after moving from one directory to another

Post by Bono007 »

In FAQ it says:
After verifying the settings in the ACP, you can delete the install directory to enable the board. The board will stay disabled until you do so.

Once you are pleased with your new installation you may want to give it the name of your old installation, changing the directory name. With phpBB3 this is possible without any problems - but you may still want to check your cookie settings within the administration panel, if the cookie path need to be adjusted prior to renaming.
I have renamed directory from phpBB3 to forum, and updated script path accordingly. But when i try to post reply in older imported topic i get this:
Fatal error: Cannot redeclare class bbcode in /home/www/public_html/phpBB3/includes/bbcode.php on line 23
Where is forum pulling that old path? I checked config and mysql database and i can't find where to change path to look into forum directory and not phpBB3 directory.

I have tried to clear cache also.
On imported topics it throws that error but if i create new topic and post reply everything works.
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: Path problem after moving from one directory to another

Post by D¡cky »

That does look like a cache problem. Empty the cache with your ftp program or your hosting control panel file manager. Delete everything except for .htaccess and index.htm.
Have you hugged someone today?
Bono007
Registered User
Posts: 14
Joined: Sat Jun 14, 2003 10:20 am
Contact:

Re: Path problem after moving from one directory to another

Post by Bono007 »

I have tried that no luck. It is shame that in config you cannot put manually absolute path so this kind of thing do not happen.
I did clean install again but this time from right directory and everything works fine, shame i have lost 5 hours checking database and files if i can find path that is entered somewhere in there.

Thanks anyway
`checho`
Registered User
Posts: 63
Joined: Fri Nov 12, 2004 7:08 pm
Contact:

Re: Path problem after moving from one directory to another

Post by `checho` »

I also have the same problem after moving my board from one directoy to another. I edited in the database phpbb_config -> script_url and the cookie stuff for the new URL but there are still some traces of the old URL somewhere. I see the error message on almost every try to reply to a topic.

Fatal error: Cannot redeclare class bbcode in /var/www/old/includes/bbcode.php on line 0
where the displayed path to bbcode.php is still the old one before the board was moved.

I am thinking of making a database backup and a fresh installation of phpBB in the new directory, and then importing the database back in place of the one that was newly created by the fresh installation. But if the trace to the old URL is somewhere in the database I would not help myself I guess.

Any help is appreciated.
Thanks.
tomekst
Registered User
Posts: 1
Joined: Mon Mar 22, 2010 10:02 pm

Re: Path problem after moving from one directory to another

Post by tomekst »

I had the same problem.

I fixed it as follows:

In includes/functions_posting.php function topic_review I changed:

Code: Select all

	
// Instantiate BBCode class
	if (!isset($bbcode) && $bbcode_bitfield !== '')
	{
		include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
		$bbcode = new bbcode(base64_encode($bbcode_bitfield));				
	}
for

Code: Select all

	
// Instantiate BBCode class
	if (!isset($bbcode) && $bbcode_bitfield !== '')
	{
		if (!class_exists('bbcode'))
		{
			include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
		}
		$bbcode = new bbcode(base64_encode($bbcode_bitfield));				
	}
I hope I helped
Locked

Return to “[3.0.x] Convertors”