xoops forums

Ft24v2

Just popping in
Posted on: 2008/8/12 8:26
Ft24v2
Ft24v2 (Show more)
Just popping in
Posts: 86
Since: 2007/1/30
#1

X_Movie Fatal Error

Out of nowhere i got this error from the X_Movie module:


Fatal errorCannot redeclare getserverstats() (previously declared in /home/wiitopi2/public_html/modules/x_movie/include/functions.php:276in /home/wiitopi2/public_html/modules/mpmanager/include/functions.php on line 709


Ive tried disabling the Module, but that doesn't help.

This error mentions the mpmanager module so im thinking this has something to do with that module, maybe a compatibility issue ?

Also the Debug line gives me this:
Warning: Class 'XoopsTree' is deprecatedcheck 'XoopsObjectTree' in tree.php in file /class/xoopstree.php line 45

System Environment:

XOOPS Version - XOOPS 2.3.0 RC
PHP Version - 5.2.6
MySQL Version - 5.0.51a-community
Server API Version - cgi
OS Version - Linux

frankblack

Just can't stay away
Posted on: 2008/8/12 8:39
frankblack
frankblack (Show more)
Just can't stay away
Posts: 830
Since: 2005/6/13
#2

Re: X_Movie Fatal Error

You need to know the name of the file where getserverstats() is in. Open both functions.php with an editor. The file is embedded with include or require. Change it to include_once or require_once. Should be working.

About the warning: It is just a warning. This is not a fault, but the module developers should change to xoopsobjecttree in the next release.

Ft24v2

Just popping in
Posted on: 2008/8/12 8:51
Ft24v2
Ft24v2 (Show more)
Just popping in
Posts: 86
Since: 2007/1/30
#3

Re: X_Movie Fatal Error

Alright so i followed you up until " The file is embedded with include or require ". Ive located both funtion files, and found the getserverstast funtion in each file, what do i change to include_once.

( Sorry but i know little php )

frankblack

Just can't stay away
Posted on: 2008/8/12 8:56
frankblack
frankblack (Show more)
Just can't stay away
Posts: 830
Since: 2005/6/13
#4

Re: X_Movie Fatal Error

Ups! So you have to change the function for one module. Just take xmovie for example. Search the whole module for getserverstats and rename all occurences in xmovie to getserverstatsxmovie

Ft24v2

Just popping in
Posted on: 2008/8/12 9:02
Ft24v2
Ft24v2 (Show more)
Just popping in
Posts: 86
Since: 2007/1/30
#5

Re: X_Movie Fatal Error

So basically changing the name of the funtion completly then ? Alright ill do that and share how it worked out

wrecked

Just popping in
Posted on: 2008/11/23 8:54
wrecked
wrecked (Show more)
Just popping in
Posts: 55
Since: 2006/12/5
#6

Re: X_Movie Fatal Error

thanks frankblack.

it did thejob :)