aeroswat Posted April 20, 2010 Share Posted April 20, 2010 I cannot figure out what is wrong with this... I get these two errors: Warning: Unknown: write wrote less bytes than requested 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 (/home/a1925824/sessions) in Unknown on line 0 on this code $result=mysql_query($qry); unset($_SESSION['MultiOrderQry']); $_SESSION['MultiOrderQry'] = $qry; unset($_SESSION['MultiOrderRes']); $_SESSION['MultiOrderRes'] = array(); if($result){ while ($row = mysql_fetch_assoc($result)) { $_SESSION['MultiOrderRes'][] = $row; } /*if(count($_SESSION['MultiOrderRes'])) { echo $qry; //header('Location: editordermulti-form.php?ON=0'); } else{ echo "There were no orders to display!"; }*/ } else{ echo "There were no orders to display!"; } when i comment out this part $_SESSION['MultiOrderRes'][] = $row; I get no more error so that may be the offending code I have another search that is almost identical that uses this code $result=mysql_query($qry); unset($_SESSION['MultiRegisterQry']); $_SESSION['MultiRegisterQry'] = $qry; unset($_SESSION['MultiRegisterRes']); $_SESSION['MultiRegisterRes'] = array(); if($result) { while ($row = mysql_fetch_assoc($result)) { $_SESSION['MultiRegisterRes'][] = $row; } if(count($_SESSION['MultiRegisterRes'])) { header('Location: editregistermulti-form.php?SN=0'); } else{ echo "There were no records to display!"; } } This one works just fine tho... Maybe someone else can spot the issue because I don't see it :/ Link to comment https://forums.phpfreaks.com/topic/199136-wrote-less-bytes-than-requested/ Share on other sites More sharing options...
aeroswat Posted April 20, 2010 Author Share Posted April 20, 2010 This error has crippled me for the past 3 days :/ Noticing it also seems to happen when I have a larger amount of data I'm trying to write to my session array. It doesn't happen when I have 132 rows but it does when i have 1300 or 2200 rows. Zzz... I think I figured it out. Just noticed my session file is right at 2,097,000 bytes... I also noticed that 000webhost has a 2m limit on file size Link to comment https://forums.phpfreaks.com/topic/199136-wrote-less-bytes-than-requested/#findComment-1045161 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.