Help - Search - Members - Calendar
Full Version: Cannot Redeclare Class
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
tayker
My site is dynamic, and I did a clean upgrade to 4.0 from 3.35 (I deleted all the MT 3.35 files, uploaded 4.0 to a new location/directory in my cgi-bin, and I did update the paths in config.cgi and under blog publishing). What I don't understand is I get the following error on my index.html (viewable when you view source, or W3C checked). However, I don't get the error on my individual archive posts. I quoted exactly how it appears at the end:

QUOTE
</html><br />
<b>Fatal error</b>: Cannot redeclare class mt in <b>/home/tayker3/public_html/cgi-bin/mt/php/mt.php</b> on line <b>16</b><br />


The only difference between my index and archive is I removed the trackback and comment MT codes from the index page.
R-J
I also did a fresh installation of MT4, new databases and everything, and I get that same error on my main index page even with the default template and styles.
R-J
I waited for a 4.01 final version, but I find the same error in my www.ricardo.pt website. My Movable Type is not usable like this, and no one is able to help me.
khalido
I am getting the same error on dynamic pages.

CODE
Fatal error: Cannot redeclare class mt in /home/offroadp/public_html/cgi-bin/mt/php/mt.php on line 15


The interesting thing is that I reinstalled MT 4 in a new directory, MT4, yet it is still referring to the old installation.

Static pages and everything else works fine, only dynamic pages are problematic.

Update: Fixed the issue, the file mtview.php in the root blog directory was pointing to both the old mt directory and the new one. Deleted the line pointing to the old one, and it works now! Also turned of caching, which seemed to help also.
mtboughuser
I've lived with this annoying problem on my blog for months and finally found the solution so had to post it: (thanks to Mark Carey)

After you've switched over to dynamic publishing and are getting this error, do the following:

1. Using FTP or a file manager, delete or rename the mtview.php in your blog's root directory.

2. Then go the Publishing Settings for the blog and hit the Save button.

Now try your site - the error will have disappeared.

It seems MT just needs encouragement to regenerate the correct version of that mtview.php file

(you'll need to repeat the above for all blogs)

Annoyance, over!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.