spacer
spacer search

SwissCenter

Search
spacer
Main Menu
Home
Documentation + FAQ
Screenshots
Downloads
Forums
Bug Tracking
History
Login
Username

Password

Remember me
?
No account yet?

Locations of visitors to this page

 
Home arrow Forums

SwissCenter Forums  


IIS6 installation - 2005/03/06 13:49 Hi,

Has anyone succeeded installing this great script on IIS6 with PHP4.3.10 and MySQL4.3.7? I started a test first with 1.05, which gave an instant problem with the installation part being blocked for security reasons, whereas version 1.03 didn't update the database with new files. I know IIS is not supported, but I'm running several sites, so it would be nice to have the possibility to be able to administer it all on one place.
Thanx,

Arie
  | | The administrator has disabled public write access.
Re:IIS6 installation - 2005/03/06 19:20 I've not got IIS6 at home but I'll have a play with it tomorrow (Mon) at work if I get chance and see if I can't get it working.

RobG
"The mysterious garfoot"

Server: Windows Home Server (HP MediaSmart EX470)
Players: Pinnacle Showcenter 200 & 1000
  | | The administrator has disabled public write access.
Re:IIS6 installation - 2005/03/07 05:24 Thanks for the effort.

Arie
  | | The administrator has disabled public write access.
Re:IIS6 installation - 2005/03/07 13:46 Ok I've got swisscenter working under IIS6 now, it needs a little bit of work but its possible to get most of it working if you follow these instructions.


Note: I've just noticed that the forums eat backslashes so I'll use / instead

These instructions are for v1.05 and all paths are relative to the location where you installed swisscenter.

Setting up IIS6
This assumes you already have php running and that the web site is running under the default app pool identity of 'Network Service'.

Create a new site for the swisscenter on whatever port you like. It may work as a subdir of an existing site but I've not tried this.
Ensure the user 'Network Service' has full control over the swisscenter directory.
Create virtual directory mappings for each drive that contains media. Alias name should be c: d: etc. They should map to the root of that drive. Eg. Alias c: to c:/ Ensure that the 'Network Service' user has access to the directory.


Removing the security warning
First off you need to edit the file config/index.php, find line 587. It should look like this:
Code:

  if ($_SERVER["REMOTE_ADDR"] != $_SERVER["SERVER_ADDR"] )    {      echo 'Access Denied            Remote access to the /'SwissCenter Configuration Utility/' is disabled for security reasons.';    }    elseif (!empty($_REQUEST["section"]))    {      $func = (strtoupper($_REQUEST["section"]).'_'.strtoupper($_REQUEST["action"]));



Delete the lines
Code:

  if ($_SERVER["REMOTE_ADDR"] != $_SERVER["SERVER_ADDR"] )    {      echo 'Access Denied            Remote access to the /'SwissCenter Configuration Utility/' is disabled for security reasons.';    }



and then change the elseif to just if

It should now read:
Code:

     if (!empty($_REQUEST["section"]))    {      $func = (strtoupper($_REQUEST["section"]).'_'.strtoupper($_REQUEST["action"]));

"The mysterious garfoot"

Server: Windows Home Server (HP MediaSmart EX470)
Players: Pinnacle Showcenter 200 & 1000
  | | The administrator has disabled public write access.
Re:IIS6 installation - 2005/03/07 13:47 Creating the database
If you are running a version of MySql lower than 4.1 then you should be able to use the config pages to create the database, if not follow these instructions:

Open a command prompt
Change to the MySQL\bin directory
Type mysql and press return
Type create database swiss; and press return
Type use swiss; and press return

Now open the file setup.sql in notepad and select everything and press ctrl-c to copy it to the clipboard
Right click in the mysql command window and select paste. That should run the database create script.
Once that has stopped flying past the screen do the same with the file database\update_105.sql

Now back to typing (nearly done):
Type Grant all on swiss.* to swisscenter@'localhost' identified by 'swisscenter'; and press return
Type set password for swisscenter@'localhost' = OLD_PASSWORD('swisscenter'); and press return

Setting the document root
You may have this set in your php.ini file but since you are running multiple sites you might not want to change it. To hardcode this into the swisscenter do this:

Open the file base\settings.php and find line 61. It should look like this:
Code:

 $sc_location str_replace('//','/',os_path($_ENV["DOCUMENT_ROOT"],true));



Before that line insert this line:
Code:

 $_ENV["DOCUMENT_ROOT"] = 'c://swisscenter';



Make sure you put the location to your swisscenter install where I have c://swisscenter. You'll need to use // for each / in the path.
"The mysterious garfoot"

Server: Windows Home Server (HP MediaSmart EX470)
Players: Pinnacle Showcenter 200 & 1000
  | | The administrator has disabled public write access.
Re:IIS6 installation - 2005/03/07 13:48 Updating your media database
After you've used the config app to add your media locations you'll need to run an update. This doesn't work properly under IIS6 so you'll have to trigger it manually. To do this just enter the following url into your web browser on your PC and it'll do an update. Don't close the window until the page has finished loading (the IE logo stops animating).

http://localhost:10000/media_search.php

Obviously replace the port with the port you are running swisscenter on.

Scheduled updates
If you want a scheduled update then you can use the windows scheduler (via the control panel) to do this. Add a schedule that runs the following commandline according to whatever schedule you like:

"c:/program files/php/php.exe" "c:/program files/swisscenter/media_search.php"

Again, change the paths to match your system.

Hopefully that should about do it. I'll look at getting some basic support for IIS into release 1.06 although its not a priority at the moment.

RobG
"The mysterious garfoot"

Server: Windows Home Server (HP MediaSmart EX470)
Players: Pinnacle Showcenter 200 & 1000
  | | The administrator has disabled public write access.
Re:IIS6 installation - 2005/03/07 17:29 Hi Rob,

Thank you ever so much for your quick actions. I have done a few tests, and with the web browser (firefox) everything seems fine. With the ShowCenter however, I am not able to play anything. This has to do with the playlist. The links in Playlist.m3u all start with http://:8080, ofcourse which won't work. Unfortunenately I don't have time tonight to look further into this, but I will try tomorrow. Question: Have you actually tested this with a showcenter as well, or only with a web browser?
Again, it great to see how opensource development works; with great developpers..

Arie
  | | The administrator has disabled public write access.
Re:IIS6 installation - 2005/03/08 05:49 Unfortunately I've only tested it with a browser. I had to test it in the evening at work since I don't have IIS6 installed at home and I don't have a showcenter at work. I got the delivered m3u file but I never checked the contents, apologies for that.

I think I know what the problem is though. If you edit base/settings.php and goto line 76 it should read:

Code:

  $opts["server_address"]   = $_SERVER['SERVER_ADDR'].":".$_SERVER['SERVER_PORT'];



Change that to read:
Code:

  $opts["server_address"]   = $_SERVER['LOCAL_ADDR'].":".$_SERVER['SERVER_PORT'];



Another one is on line 74, however there is no equivalent in IIS because of the different way it handles PHP CGI from Apache. It shouldn't matter though sicne that variable is never used for anything atm.

To catch any other places where SERVER_ADDR gets used its probably worth putting the following line in before this line you added previously:
Code:

 $_ENV["DOCUMENT_ROOT"] = 'c://swisscenter';



Add:
Code:

 $_ENV["SERVER_ADDR"] = $_ENV["LOCAL_ADDR"];



RobG
"The mysterious garfoot"

Server: Windows Home Server (HP MediaSmart EX470)
Players: Pinnacle Showcenter 200 & 1000
  | | The administrator has disabled public write access.
Re:IIS6 installation - 2005/03/08 06:05 Also, I thought it would be worth mentioning that we will incorporate the changes that RobG has identified into the source for the next version, so there will be limited IIS support built-in (and that'll also mean that you can upgrade to any new versions without breaking your installation!).

Swiss

(I usually sign off as "Rob", but both of us are called Rob so it's a little confusing!)
Server : Windows Home Server (HP MediaSmart EX470)
Player #1: Pinnacle Showcenter 200 (wired ethernet)
Player #2: Popcorn Hour A110 (wired ethernet)


  | | The administrator has disabled public write access.
Re:IIS6 installation - 2005/03/08 18:40 Rob,

I have tried the changes, but unfortunatly without succes. There is still not a 'proper' address (in my case it should be (http://10.0.0.190:8080/...) in the playlist. The funny thing is, that it does show the proper port nr.
The following remark I found a bit vague: "To catch any other places where SERVER_ADDR gets used its probably worth putting the following line in before this line you added previously:". Do you mean I should check all files for SERVER_ADDR? I wasn't sure, so I limited this change just to base\settings.php.

I really think that SwissCenter is an added value for the ShowCenter, especially after the heavy load on my system which is created by Pinnacle's last software update. Even more so, the way of searching seems more intelligent and intuitive.

Arie
  | | The administrator has disabled public write access.
Re:IIS6 installation - 2005/03/10 20:29 I am wondering if this will be continued...
  | | The administrator has disabled public write access.
Re:IIS6 installation - 2005/03/11 08:06 I think maybe the line Rob suggested adding should have read as follows:

Code:

  $_SERVER["SERVER_ADDR"] = $_SERVER["LOCAL_ADDR"];



(It should read _SERVER instead of _ENV, as previously posted)

This is to create a global variable for the current IIS server address with the same name as that present when running under Apache. As the settings.php file is included by all other parts of the system, this should be the only place that you need to change it.

Alternatively, if that still doesn't work, you could just hardcode your server address and port like so:

Code:

 $opts["server_address"]   = 'http://10.0.0.190:8080/';



Let me know what happens,

Swiss
Server : Windows Home Server (HP MediaSmart EX470)
Player #1: Pinnacle Showcenter 200 (wired ethernet)
Player #2: Popcorn Hour A110 (wired ethernet)


  | | The administrator has disabled public write access.
Re:IIS6 installation - 2005/03/12 05:09 Yes!!! It's working now, with a little change. your options suggestions is the one that works. It should be:
Code:

 $opts["server_address"]   = '10.0.0.190:8080/';


Again, thanks a lot for your help!

Arie
  | | The administrator has disabled public write access.
Re:IIS6 installation - 2005/05/13 12:14 Hi,

Unfortunately since the last update playing doesn't work anymore with IIS server. Again there the address of the server is not in the url of the M3U file, so: http://:8080.
Hopefully someone can look into this.

Thanx,

Arie
  | | The administrator has disabled public write access.
Re:IIS6 installation - 2005/05/16 18:05 Sorry for the delay (I've been on holiday)... I'll look into this again. Server : Windows Home Server (HP MediaSmart EX470)
Player #1: Pinnacle Showcenter 200 (wired ethernet)
Player #2: Popcorn Hour A110 (wired ethernet)


  | | The administrator has disabled public write access.
Re:IIS6 installation - 2005/05/17 21:33 Hi,

Welcome back. Hopefully you enjoyed yourself, and didn't smoke too many sigars, or used too much rum.

Arie
  | | The administrator has disabled public write access.
spacer
 

Screenshots

www.flickr.com
This is a Flickr badge showing public photos from swisscenter. Make your own badge here.


 

Mambo is Free Software released under the GNU/GPL License.
spacer