Reply
session_start() Problem...
Old 03-16-2006, 02:34 AM session_start() Problem...
sadiq's Avatar
Skilled Talker

Posts: 52
some times I get error message Fatal error: session_start(): Failed to initialize storage module: user (path: /tmp) in /home/sadiq/public_html/ourmymensingh.com/friends/login.php on line 3

when i use session_start();

PHP Code:
<?php 
session_start
();
$pw=$_SESSION['lipw'];
$un=$_COOKIE['liemail'];
if(
$_POST['login']){
setcookie ("liemail"$emailtime() + 14000000);
$_SESSION['liemail'] = $email;
//setcookie ('lipw',$password,time()+30000);
$_SESSION['lipw'] = $password;
$pw=$password;
$un=$email;
}
$query "select * from friends
where password = lower('$pw') 
and email = lower('$un')
"
;
mysql_connect("localhost","username","password")or die("Could not select database");
mysql_select_db("sadiq_mysite");
$result mysql_query($query);
if (
$result) { list($valid_user) = mysql_fetch_row($result); }
 
if (empty(
$valid_user))
{
if(
$_POST['login']){
if (empty(
$valid_user)){$errmsg .="<li>Invalid LogIn Information.\n";
$user=$_COOKIE['liun'];}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>OurMymensingh! LogIn To Your Account....</title>
<style type="text/css">
<!--
body {
background-color: #E2E2E2;
}
a:link {
color: #996666;
}
a:visited {
color: #9933FF;
}
a:hover {
color: #0099FF;
}
.style6 {font-size: small; color: #996666; }
.style8 {
color: #FF0000;
font-weight: bold;
}
.style9 {
color: #996666;
font-weight: bold;
}
-->
</style>
</head>
<body topmargin="0" leftmargin="0">
<div align="center">
<table width="741" height="100" border="1" bordercolor="#A9AFB5">
<tr>
<td height="402"><table width="741" border="0" bordercolor="#FFCCCC">
<tr>
<td width="735"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="735" height="108" align="middle">
<param name="movie" value="http://simages.50webs.com/banner.swf">
<param name="quality" value="high">
<param name="SCALE" value="exactfit">
<embed src="http://simages.50webs.com/banner.swf" width="735" height="108" align="middle" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" scale="exactfit"></embed>
</object></td>
</tr>
<tr>
<td height="252"><div align="center">
<div align="center"><font color="#CC66FF" size="+2"><strong>Log In To Your Account </strong></font> <br>
<font color="#0099FF" size="+1"><strong>Please Enter Your E-mail And Password. </strong></font> </div>
<div align="center">
<hr>
 
<?php if (!errmsg==""){ ?>
</div>
<ul class="style8"><?php echo $errmsg?></ul>
<?php }?>
</div>
<form action="" method="post" name="account" id="account" onSubmit="return check_form(account);">
<table width="100%" border="0">
<tr>
<td width="54%" rowspan="3"><div align="center"><span class="style9">Don't You Have A Valid User name and Password Don't Worry, Just Register Now. Ya, It is Fully Free.</span><br>
<a href='signup.php'><font size='+2'><strong>Sign Up Now.</strong></font></a></div></td>
<td width="14%" class="style6"><div align="left">E-mail Address: </div></td>
<td width="32%"><div align="left">
<input name="email" type="text" id="email" value="<?php echo $_COOKIE['liemail']; ?>">
</div></td>
</tr>
<tr>
<td class="style6"><div align="left">Password:</div></td>
<td><div align="left">
<input name="password" type="password" id="password">
</div></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name='login' type='submit' id="login" value='Submit'>
<a href="http://www.ourmymensingh.com/friends/forgotpass.php"><span class="style6">Forgot Password ?</span></a> </td>
</tr>
</table>
</form></td>
</tr>
</table>
<div align="center"><span class="style6"><a href="http://www.ourmymensingh.com">Home</a> | <a href="http://www.ourmymensingh.com/privacy.php">Privacy Policy</a> | <a href="http://www.ourmymensingh.com/terms.php">Terms And Conditions</a> | <a href="http://www.ourmymensingh.com/contact/">Contact</a><br>
Sadiqur Rahman.&copy; Copyright 2004-2006 <a href="http://www.sadiq-bd.com">Sadiq Corporation</a>.</span> </div></td>
</tr>
</table>
</div>
</body>
</html>
<?php
exit;
};
$row=mysql_query($query);
$result=mysql_fetch_assoc($row);
$fullname=$result['full_name'];
$ref=$result['id'];
setcookie("ref",$ref);
$emailfrom=$result['id'];
$id=$result['id'];
$balance=$result['credit'];
$query_visit="UPDATE `friends` SET `visited_date` = NOW(NULL) WHERE `id` = '".$id."'";
mysql_query($query_visit);
?>
sadiq is offline
Reply With Quote
View Public Profile Visit sadiq's homepage!
 
When You Register, These Ads Go Away!
     
Reply     « Reply to session_start() Problem...
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13040 seconds with 13 queries