Webinterface plugin (2 Viewers)

A

Anonymous

Guest
I decided to give the web interface a try today. My MP machine is not finished as yet and is in my office lab while its being put together so I installed the web interface on my Thinkpad T-40 where I have a test instance of MediaPortal. This notebook also serves as a development platform for PERL web applications so I had to stop IIS before using it.

On this machine MP and the web interface are installed in "E:\program files\mediaportal\". In this configuration the web interface accesses the TV channel and program database without a problem, but for some reason thinks MP is not running. This is no big deal in this case as I just wanted to get a taste of the interface and mechanism. I can access the channel and program database so at least I did get to "play with it."

Two strange things however. As I said it thinks that MP is not running and no matter what I set as the "thumbs' path the logos don't show up. The source of the output webpage shows the image source as "/MPthumbs/image_file.png". The MP logos are stored in the "/thumbs/tv/logos/" directory and MP accepts JPGs which is what mine are.

Nicely done and an excellent tool for MP and so especially for my household. Every member of my family has a notebook on our WLAN and all of them are almost always turned on (once my MP machine is up and running it will be the 8th PC in my house!)

Just out of curiosity, why did you opt to use Apache rather than the inbuilt IIS that is part of XP Pro? Do you have any guidance available on moving the application to use IIS rather than Apache?
 

samuel337

Portal Pro
August 25, 2004
772
0
Melbourne, Australia
jsteele said:
On this machine MP and the web interface are installed in "E:\program files\mediaportal\". In this configuration the web interface accesses the TV channel and program database without a problem, but for some reason thinks MP is not running. This is no big deal in this case as I just wanted to get a taste of the interface and mechanism. I can access the channel and program database so at least I did get to "play with it."

Two strange things however. As I said it thinks that MP is not running...
Hmm... interesting. What version of MP are you using? Make sure that when you go into MP configuration, plugins section, that the 'External Control Plugin' is enabled. Also, check the MP log file and see if there's a line similar to "ExtControl: remoting initialised".

jsteele said:
...and no matter what I set as the "thumbs' path the logos don't show up. The source of the output webpage shows the image source as "/MPthumbs/image_file.png". The MP logos are stored in the "/thumbs/tv/logos/" directory and MP accepts JPGs which is what mine are.
Its currently hard-wired for png files - it was a decision made by maschine, but I'll talk to him able making it accept jpg and gif files as well. Programatically it would be hard because currently it asks for the logo from http://localhost/MPthumbs/image_file.png and if that does not exist, apache will return the nochannellogo.gif file (http://localhost/MPthumbs is an apache alias to your MP logos folder). It would be hard to test for jpg and gif and other graphics formats. Using the alternate method (setting the 'thumbs' path), it is easier to solve the problem however it will involve testing for file existence multiple times (once for png, then jpg then gif). Maybe there should be a setting that specifies what the logo extension is... we'll have a look into this.

jsteele said:
Nicely done and an excellent tool for MP and so especially for my household. Every member of my family has a notebook on our WLAN and all of them are almost always turned on (once my MP machine is up and running it will be the 8th PC in my house!)
Thanks! 8 PCs? that's one computerised household!

jsteele said:
Just out of curiosity, why did you opt to use Apache rather than the inbuilt IIS that is part of XP Pro? Do you have any guidance available on moving the application to use IIS rather than Apache?
The main reason is ease of installation automation and configurability. It is much easier for me to install apache and php and write out a config file than for me to write out a huge set of instructions telling people how to install IIS, then install PHP support, then setting up websites and permissions etc. The other thing is that IIS is not included in XP Home.

To setup the app on IIS, install the setup file so the files are extracted and the plugin is installed. Don't install apache as a windows service.

Now install PHP support into IIS if you haven't already done so (see www.php.net). Also make sure ASP.NET support is installed into IIS (if not, navigate to \windows\microsoft .net\<1.1 version number> and run aspnet_regiis -i).

Now setup three websites in IIS:
1. Setup one called MPExtControlWS and map this to mediaportal\MPWebControl\htdocs\MPExtControlWS. Make this a web app. It should be accessible at http://localhost/MPExtControlWS.
2. Setup another one called webscheduler (or at the root if you wish) and map this to mediaportal\MPWebControl\htdocs\webscheduler. PHP support needs to be activated for this website (if needed - I haven't setup PHP under IIS before, but it should be pretty easy and instructions should be on www.php.net). This may have to be made a web app as well.
3. Setup a final website called MPthumbs (accessible by http://localhost/MPthumbs). Link this to the mediaportal\thumbs\tv\logos folder. Make the 404 page http://localhost/webscheduler/nochannellogo.gif.

It should work now - as I said its untested so report back if you have issues or a better or more detailed method.

Lastly, all security permissions are your responsibility. In the bundled apache server, I have limited web service to local network connections only, and the webscheduler only accessible with a username/password.

HTH

Sam
 
A

Anonymous

Guest
Sam

Thanks very much for your reply.

I'm using 0.1.0.3 the latest version I believe. Ah, I didn't check the MP Plugin config section, that may be it.

I think the option selection could be very simple --- A) Use MP Logos (in which case it points to the MP logo files and uses JPG; or B) Use WebServer Logos (in which case it points to MPThumbs and uses PNGs. Maybe?

Yes, I am up to my backside in PCs :) Its a bit like the "Hotel California": they come in here but they never leave :)

Thanks for the explanation about Apache vs IIS and the guidance on settingit up under IIS. I can see your logic and I had also forgotten that IIS does not come with XP Home. I'll take a look at setting up IIS and report back with the results.

Thanks again for a very nice tool and I hope 2005 brings you satisfaction, prosperity and peace.

John
 

samuel337

Portal Pro
August 25, 2004
772
0
Melbourne, Australia
Alright guys, I think maschine's on a bit of a new year's holiday, so I'll do the announcing this time.

There's a new version of the web interface up - same link as before.

- The major new feature in this release is te implementation of username and password security. You can choose not to have security during setup, but it is advisable to do so. And before anyone asks - the username is mpuser (all lower-case)

Other features:
- You can now run the web interface on another computer than the MP computer. See the readme file for details - you will still need to install the setup on your MP computer.
- javascript data validation for adding and editing recordings.
- security has also been tightened on the web service - it is now only directly accessible on the internal network only, however the web interface still works properly over the net.
- and other small bug fixes.

Download link: http://members.dinkum.net.au/plai33/MPWebControlSetup.exe

Jean-Max said:
Can you add in the future, the version number inside the name of your soft ?
It would be useful for downloading
Thanks ! :) :)

I thought of doing that, but then it would break the existing posts - I don't have enough web space to upload the setup file twice.

Sam
 

shilbert

Portal Member
December 8, 2004
13
0
Indianapolis
I am having trouble with viewing the guide and recordings....

Warning: sqlite_open() [function.sqlite-open]: unable to open database: C:\Program Files\Team MediaPortal\MediaPortal\MPWebControl\htdocs\webscheduler in C:\Program Files\Team MediaPortal\MediaPortal\MPWebControl\htdocs\webscheduler\guide.php on line 5
Could not open the database.

Any help? It looks great so far. I would like to be able to control all of my music at some point as well.

Stuart

samuel337 said:
Alright guys, I think maschine's on a bit of a new year's holiday, so I'll do the announcing this time.

There's a new version of the web interface up - same link as before.

- The major new feature in this release is te implementation of username and password security. You can choose not to have security during setup, but it is advisable to do so. And before anyone asks - the username is mpuser (all lower-case)

Other features:
- You can now run the web interface on another computer than the MP computer. See the readme file for details - you will still need to install the setup on your MP computer.
- javascript data validation for adding and editing recordings.
- security has also been tightened on the web service - it is now only directly accessible on the internal network only, however the web interface still works properly over the net.
- and other small bug fixes.

Download link: http://members.dinkum.net.au/plai33/MPWebControlSetup.exe

Jean-Max said:
Can you add in the future, the version number inside the name of your soft ?
It would be useful for downloading
Thanks ! :) :)

I thought of doing that, but then it would break the existing posts - I don't have enough web space to upload the setup file twice.

Sam
 

samuel337

Portal Pro
August 25, 2004
772
0
Melbourne, Australia
when you first ran it, in the setup page, it needed you to enter the path to the mediaportal folder. Did you just accept the defaults? Where is MP installed to? If you don't mind, goto your mediaportal folder, then the MPWebControl then htdocs then webscheduler folder, and open up data.inc in notepad. Then copy that and post that here.

Sam
 

Maschine

Retired Team Member
  • Premium Supporter
  • June 15, 2004
    768
    86
    Germany
    Home Country
    Germany Germany
    shilbert said:
    Warning: sqlite_open() [function.sqlite-open]: unable to open database: C:\Program Files\Team MediaPortal\MediaPortal\MPWebControl\htdocs\webscheduler in C:\Program Files\Team MediaPortal\MediaPortal\MPWebControl\htdocs\webscheduler\guide.php on line 5
    Could not open the database.

    shilbert,
    which version of MP are you using? The newer versions (after 0.1.0.3) use TVDatabase10.db instead of TVDatabase9.db. The webinterface has 9 as default. Please check this in your data.inc and change to 10 if needed.

    Maschine
     

    shilbert

    Portal Member
    December 8, 2004
    13
    0
    Indianapolis
    I am definately running 1.0.3. So I am guessing the database is wrong for me. I will check that tonight when I get home.

    Thanks,
    Stuart

    Maschine said:
    shilbert said:
    Warning: sqlite_open() [function.sqlite-open]: unable to open database: C:\Program Files\Team MediaPortal\MediaPortal\MPWebControl\htdocs\webscheduler in C:\Program Files\Team MediaPortal\MediaPortal\MPWebControl\htdocs\webscheduler\guide.php on line 5
    Could not open the database.

    shilbert,
    which version of MP are you using? The newer versions (after 0.1.0.3) use TVDatabase10.db instead of TVDatabase9.db. The webinterface has 9 as default. Please check this in your data.inc and change to 10 if needed.

    Maschine
     

    shilbert

    Portal Member
    December 8, 2004
    13
    0
    Indianapolis
    Well I came home and checked it out and found this in data.inc

    <?php
    $MPpath = "";
    $dbpath = "";
    $primetime = "";
    $thumbspath = "";
    $showTB = 1;
    ?>


    I installed it with the defaults so I am not sure what the deal is.

    Stuart


    Maschine said:
    shilbert said:
    Warning: sqlite_open() [function.sqlite-open]: unable to open database: C:\Program Files\Team MediaPortal\MediaPortal\MPWebControl\htdocs\webscheduler in C:\Program Files\Team MediaPortal\MediaPortal\MPWebControl\htdocs\webscheduler\guide.php on line 5
    Could not open the database.

    shilbert,
    which version of MP are you using? The newer versions (after 0.1.0.3) use TVDatabase10.db instead of TVDatabase9.db. The webinterface has 9 as default. Please check this in your data.inc and change to 10 if needed.

    Maschine
     

    Users who are viewing this thread

    Top Bottom