Webinterface data.php syntax error (2005_11_07 patch) (1 Viewer)

htpcoz

Portal Pro
July 25, 2005
127
1
Brisbane
Home Country
Area: Webinterface
MP Version:
CVS build from 15/11/2005,
Webinterface 0.3.2 (Patch 2005_11_07_19_45)
Skin: BlueTwo
Windows Version: Windows XP SP2, .NET 2.0
CPU Type: Intel P4 2.8Ghz
Memory: 512MB, DualChannel
Motherboard Chipset: ? (Intel 865)
Video Card: Radeon X700
Video Card Driver: Catalyst 5.9
Video Card Resolution: 1920x1080i
Video Render Type: VMR9
Video Codec Type & Version: Nvidia
Audio Codec Type & Version: Nvidia
TV Card: DNTV
TV Card: Haup 150MCE
Optional Log: N/A
Optional References:N/A

Synopsis:

The Web interface intermittently generates the following message;

Parse error: parse error, unexpected ';' in C:\Program Files\Team MediaPortal\MediaPortal\MPWebControl\htdocs\webscheduler\functions\data.php on line 11

It appears that the data.php file is constantly rewritten as you traverse the web interface, sometimes when the file is rewritten it is rewritten with some values missing as follows:

$defaultPaddingStart = ;
$defaultPaddingEnd = ;
?>

In this state I need to edit the data.php file manually to restore operation, and then after a variable number of actions in the web scheduler the file will again become corrupted.
 

htpcoz

Portal Pro
July 25, 2005
127
1
Brisbane
Home Country
OK I think I've found what the problem is...

It is related to when you change the channel group, there is some code in there that re-saves the configuration file, however the function call does not include to two new arguments (for padding), so these values are saved as empty strings...

In function.php:

function doTVGroup_HTML($param,$updater)
{

.....

saveConfig(array($MPpath,$dbpath,$primetime,$showTB,$timeform,$language,$param,$viewlegend,$viewchannelno));

}

change this last line to;

saveConfig(array($MPpath,$dbpath,$primetime,$showTB,$timeform,$language,$param,$viewlegend,$viewchannelno,1,10));

This hardcodes the padding values of 1 and 10 in, which fixes the problem with the corrupted file, however a better option would be to store this in a global variable (just like $MPpath is) and call upon that variable in this place.

But in the short term if you hack this in you won't end up with the corrupted data.php.
 

Maschine

Retired Team Member
  • Premium Supporter
  • June 15, 2004
    768
    86
    Germany
    Home Country
    Germany Germany
    Hi htpcoz,

    thanks for reporting this and giving also the solution :) I never use these channel groups, so that's why I didn't notice ;-) I will change this asap, though I think there's no need for hardcoded values as the padding time already is used as global value like the path...

    Thanks again,
    Maschine
     

    Maschine

    Retired Team Member
  • Premium Supporter
  • June 15, 2004
    768
    86
    Germany
    Home Country
    Germany Germany
    Khris said:
    Now if I can only get the damn Web Remote to show a screenshot, I'll be even happier! :D

    That's (as I was said) a problem because the title of the MP program window changed it's name to "MediaPortal" instead of "Media Portal" and so it's not recognized correctly anymore. I'll look at the webinterface soon and then also try to fix this bug.

    Maschine
     

    ronilse

    Retired Team Member
  • Premium Supporter
  • July 19, 2005
    4,422
    283
    Moss
    Home Country
    Norway Norway
    You can easily change this by open "snapshot.asmx" with notepad & find "winHandle = GetWindow( "Media Portal" )" and edit "Media Portal" to "MediaPortal".

    Works fine here... :lol:
    Regards
    Roy
     

    Khris

    Portal Pro
    July 2, 2005
    449
    0
    Edmonton, AB
    Home Country
    Canada Canada
    ronilse said:
    You can easily change this by open "snapshot.asmx" with notepad & find "winHandle = GetWindow( "Media Portal" )" and edit "Media Portal" to "MediaPortal".

    Works fine here... :lol:
    Regards
    Roy

    WOOT! Thanks! :) I downloaded an updated snapshot.asmx from the website thinking that would fix it however it didn't, and I wasn't sure a fix would be this easy! :D
     

    Maschine

    Retired Team Member
  • Premium Supporter
  • June 15, 2004
    768
    86
    Germany
    Home Country
    Germany Germany
    ronilse said:
    You can easily change this by open "snapshot.asmx" with notepad & find "winHandle = GetWindow( "Media Portal" )" and edit "Media Portal" to "MediaPortal".

    Coool, thanks ronilse :) So I don't need to search 8)

    Maschine
     

    Users who are viewing this thread

    Top Bottom