Forums
BF2Statistics.com :: Forums :: General :: BF2Statistics discussion
 
<< Previous thread | Next thread >>
install on iis7
Moderators: MrNiceGuy, Twhyman, Chump, hurr1k4ne, The Shadow, Wilson212
Author Post
modderhut
Tue Jun 16 2009, 11:52AM
Registered Member #2845
Joined: Sat Feb 10 2007, 08:30PM

Posts: 4
Hi,

I took on the challege to install bf statistics on windows server 2008 with IIS 7. I've installed PHP using fastcgi and created a *.aspx mapping to the same fast-cgi exe as php uses.
I keep getting the YOUR NOT AUTHORIZED when I go to localhost/asp The php info file works like it should.

anyone a pointer in the right direction for me?

thanks,
Back to top
Thinner
Tue Jun 16 2009, 12:12PM
Registered Member #2900
Joined: Fri Feb 23 2007, 08:46AM

Location: Germany
Posts: 291
Hi and Welcome,

please have a look at the readme again.

7. With a Web Browser, browse to: http://localhost/ASP/
Note: If you are browsing from a remote machine, please change the value of $admin_hosts
in /ASP/_config.php to include your IP address.

If this doesn't solve your problem, please post content of $admin_hosts in /ASP/_config.php and describe your network. Perhaps you should add your whole subnet e.g. '192.168.32.0/24'

Only if you are browsing from your server you can open h**p://localhost/ASP/
If you are browsing from a client you need to open h**p://your-server-ip/ASP/ or h**p://your-server-hostname/ASP/


bye
Thinner
Back to top
modderhut
Tue Jun 16 2009, 01:43PM
Registered Member #2845
Joined: Sat Feb 10 2007, 08:30PM

Posts: 4
Hi Thinner,

Thanks for your quick reply.

off course stupidity from my side is an absolute option I believe I have followed the readme to the letter;
$admin_hosts = array('127.0.0.1','192.168.1.0/24');

this is all runnung on 1 machine, with IP 192.168.1.101, and I'm also doing all testing from that machine.

when I change the error message in _config.php I see the change in localhost/ASP so indeed it's stopping me because of the auth check ... still not able to figure out why..

Thanks.

[ Edited Tue Jun 16 2009, 01:43PM ]
Back to top
Thinner
Tue Jun 16 2009, 02:43PM
Registered Member #2900
Joined: Fri Feb 23 2007, 08:46AM

Location: Germany
Posts: 291
Hi,

i'm sorry, but i don't know your skills.

Please note that i don't know anything about IIS7 and W2k8, so i can only guess.

auth-check is taken in index.php

  1. if (!checkIpAuth($cfg->get('admin_hosts'))) {
  2.         die("<font color='red'>ERROR:</font> You are NOT Authorised to access this Page!");
  3. }


function checkIpAuth is in /includes/utils.php

  1. function checkIpAuth($chkhosts) {
  2.         if(isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR']!="") {
  3.                 $ip_s = $_SERVER['REMOTE_ADDR'];
  4.         }
  5.        
  6.         echo $ip_s// add this
  7.                
  8.         if ($ip_s != "" && isIPInNetArray($ip_s,$chkhosts)){
  9.                 return 1;       // Authorised HOST IP
  10.         } else {
  11.                 return 0;       // UnAuthorised HOST IP
  12.         }
  13. }


I would add the echo $ip_s; to make sure $_SERVER['REMOTE_ADDR'] works as aspected.
If you see your ip on /localhost/ASP i would go on to functions isIPInNetArray/isIPInNet and add some "echo" to narrow down the problem.

In the meanwhile i will search for my W2k8 install-cd.

[EDIT]
cd found, but having troubles with dvd-drive, can't install

bye
Thinner

[ Edited Tue Jun 16 2009, 03:53PM ]
Back to top
Leon_tbk
Tue Jun 16 2009, 03:23PM
Leon_tbk
Registered Member #4870
Joined: Thu Apr 03 2008, 04:11AM

Location: Deutschland
Posts: 99

Do not forget this bug:
Back to top
Website
modderhut
Wed Jun 17 2009, 09:56AM
Registered Member #2845
Joined: Sat Feb 10 2007, 08:30PM

Posts: 4
Hi,

SOLVED

thanks you so mutch for pointing me in the right direction, the echo was somthing that helpded a lot, stupid I didn't think of that. It showed me ::1 (the IPv6 localhost IP) as you can't disble IPv6 in srv2008 I have edited the $admin_hosts as follwes.
$admin_hosts = array('::1','127.0.0.1','192.168.1.0/24');

also had to change the php.ini to prevent the php displaying index errors;
error_reporting = E_ALL
to
error_reporting = E_USER_NOTICE


Thanks again, I'll no go on a bump into the next challenge!
Back to top
modderhut
Wed Jun 17 2009, 11:40AM
Registered Member #2845
Joined: Sat Feb 10 2007, 08:30PM

Posts: 4
Leon_tbk wrote ...


Do not forget this bug:


thanks, appreciated!
Back to top
 

Jump:     Back to top


Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System
Render time: 0.2751 sec, 0.0169 of that for queries.