jmou07 Posted July 29, 2011 Share Posted July 29, 2011 when i go to edit my profile on this site im building i get this error Notice: Undefined index: wipit in /hermes/web05b/b638/moo.antoniogage/edit_profile.php on line 64 Error: Your session expired from inactivity. Please click here to refresh it.. Warning: Unknown: open(/var/php_sessions/sess_3de4e02762954e7374d7d82caccb3898, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/php_sessions) in Unknown on line 0 can someone plz tell me what this means my chamod is set at 777 Quote Link to comment https://forums.phpfreaks.com/topic/243218-what-does-this-mean/ Share on other sites More sharing options...
Maq Posted July 29, 2011 Share Posted July 29, 2011 It means the 'wipit' key doesn't exist (i.e. $_GET['wipit']. Show us the relevant code. Quote Link to comment https://forums.phpfreaks.com/topic/243218-what-does-this-mean/#findComment-1249189 Share on other sites More sharing options...
jmou07 Posted July 29, 2011 Author Share Posted July 29, 2011 this what i have //// W.I.P.I.T /// $thisWipit = $_POST['thisWipit']; $sessWipit = base64_decode($_SESSION['wipit']); // if (!isset($_SESSION['wipit']) || !isset($_SESSION['idx'])) { echo 'Error: Your session expired from inactivity. Please <a href="index.php">click here to refresh it.</a>.'; exit(); } // if ($sessWipit != $thisWipit) { echo 'Your session expired from inactivity. Please <a href="index.php">click here to refresh it.</a>.'; exit(); } // if ($thisWipit == "") { echo 'Error: Missing Data... click back in your browser please.'; exit(); } and it will not save any changes to the site Quote Link to comment https://forums.phpfreaks.com/topic/243218-what-does-this-mean/#findComment-1249232 Share on other sites More sharing options...
trq Posted July 29, 2011 Share Posted July 29, 2011 These two lines.... $thisWipit = $_POST['thisWipit']; $sessWipit = base64_decode($_SESSION['wipit']); Need to go within a conditional that checks these indexes actually exist first. Quote Link to comment https://forums.phpfreaks.com/topic/243218-what-does-this-mean/#findComment-1249234 Share on other sites More sharing options...
skwap Posted July 30, 2011 Share Posted July 30, 2011 Change your first two lines to if(isset($_POST['thisWipit'])) { $thisWipit = $_POST['thisWipit']; } if(isset($_SESSION['wipit'])) { $sessWipit = base64_decode($_SESSION['wipit']); } Quote Link to comment https://forums.phpfreaks.com/topic/243218-what-does-this-mean/#findComment-1249292 Share on other sites More sharing options...
jmou07 Posted July 30, 2011 Author Share Posted July 30, 2011 ok i changed it and the error message changed to this Error: Your session expired from inactivity. Please click here to refresh it.. Warning: Unknown: open(/var/php_sessions/sess_3de4e02762954e7374d7d82caccb3898, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/php_sessions) in Unknown on line 0 here is some of my code if (isset($_POST['parse_var'])){ //// W.I.P.I.T /// if(isset($_POST['thisWipit'])) { $thisWipit = $_POST['thisWipit']; } if(isset($_SESSION['wipit'])) { $sessWipit = base64_decode($_SESSION['wipit']); } // if (!isset($_SESSION['wipit']) || !isset($_SESSION['idx'])) { echo 'Error: Your session expired from inactivity. Please <a href="index.php">click here to refresh it.</a>.'; exit(); } // if ($sessWipit != $thisWipit) { echo 'Your session expired from inactivity. Please <a href="index.php">click here to refresh it.</a>.'; exit(); } // if ($thisWipit == "") { echo 'Error: Missing Data... click back in your browser please.'; exit(); } //------------------------------------------------------------------------------------------------------------------------ // ------- PARSING PICTURE UPLOAD --------- if ($_POST['parse_var'] == "pic"){ if (!$_FILES['fileField']['tmp_name']) { $error_msg = '<font color="#FF0000">ERROR: Please browse for an image before you press submit.</font>'; } else { $maxfilesize = 51200; // 51200 bytes equals 50kb if($_FILES['fileField']['size'] > $maxfilesize ) { $error_msg = '<font color="#FF0000">ERROR: Your image was too large, please try again.</font>'; unlink($_FILES['fileField']['tmp_name']); } else if (!preg_match("/\.(gif|jpg|png)$/i", $_FILES['fileField']['name'] ) ) { $error_msg = '<font color="#FF0000">ERROR: Your image was not one of the accepted formats, please try again.</font>'; unlink($_FILES['fileField']['tmp_name']); } else { $newname = "image01.jpg"; $place_file = move_uploaded_file( $_FILES['fileField']['tmp_name'], "members/$id/".$newname); $success_msg = '<font color="#009900">Your image has been updated, it may take a few minutes for the changes to show... please be patient.</font>'; } } } Quote Link to comment https://forums.phpfreaks.com/topic/243218-what-does-this-mean/#findComment-1249354 Share on other sites More sharing options...
trq Posted July 30, 2011 Share Posted July 30, 2011 You will need to speak to your host about this error. You don't have permission to write to the session directory. Your still going to have issues with your code. Here: if ($sessWipit != $thisWipit) { echo 'Your session expired from inactivity. Please <a href="index.php">click here to refresh it.</a>.'; exit(); } If $sessWipit wasn't defined in the conditional that checks for $_POST['thisWipit'] your code will error. Your entire piece of code needs to be wrapped in that conditional. Quote Link to comment https://forums.phpfreaks.com/topic/243218-what-does-this-mean/#findComment-1249605 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.