JAY is the windows privat server problem fixed????????

Ask Questions or make comments about Mp3 Toolbox
Post Reply
2stepback
Posts: 30
Joined: Thu Dec 30, 2004 11:08 am
Location: Denmark
Contact:

JAY is the windows privat server problem fixed????????

Post by 2stepback » Sun Nov 19, 2006 7:45 am

Hi Jay
Long time no seen as we say in denmark.
Is the private server function fixed in the new version for IIS servers? im asking becource i have a password script ill like to use in my version (1.0 beta 5) but i get some errors, maby you can help me out here.. i have the password protect script and is testet and work, but when i include it in the index file i get some errors. pleaseeeeeeeeeee help.
yours
kento (webmaster @ 2stepback.dk)
cant upload the script here so can´t show you the password script, is there a way to do it?. maby you can use that script in your great radio system here. :D

User avatar
Jay
Will work for food (Administrator)
Posts: 2862
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay » Sun Nov 19, 2006 5:41 pm

can you remind me of what this was about? I have not done any development on mp3 toolbox in a while it is open source and I would love for php devs to take on adding features.
- Jay

2stepback
Posts: 30
Joined: Thu Dec 30, 2004 11:08 am
Location: Denmark
Contact:

it was about this jay

Post by 2stepback » Mon Nov 20, 2006 8:53 am

Jay wrote:can you remind me of what this was about? I have not done any development on mp3 toolbox in a while it is open source and I would love for php devs to take on adding features.
Hi Jay
it was about when you set the system so it runs as a privat. it should come up with a username/code box, and many iis servers had problems with running that kind of option, and it worked at the end on my iis server but have upgrated my iis and now it wont work, BUT i have a password system that can be incluede in the index.php script so it dosn´t have to use the servers auth. it self, but cant find out how to include it, maby you can, if you want i can send it by email to you if you give me your email here in the forum, its only one php file, and is freeware (so we can use it as we see fit) and maby that will solve many peoples problem with the auth system build in the program you have made.. at least if you can make it work in my script ill be more than happy Jay.
yours
kento.

User avatar
Jay
Will work for food (Administrator)
Posts: 2862
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay » Mon Nov 20, 2006 1:52 pm

well we use PHP methods to startup the HTTP auth process and if IIS doesn't support this then the issue is with PHP and IIS.
- Jay

2stepback
Posts: 30
Joined: Thu Dec 30, 2004 11:08 am
Location: Denmark
Contact:

Post by 2stepback » Tue Nov 21, 2006 5:13 am

Jay wrote:well we use PHP methods to startup the HTTP auth process and if IIS doesn't support this then the issue is with PHP and IIS.
that may be :-) im not a programmer, so cant say what the problem is, but iis dosnt like the auth. metode that the script use, can you help me so i can get the password script i have up and running i the index.php script? then i can use the radio system again jay :-) pleaseee

User avatar
Jay
Will work for food (Administrator)
Posts: 2862
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay » Tue Nov 21, 2006 5:43 am

post the script and I will do my best to give you some pointers.
- Jay

2stepback
Posts: 30
Joined: Thu Dec 30, 2004 11:08 am
Location: Denmark
Contact:

Post by 2stepback » Tue Nov 21, 2006 1:42 pm

Jay wrote:post the script and I will do my best to give you some pointers.
here it comes:

<?php

###############################################################
# Page Password Protect 2.1
###############################################################
# Visit http://www.zubrag.com/scripts/ for updates
###############################################################
#
# Usage:
# Set usernames / passwords below between SETTINGS START and SETTINGS END.
# Open it in browser with "help" parameter to get the code
# to add to all files being protected.
# Example: password_protect.php?help
# Include protection string which it gave you into every file that needs to be protected
#
###############################################################

/*
-------------------------------------------------------------------
SAMPLE if you only want to request login and password on login form.
Each row represents different user.

$LOGIN_INFORMATION = array(
'zubrag' => 'root',
'test' => 'testpass',
'admin' => 'passwd'
);

--------------------------------------------------------------------
SAMPLE if you only want to request only password on login form.
Note: only passwords are listed

$LOGIN_INFORMATION = array(
'root',
'testpass',
'passwd'
);

--------------------------------------------------------------------
*/

##################################################################
# SETTINGS START
##################################################################

// Add login/password pairs below, like described above
// NOTE: all rows except last must have comma "," at the end of line
$LOGIN_INFORMATION = array(
'user1' => 'kode1',
'user2' => 'kode2'
);

// request login? true - show login and password boxes, false - password box only
define('USE_USERNAME', true);

##################################################################
# SETTINGS END
##################################################################


///////////////////////////////////////////////////////
// do not change code below
///////////////////////////////////////////////////////

// show usage example
if(isset($_GET['help'])) {
die('Include following code into every page you would like to protect, at the very beginning (first line):<br><?php include("' . __FILE__ . '"); ?>');
}

// logout?
if(isset($_GET['logout'])) {
setcookie("verify", ''); // clear password;
die("Logged out.");
}

if(!function_exists('showLoginPasswordProtect')) {

// show login form
function showLoginPasswordProtect($error_msg) {
?>
<html>
<head>
<title>Please enter password to access this page</title>
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
</head>
<body>
<style>
input { border: 1px solid black; }
</style>
<form method="post">
<h3>Please enter password to access this page</h3>
<font color="red"><?php echo $error_msg; ?></font><br />
<?php if (USE_USERNAME) echo 'Login:<br /><input type="input" name="access_login" /><br />Password:<br />'; ?>
<input type="password" name="access_password" /><p></p><input type="submit" name="Submit" value="Submit" />
</form>
<br />
<a style="font-size:9px" href="http://www.zubrag.com/scripts/password-protect.php" title="Download Webpage Password Protect">Powered by Webpage Password Protect</a>
</body>
</html>

<?php
// stop at this point
die();
}
}

// user provided password
if (isset($_POST['access_password'])) {

$login = isset($_POST['access_login']) ? $_POST['access_login'] : '';
$pass = $_POST['access_password'];
if (!USE_USERNAME && !in_array($pass, $LOGIN_INFORMATION)
|| (USE_USERNAME && ( !array_key_exists($login, $LOGIN_INFORMATION) || $LOGIN_INFORMATION[$login] != $pass ) )
) {
showLoginPasswordProtect("Incorrect password.");
}
else {
// set cookie if password was validated
setcookie("verify", md5($pass));
}

}

else {

// check if password cookie is set
if (!isset($_COOKIE['verify'])) {
showLoginPasswordProtect("");
}

// check if cookie is good
$found = false;
foreach($LOGIN_INFORMATION as $kay=>$val) {
if ($_COOKIE['verify'] == md5($val)) {
$found = true;
break;
}
}
if (!$found) {
showLoginPasswordProtect("");
}

}

?>

2stepback
Posts: 30
Joined: Thu Dec 30, 2004 11:08 am
Location: Denmark
Contact:

Post by 2stepback » Thu Dec 07, 2006 5:24 am

Jay wrote:post the script and I will do my best to give you some pointers.
Hi Jay
did you se the script post??

User avatar
Jay
Will work for food (Administrator)
Posts: 2862
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay » Thu Dec 07, 2006 11:15 am

yea i see it, what I would do is functionalize this code and then place the functions in locations that use HTTPAuth headers in the script.
- Jay

2stepback
Posts: 30
Joined: Thu Dec 30, 2004 11:08 am
Location: Denmark
Contact:

Post by 2stepback » Thu Dec 07, 2006 1:43 pm

Jay wrote:yea i see it, what I would do is functionalize this code and then place the functions in locations that use HTTPAuth headers in the script.
sounds great.. let me know when i can download the file or coge Jay :D

User avatar
Jay
Will work for food (Administrator)
Posts: 2862
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay » Thu Dec 07, 2006 1:47 pm

unfortunately I have no time to integrate this, you are welcome to do so though or find someone willing.
- Jay

Post Reply