Skip to main content
July 11, 2006
Question

Help with login

  • July 11, 2006
  • 1 reply
  • 339 views
SIte is www.kloco..net
I finaly got the database on the sever, but the login page doesn't show up. Click on Project and I get this:

Warning: mysql_pconnect(): Access denied for user: 'kloco0ne@cluster01.ahp01.lax.affinity.com' (Using password: YES) in /nfs/cust/7/41/89/698147/web/Connections/klocodb.php on line 9

Fatal error: Access denied for user: 'kloco0ne@cluster01.ahp01.lax.affinity.com' (Using password: YES) in /nfs/cust/7/41/89/698147/web/Connections/klocodb.php on line 9

lines 7-11are:
?><?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}

What to do?
Thanks
This topic has been closed for replies.

1 reply

Inspiring
July 11, 2006
KLOCO wrote:
> Warning: mysql_pconnect(): Access denied for user:
> 'kloco0ne@cluster01.ahp01.lax.affinity.com' (Using password: YES) in
> /nfs/cust/7/41/89/698147/web/Connections/klocodb.php on line 9

The details in your MySQL connection must be wrong. That is a message
from MySQL telling you that access to your database was denied.

Either your username or password is wrong.

--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
July 11, 2006
I went and checked the username and password - they are right. All the connections work fine in DW. It's when I go online that there is no connection. The person I spoke with last night at Gate.com-Affinity the hosting company said the same thing, but I thought that the fault lies with them since there is "cluster" and affinity in the error. message. Anyway I'm sending the code for the page. perhaps there is something wrong in it.

Project Button on the homepage (index.html)

<p align="center" class="navigation"><a href="Projectpage.php" class="navigation">PROJECT</a></p>

Projectpage.php Code:

<?php require_once('Connections/klocodb.php'); ?><?php
mysql_select_db($database_klocodb, $klocodb);
$query_Projectlogin = "SELECT user_id, user_name, user_pwd, user_level FROM login";
$Projectlogin = mysql_query($query_Projectlogin, $klocodb) or die(mysql_error());
$row_Projectlogin = mysql_fetch_assoc($Projectlogin);
$totalRows_Projectlogin = mysql_num_rows($Projectlogin);
?><?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}

$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}

if (isset($_POST['textfield'])) {
$loginUsername=$_POST['textfield'];
$password=$_POST['textfield2'];
$MM_fldUserAuthorization = "user_level";
$MM_redirectLoginSuccess = "Projectpage.html";
$MM_redirectLoginFailed = "Not_authorized.html";
$MM_redirecttoReferrer = false;
mysql_select_db($database_klocodb, $klocodb);

$LoginRS__query=sprintf("SELECT user_id, user_name, user_level FROM login WHERE user_id='%s' AND user_name='%s'",
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));

$LoginRS = mysql_query($LoginRS__query, $klocodb) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {

$loginStrGroup = mysql_result($LoginRS,0,'user_level');

//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;

if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>KLoCo Independent Films</title>
<style type="text/css">
<!--
body {
background-color: #000000;
}
.style1 {
font-family: Geneva, Arial, Helvetica, sans-serif;
font-weight: bold;
}
body,td,th {
font-family: Neuropol;
font-size: 14px;
color: #006699;
}
.style3 {
font-family: "Cataneo BT";
font-size: 16px;
}
-->
</style>
<script type="text/javascript">
function MM_CheckFlashVersion(reqVerStr,msg){
with(navigator){
var isIE = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
if (!isIE || !isWin){
var flashVer = -1;
if (plugins && plugins.length > 0){
var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
if (desc == "") flashVer = -1;
else{
var descArr = desc.split(" ");
var tempArrMajor = descArr[2].split(".");
var verMajor = tempArrMajor[0];
var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
flashVer = parseFloat(verMajor + "." + verMinor);
}
}
// WebTV has Flash Player 4 or lower -- too low for video
else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

var verArr = reqVerStr.split(",");
var reqVer = parseFloat(verArr[0] + "." + verArr[2]);

if (flashVer < reqVer){
if (confirm(msg))
window.location = " http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
}
}
}
}
</script>
<link href="file:///C|/Documents and Settings/Kenneth Lowry/Desktop/onlinestorage 1/KLoCo CSS.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style6 {
font-size: 18px;
font-weight: bold;
}
.style8 {font-size: 16px; font-weight: bold; }
-->
</style>
<link href="file:///C|/Documents and Settings/Kenneth Lowry/Desktop/onlinestorage 1/KLo.css" rel="stylesheet" type="text/css" />
<link href="KLoCo_ CSS.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style10 {font-size: 16px}
.style12 {
font-size: 16px;
font-family: Verdana, sans-serif;
color: #000000;
}
-->
</style>
</head>

<body onload="MM_CheckFlashVersion('7,0,0,0','Content on this page requires a newer version of Macromedia Flash Player. Do you want to download it now?');">


<div align="center">
<table width="700" border="0" cellspacing="0" cellpadding="0">


<tr>
<td><img src="Upper.gif" width="705" height="34" /></td>
</tr>
</table>
<table width="701" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="137" valign="top" bgcolor="#939366"><h1 align="center" class="style3"><a href="index.html" class="navigation">HOMEPAGE</a></h1>
<h1 align="center" class="style3"> </h1>
<h1 align="center" class="style3"> </h1>
</td>
<td width="560" align="center" valign="top" bgcolor="F7EEDF"><p> </p>
<p align="center" class="style6">Projects</p>
<ol>
<li><a href="Fred.php">&quot;I'll Remember&quot; A Bio-documentary of Fred Parris</a> </li>
<li><a href="Chris.php">A Video Profile: Jewelry by Chris</a></li>
<li><a href="Chris.php">Emma</a></li>
</ol>
<p align="center"> </p>
<blockquote>
<form id="form1" name="form1" method="POST" action="<?php echo $loginFormAction; ?>">
<label><span class="style12">User name</span>
<input type="text" name="textfield" />
</label>
<p>
<label><span class="style10"> Password</span>
<input type="text" name="textfield2" />
</label>
</p>
<p>
<label>
<input type="submit" name="Submit" value="Login" />
</label>
</p>
</form>
<p align="center"> </p>
<p align="center"> </p>
</blockquote></td>
<td width="10" bordercolor="#ECE9D8" bgcolor="F7EEDF"><p align="justify"><span class="style1"> </span></p> </td>
</tr>
</table>
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="Lower.gif" width="796" height="82" /></td>
</tr>
</table>
</div>
</body>
</html>
<?php
mysql_free_result($Projectlogin);
?>


Sorry about the size of this message.
Kenneth