Jump to content

PHP Warning: session_start No such file or directory...


911Alert

Recommended Posts

I am getting the following error mesages when I view the index page at http://www.voltageking.com/exams/.  I have no idea why this would be ocurring. I did not write the PHP code. The code was written by an ex-employee who is no longer able to be contacted. I thought perhaps these errors are ocurring because I reinstalled the files overwriting the older files and it perhaps changed the permissions, but I went to the directory and changed the directory and file permissions to all and it still gave me the identical error messages. Below in RED is the text which apears when you view http://www.voltageking.com/exams/ .

 

Warning: session_start() [function.session-start]: open(/var/chroot/home/content/v/o/l/voltageking/tmp/sess_b8c8479843aced59a006557ec7b499ff, O_RDWR) failed: No such file or directory (2) in /home/content/v/o/l/voltageking/html/exams/index.php on line 2

 

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/v/o/l/voltageking/html/exams/index.php:2) in /home/content/v/o/l/voltageking/html/exams/index.php on line 2

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/v/o/l/voltageking/html/exams/index.php:2) in /home/content/v/o/l/voltageking/html/exams/index.php on line 2

 

It is refering to line 2 of the index.php file which I have pasted below in BLUE:

 

<?php

session_start();

$_SESSION['logged']="none";

?>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Power Learning Systems Online Practice Tests</title>

 

<link rel="stylesheet" type="text/css" media="screen" href="css/Test-CSS.css" />

 

<style type="text/css" title="currentStyle" media="screen">

@import "css/Test-CSS.css";

 

#wrapper {

  position: absolute;

  bottom: 50%;

  right: 50%;

  height: 600px;

  width: 745px;

}

#container {

  position: relative;

  left: 50%;

  top: 50%;

}

 

    #loginArea{

position:absolute;

width:749px;

height:570px;

z-index:1;

background-image: url(images/login-bgs.jpg);

background-repeat: no-repeat;

overflow: visible;

}

    #PLSlogo {

position:absolute;

width:282px;

height:117px;

z-index:2;

left: 208px;

top: 97px;

}

    #login {

position:absolute;

width:294px;

height:32px;

z-index:2;

left: 269px;

top: 399px;

text-align: center;

}

    #password {

position:absolute;

width:100px;

height:25px;

z-index:2;

left: 163px;

top: 403px;

text-align: right;

font-family: Verdana, Geneva, sans-serif;

font-size: 14px;

font-weight: normal;

color: #024572;

}

 

    .pass {

margin-top: 0px;

margin-bottom: 0px;

font-family: Verdana, Geneva, sans-serif;

font-size: 13px;

color: #000;

text-align: left;

text-indent: 0px;

border-top-width: 1px;

border-right-width: 2px;

border-bottom-width: 2px;

border-left-width: 1px;

border-top-style: solid;

border-right-style: solid;

border-bottom-style: solid;

border-left-style: solid;

border-top-color: #003466;

border-right-color: #003466;

border-bottom-color: #003466;

border-left-color: #003466;

width: 202px;

}

 

    #intro {

position:absolute;

width:511px;

height:36px;

z-index:2;

left: 122px;

top: 251px;

font-family: Verdana, Geneva, sans-serif;

font-size: 20px;

color: #064473;

font-weight: bold;

text-align: center;

}

    #moreinfo {

position:absolute;

width:500px;

height:18px;

z-index:2;

left: 128px;

top: 282px;

font-family: Verdana, Geneva, sans-serif;

font-size: 12px;

color: #064473;

text-align: center;

}

    #message1 {

position:relative;

width:540px;

height:28px;

z-index:2;

left: 104px;

top: 360px;

font-family: Verdana, Geneva, sans-serif;

font-weight: normal;

color: #F00;

text-align: center;

}

    #apDiv1 {

position:relative;

width:200px;

height:20px;

z-index:3;

left: 510px;

top: 508px;

font-family: Arial, Helvetica, sans-serif;

font-size: 10px;

color: #666;

text-align: right;

}

    #apDiv1 a{

font-family: Arial, Helvetica, sans-serif;

font-size: 10px;

color: #666;

text-decoration: none;

}

    #apDiv1 a:hover{

font-family: Arial, Helvetica, sans-serif;

font-size: 10px;

color: #000000;

text-decoration: none;

}

    #apDiv2 {

position:relative;

z-index:1;

left: 54px;

top: 420px;

text-align: center;

height: 32px;

width: 644px;

}

 

    </style>

 

 

<body bgcolor="#EAEDF4">

 

<span>

    <div id="wrapper">

<div id="container">

<div id="loginArea">

      <div id="message1"><?php echo $_SESSION['message1']; ?></div>

  <div id="apDiv1">Powered by <a href="http://www.VoltageKing.com" target="_blank">VoltageKing.com</a></div>

  <div id="PLSlogo"><a href="http://www.4ezhelp.com/" target="_blank"><img src="http://www.4ezpass.com/images/PLS_main_logo.jpg" border="0"/></a></div>

      <div id="intro">Online Examination Preparation Interface</div>

      <div id="moreinfo">For more information about Power Learning Systems Online Tests <a href="http://www.voltageking.com/pages.php?CDpath=0&pID=54">click here</a></div>

      <div id="password">Password:</div>

      <div id="login">

        <form id="form1" name="form1" method="post" action="login.php">

        <input type="hidden" value="http://www.4ezpass.com" name="sender">

        <input name="pass" type="password" class="pass"  maxlength="20" />  

        <input name="login" type="submit" value="login" />

        </form>

      </div>

      <div id="apDiv2"><img src="http://www.4ezpass.com/images/PPP.jpg" border="0"/></div>

  </div>

</div>

</div>

</span>

 

 

<?php

$_SESSION['message1']=" ";

$_SESSION['message2']=" ";

?>

 

<script type="text/javascript">

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

</script>

<script type="text/javascript">

try {

var pageTracker = _gat._getTracker("UA-15438543-9");

pageTracker._trackPageview();

} catch(err) {}</script>

 

 

</body>

</html>

 

Any help would be greatly appreacated!

 

Steve :-)

 

Link to comment
Share on other sites

Hi Steve,

 

Check your tmp directory hasn't been deleted, according to the error message it should be here /var/chroot/home/content/v/o/l/voltageking/tmp/

 

You are operating in a chroot so that's probably not be the true location, so locate the /voltageking/ directory and make sure the tmp directory exists there.

 

It will also have to be writeable.

 

Hope this helps

 

Jez

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.