(please specify the website or account you are asking about)
Warning : session_start(): open(/php_sessions/sess_8d539e4e7cdde7fef6072f73dc226cfb, O_RDWR) failed: No such file or directory (2) in /home/vol19_1/epizy.com/epiz_33050785/htdocs/index.php on line 2
Warning : session_start(): Failed to read session data: files (path: /php_sessions) in /home/vol19_1/epizy.com/epiz_33050785/htdocs/index.php on line 2
KangJL
November 22, 2022, 7:16am
2
ashwinipatil:
path: /php_sessions
Make sure this is present
2 Likes
ashwinipatil:
path: /php_sessions
Dint understand can you please explain more
KangJL
November 22, 2022, 7:44am
4
Screenshot your file directory structure
1 Like
please help me to solve this because everything is working on my localhost and also other hosting but not here.
here only give such warnings for session
KangJL
November 22, 2022, 8:18am
7
I do not see this php_sessions
folder
1 Like
here created folder but what should i put in it ?
KangJL
November 22, 2022, 8:25am
9
How would I know?
You are the creator of your website…
4 Likes
KangJL:
website
this issue came when i hosted my website on infinity not with other hosting
KangJL
November 22, 2022, 8:42am
11
You only tried on localhost
A lot of things can happen during migration.
Can you show the contents of index.php?
3 Likes
here
<?php
include('includes/session.php');
session_start();
include('includes/config.php');
if(isset($_POST['signin']))
{
$username=$_POST['username'];
$password=md5($_POST['password']);
$sql1 ="SELECT SUM(days) AS value_sum FROM data where emp_email ='$username'";
$re=mysqli_query($conn,$sql1);
$row1=mysqli_fetch_assoc($re);
$sum = $row1['value_sum'];
if($sum >= 90){
$sql ="SELECT * FROM tblemployees where EmailId ='$username' AND Password ='$password'";
$query= mysqli_query($conn, $sql);
$count = mysqli_num_rows($query);
if($count > 0)
{
while ($row = mysqli_fetch_assoc($query)) {
if ($row['role'] == 'Admin') {
$_SESSION['alogin']=$row['emp_id'];
$_SESSION['arole']=$row['Department'];
echo "";
}
elseif ($row['role'] == 'Staff' || $row['role'] == 'Management') {
$_SESSION['alogin']=$row['emp_id'];
$_SESSION['arole']=$row['Department'];
echo "";
}
elseif ($row['role'] == 'HR') {
$_SESSION['alogin']=$row['emp_id'];
$_SESSION['arole']=$row['Department'];
echo "";
}
else {
$_SESSION['alogin']=$row['emp_id'];
$_SESSION['arole']=$row['Department'];
echo "";
}
}
}
else{
echo "";
}
}
else{
echo "";
}
}
// $_SESSION['alogin']=$_POST['username'];
// echo "";
?>
<title>HK Leave Manager</title>
<!-- Site favicon -->
<!-- Mobile Specific Metas -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- Google Font -->
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="vendors/styles/core.css">
<link rel="stylesheet" type="text/css" href="vendors/styles/icon-font.min.css">
<link rel="stylesheet" type="text/css" href="vendors/styles/style.css">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-119386393-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-119386393-1');
</script>
<script src= "https://cdn.datatables.net/1.11.3/js/jquery.dataTables.min.js"></script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5890139232703369"
crossorigin="anonymous"></script>
<div class="col-md-6 col-lg-5">
<div class="login-box bg-white box-shadow border-radius-10">
<div class="login-title">
<h2 class="text-center text-primary">Welcome To LeavePortal</h2>
</div>
<form name="signin" method="post">
<div class="input-group custom">
<input type="text" class="form-control form-control-lg" placeholder="Email ID" name="username" id="username">
<div class="input-group-append custom">
<span class="input-group-text"><i class="icon-copy fa fa-envelope-o" aria-hidden="true"></i></span>
</div>
</div>
<div class="input-group custom">
<input type="password" class="form-control form-control-lg" placeholder="**********"name="password" id="password">
<div class="input-group-append custom">
<span class="input-group-text"><i class="dw dw-padlock1"></i></span>
</div>
</div>
<div class="row pb-30">
<div class="col-6">
<div class="forgot-password"><a href="forgot-password.html">Forgot Password</a></div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="input-group mb-0">
<input class="btn btn-primary btn-lg btn-block" name="signin" id="signin" type="submit" value="Sign In">
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- js -->
<script src="vendors/scripts/core.js"></script>
<script src="vendors/scripts/script.min.js"></script>
The error clearly says that the file you’re trying to include()
doesn’t exist. Send screenshot of includes folder. Also when including something important, use require()
instead of include()
Admin
November 22, 2022, 7:38pm
15
The error you’re seeing indicates an issue with the server’s session storage.
But I just checked your website and it seems to be working now. So it seems the issue was already resolved.
4 Likes
Problem solved i have added
ini_set(‘session.save_path’,realpath(dirname($_SERVER[‘DOCUMENT_ROOT’]) . ‘/tmp’));
to my session.php file
but now i facing new issue with this hosting
I have implemented send email after form submit but mail dint sent
attached mail function
please help why mail dint sent
KangJL
November 23, 2022, 4:26am
17
Due to this
The most common way to send email from your website is by using the PHP mail() function. PHP mail() is an easy to use email system built into the PHP programming language. It’s the default setting for almost all applications.
However, PHP mail is severely restricted on InfinityFree. To prevent spam and other abuse, most messages sent through PHP mail are rejected by the mail system. In practice, this means you cannot use PHP mail on InfinityFree to send your email.
If you want to send email fr…
Email is restricted on free hosting
You can try this
Outgoing email with PHP mail() is heavily restricted on InfinityFree. Fortunately, you can still whatever email you want using an external email service.
There are many external email providers to choose from. InfinityFree doesn’t restrict sending email with external providers. Almost all of them have paid plans, but some have free tiers too. Most of them support sending email over SMTP, some of them have custom APIs, libraries and plugins which you can use too.
A simple way to get started qui…
4 Likes
i want to send mail from outlook to outlook accounts.
how this will be done
KangJL
November 23, 2022, 7:01am
19
You need to find out the smtp credentials
You may be hit by rate limit as well. Good luck!
6 Likes
system
Closed
November 30, 2022, 7:01am
20
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.