Note that there are some explanatory texts on larger screens.

plurals
  1. POIntermittent Internal Server Error
    primarykey
    data
    text
    <p>So this is quite strange. Im getting intermittent internal server error messages on some particular pages of my site. </p> <p>I have a fancybox iframe which contains a slider script, which slides between iframes each loading a PHP page (9 iframes/ php pages in total). I know its not particularly good to have iframes inside iframes but it made this particular project much easier to manage.</p> <p>Sometimes one or more of the php pages shows an internal server error. If i reload either the parent page or the iframe it goes away. I really cant figure out why this is happening. It only happens on these pages, and only intermittently. </p> <p>can anyone think of a reason for this happening. Is PHP or Iframe known to cause this problem? If i load the php pages on their own (not in frames) this doesnt happen.</p> <p>Code for the PHP pages is as follows:</p> <p>Code for slider container:</p> <pre><code>&lt;?php if ($pass != "password") { exit('&lt;head&gt; &lt;script type="text/javascript"&gt; &lt;!-- window.location="../index.php"; //--&gt; &lt;/script&gt; &lt;/head&gt;'); } if(isset($_GET['today'])) { if(isset($_GET['mrn'])) { $mrn = $_GET['mrn']; $date = isset($_GET['today']) ? $_GET['today'] : date('Y-m-d'); $dateplus1 = date('Y-m-d', strtotime($date .' +1 day')); $dateminus1 = date('Y-m-d', strtotime($date .' -1 day')); $dateminus2 = date('Y-m-d', strtotime($date .' -2 day')); $dateminus3 = date('Y-m-d', strtotime($date .' -3 day')); $dateminus4 = date('Y-m-d', strtotime($date .' -4 day')); $dateminus5 = date('Y-m-d', strtotime($date .' -5 day')); $dateminus6 = date('Y-m-d', strtotime($date .' -6 day')); echo '### html page containing javacript slider script and iframes (src of iframes uses $dateminus1 etc... to tell the page which date to display in the frame ### '; } else {echo 'error no mrn set';} } else {echo 'error no date set';} ?&gt; </code></pre> <p>Code for pages in slider (same code on every page):</p> <pre><code>&lt;?php $hostname = "localhost"; $username = ""; $password = ""; $database = ""; $connection = mysql_connect($hostname, $username, $password) OR die('Could not connect to MySQL: ' . mysql_error()); mysql_select_db($database); $Search = $_GET['mrn']; $mrn = $_GET['mrn']; $Date = $_GET['date']; $Date2 = date("Y/m/d", strtotime($Date)); $Date3 = date("d/m/Y", strtotime($Date)); $Find_Query2 = mysql_query("SELECT * FROM patients WHERE mrn ='$Search' "); if(!$Find_Query2) { die(mysql_error()); } while($row = mysql_fetch_assoc($Find_Query2)) { $FNAME = $row['fname']; $LNAME = $row['lname']; $MRN2 = $row['mrn']; $DOB = $row['dob']; $WARD = $row['ward']; } date_default_timezone_set('Europe/London'); $Find_Query1 = mysql_query("SELECT DATE_FORMAT(COALESCE(datetime_man, datetime),'%Y/%m/%d %H:%i:%s') AS datetime2, DATE_FORMAT(COALESCE(datetime_man, datetime),'%H:%i on %d/%m/%y') AS datetime3, DATE_FORMAT(COALESCE(datetime_man, datetime),'%H%i%s') AS datetime4, SBP, SBP_R, SBP_B, DBP, DBP_R, DBP_B, HR, HR_R, HR_B, HRreg, RR, RR_R, RR_B, SpO2, SpO2_R, SpO2_B, O2flow, O2flow_R, O2flow_B, O2device, O2deviceOther, TEMP, TEMP_R, TEMP_B, AVPU, AVPU_R, PAR, PAR_B, UO, UO_B, pain_movement, pain_rest, sedation FROM addobs WHERE mrn='$Search' AND DATE(datetime)='$Date' AND NOT hidden = 'yes' order by datetime2 ASC"); if ($Find_Query1) { $ASBP = array(); $ADBP = array(); $AHR = array(); $ARR = array(); $ASpO2 = array(); $AO2flow = array(); $ATEMP = array(); $AAVPU = array(); $APAR = array(); $AUO = array(); $APM = array(); $APR = array(); $ASED = array(); while ($row = mysql_fetch_assoc($Find_Query1)) { $ASBP[] = "['" . $row["datetime2"] . "'," . $row["SBP_R"] . ", 'rgba(" . $row["SBP_B"] . ",0,0,1)', 'Blood pressure was " . $row["SBP"] . "/" . $row["DBP"] . " mmHg at " . $row["datetime3"] . ".'],"; $ADBP[] = "['" . $row["datetime2"] . "'," . $row["DBP_R"] . ", 'rgba(" . $row["DBP_B"] . ",0,0,1)', 'Blood pressure was " . $row["SBP"] . "/" . $row["DBP"] . " mmHg at " . $row["datetime3"] . ".'],"; $AHR[] = "['" . $row["datetime2"] . "'," . $row["HR_R"] . ", 'rgba(" . $row["HR_B"] . ",0,0,1)', 'Heart rate was " . $row["HR"] . " (" . $row["HRreg"] . " rhythm) at " . $row["datetime3"] . ".'],"; $ARR[] = "['" . $row["datetime2"] . "'," . $row["RR_R"] . ", 'rgba(" . $row["RR_B"] . ",0,0,1)', 'Respiratory rate was " . $row["RR"] ." at " . $row["datetime3"] . ".'],"; $ASpO2[] = "['" . $row["datetime2"] . "'," . $row["SpO2_R"] . ", 'rgba(" . $row["SpO2_B"] . ",0,0,1)', 'Oxygen saturations were " . $row["SpO2"] ."% at " . $row["datetime3"] . ".'],"; $AO2flow[] = "['" . $row["datetime2"] . "'," . $row["O2flow_R"] . ", 'rgba(" . $row["O2flow_B"] . ",0,0,1)', 'Patient was on " . $row["O2flow"] ." l/min of supplementary oxygen " . $row["O2device"] . $row["O2deviceOther"] . " at " . $row["datetime3"] . ".'],"; $ATEMP[] = "['" . $row["datetime2"] . "'," . $row["TEMP_R"] . ", 'rgba(" . $row["TEMP_B"] . ",0,0,1)', 'Patient\'s temperature was " . $row["TEMP"] ." degrees celsius at " . $row["datetime3"] . ".'],"; $AAVPU[] = "['" . $row["datetime2"] . "'," . $row["AVPU_R"] . ", 'rgba(1,0,0,1)', '" . $row["AVPU"] . " at " . $row["datetime3"] . ".'],"; $APAR[] = "var msec_" . $row["datetime4"] . " = Date.parse('" . $row["datetime2"] . "'); var x_" . $row["datetime4"] . " = scatter.getXCoord(msec_" . $row["datetime4"] . "); var y_" . $row["datetime4"] . " = 25; var text = new RGraph.Drawing.Text('par', x_" . $row["datetime4"] . ", y_" . $row["datetime4"] . ", '". $row["PAR"] . "').Set('valign', 'top').Set('font', 'Verdana').Set('halign', 'center').Set('size', 10).Set('colors', ['rgb(255," . $row["PAR_B"] . ",0)']).Draw();" ; $AUO[] = "var msec_" . $row["datetime4"] . "_2 = Date.parse('" . $row["datetime2"] . "'); var x_" . $row["datetime4"] . "_2 = scatter.getXCoord(msec_" . $row["datetime4"] . "_2); var y_" . $row["datetime4"] . "_2 = 25; var text = new RGraph.Drawing.Text('uo', x_" . $row["datetime4"] . "_2, y_" . $row["datetime4"] . "_2, '". $row["UO"] . "').Set('valign', 'top').Set('font', 'Verdana').Set('halign', 'center').Set('size', 10).Set('colors', ['rgb(" . $row["UO_B"] . ",0,0)']).Draw();" ; $APM[] = "var msec_" . $row["datetime4"] . "_3 = Date.parse('" . $row["datetime2"] . "'); var x_" . $row["datetime4"] . "_3 = scatter.getXCoord(msec_" . $row["datetime4"] . "_3); var y_" . $row["datetime4"] . "_3 = 25; var text = new RGraph.Drawing.Text('pm', x_" . $row["datetime4"] . "_3, y_" . $row["datetime4"] . "_3, '". $row["pain_movement"] . "').Set('valign', 'top').Set('font', 'Verdana').Set('halign', 'center').Set('size', 10).Set('colors', ['rgb(0,0,0)']).Draw();" ; $APR[] = "var msec_" . $row["datetime4"] . "_4 = Date.parse('" . $row["datetime2"] . "'); var x_" . $row["datetime4"] . "_4 = scatter.getXCoord(msec_" . $row["datetime4"] . "_4); var y_" . $row["datetime4"] . "_4 = 25; var text = new RGraph.Drawing.Text('pr', x_" . $row["datetime4"] . "_4, y_" . $row["datetime4"] . "_4, '". $row["pain_rest"] . "').Set('valign', 'top').Set('font', 'Verdana').Set('halign', 'center').Set('size', 10).Set('colors', ['rgb(0,0,0)']).Draw();" ; $ASED[] = "var msec_" . $row["datetime4"] . "_5 = Date.parse('" . $row["datetime2"] . "'); var x_" . $row["datetime4"] . "_5 = scatter.getXCoord(msec_" . $row["datetime4"] . "_5); var y_" . $row["datetime4"] . "_5 = 25; var text = new RGraph.Drawing.Text('sed', x_" . $row["datetime4"] . "_5, y_" . $row["datetime4"] . "_5, '". $row["sedation"] . "').Set('valign', 'top').Set('font', 'Verdana').Set('halign', 'center').Set('size', 10).Set('colors', ['rgb(0,0,0)']).Draw();" ; } $BSBP = join(" ", $ASBP); $BDBP = join(" ", $ADBP); $BHR = join(" ", $AHR); $BRR = join(" ", $ARR); $BSpO2 = join(" ", $ASpO2); $BO2flow = join(" ", $AO2flow); $BTEMP = join(" ", $ATEMP); $BAVPU = join(" ", $AAVPU); $BPAR = join(" ", $APAR); $BUO = join(" ", $AUO); $BPM = join(" ", $APM); $BPR = join(" ", $APR); $BSED = join(" ", $ASED); } $numCount = mysql_num_rows($Find_Query1); if ($numCount &lt; 1) { $ERROR = ' &lt;div class="errorbox"&gt;&lt;/div&gt;&lt;div class="errorboxint"&gt; &lt;span style="text-align:center; font-family:Verdana, Geneva, sans-serif; font-size:14px; color:#FFF; font-weight:bold"&gt;No Observations Recorded&lt;/span&gt;&lt;/br&gt; &lt;p&gt;Sorry, no results were found for ' .$FNAME . ' ' . $LNAME . ' (d.o.b ' . $DOB . ') on ' . $Date3 . '&lt;/p&gt; &lt;p&gt;&lt;img src="no-obs.png"&gt;&lt;/img&gt; &lt;/p&gt; &lt;/div&gt;'; } ?&gt; ### then follows html page which makes use of arrays to plot information on charts ### </code></pre> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload