php script gateway timeout -


for unknown me reason, code below not seem work

<?php     $now = gmdate('d, d m y h:i:s') . ' gmt';     header('expires: ' . $now);     header('last-modified: ' . $now);     header("cache-control: no-store, no-cache, must-revalidate");     header("pragma: no-cache");     error_reporting(0);      $copyright = "by www.magnaromagna.it";       $name = $_post["name"];     $day = $_post["day"];     $month = $_post["month"];     $year = $_post["year"];     $cycle = $_post["cycle"];     $chartsize = $_post["chartsize"];      $name = strip_tags($name);     if($chartsize == "small")     {       $chartwidth = 450;       $chartheight = 252;       $tablewidth = 500;     }     elseif($chartsize == "medium")     {       $chartwidth = 625;       $chartheight = 350;       $tablewidth = 655;     }     else     {       $chartwidth = 800;       $chartheight = 448;       $tablewidth = 820;     }       $date = date("m/d/y");     function drawrhythm($daysalive, $period, $color)     {         //$period = $period * 2;         global $cycle, $image, $chartwidth, $chartheight;           $centerday = $daysalive - ($cycle / 2);         $plotscale = ($chartheight - 25) / 2;         $plotcenter = ($chartheight - 25) / 2;          // draw curve         for($count = 0; $count <= $cycle; $count++  )         {      echo    $date ;              $phase = ((($centerday) + $count) % $period) / $period * 2 * pi();             $y = 1 - sin($phase) * (float)$plotscale  + (float)$plotcenter;              if($count > 0)             {                 imageline($image, $oldx, $oldy, $count * $chartwidth / $cycle, $y, $color);             }             $oldx = $count * $chartwidth / $cycle;             $oldy = $y;           }      }      $pastdays = abs(gregoriantojd($month, $day, $year) - gregoriantojd(date( "m"), date( "d"), date( "y")));      $image = imagecreate($chartwidth, $chartheight);      $colorbackground   = imagecolorallocate($image, 0, 0, 0);     $colorforeground   = imagecolorallocate($image, 255, 255, 255);     $colorgrid         = imagecolorallocate($image, 255, 255, 255);     $colorborder       = imagecolorallocate($image, 175, 175, 175);     $colorcross        = imagecolorallocate($image, 255, 255, 255);     $colorphysical     = imagecolorallocate($image, 0, 0, 255);     $coloremotional    = imagecolorallocate($image, 255, 0, 0);     $colorintellectual = imagecolorallocate($image, 0, 255, 0);     $colorintuitive    = imagecolorallocate($image, 255, 0, 255);     $colorawareness    = imagecolorallocate($image, 255, 125, 0);     $colorspiritual    = imagecolorallocate($image, 0, 255, 255);     $coloraesthetic    = imagecolorallocate($image, 255, 255, 0);      imagefilledrectangle($image, 0, 0, $width - 1, $height - 1, $colorbackground);       $nrsecondsperday = 60 * 60 * 24;     // add + before $nrsecondsperday; //     $diagramdate = time() - ($cycle / 2 + $nrsecondsperday) * $nrsecondsperday;     $flagcount = 1;     ($index = 1; $index < $cycle; $index  )     {         $thisdate = getdate($diagramdate);         $countcoord = ($chartwidth / $cycle) * $index;           imageline($image, $countcoord, $chartheight - 25, $countcoord, $chartheight - 20, $colorgrid);          $flag = $flagcount%2;           if($cycle == 60 && $flag == 0)         {           imagestring($image, 3, $countcoord - 2, $chartheight - 16, $thisdate[ "mday"], $colorgrid);         }         elseif($cycle != 60)         {           imagestring($image, 3, $countcoord - 5, $chartheight - 16, $thisdate[ "mday"], $colorgrid);         }         $flagcount  ;         $diagramdate  = $nrsecondsperday;     }       imagerectangle($image, 0, 0, $chartwidth - 1, $chartheight - 20, $colorborder);      imageline($image, 0, ($chartheight - 20) / 2, $chartwidth, ($chartheight - 20) / 2, $colorcross);     imageline($image, $chartwidth / 2, 0, $chartwidth / 2, $chartheight - 20, $colorcross);      drawrhythm($pastdays, 23, $colorphysical);     drawrhythm($pastdays, 28, $coloremotional);     drawrhythm($pastdays, 33, $colorintellectual);     drawrhythm($pastdays, 38, $colorintuitive);     drawrhythm($pastdays, 43, $coloraesthetic);     drawrhythm($pastdays, 48, $colorawareness);     drawrhythm($pastdays, 53, $colorspiritual);      $subnum = rand(0, 999999);     $subnum = "images/dummies/".$subnum.".gif";     imagegif($image,$subnum);     imagedestroy($image);     ?>      <html>      <head>     <title>risultato bioritmo</title>     <meta http-equiv="pragma" content="no-cache">     <meta http-equiv="cache-control" content="no-cache">     <meta name="robots" content="index,follow" />     <link rel="stylesheet" type="text/css" href="biostyle.css">     </head>      <body>     <div align="center"><center>     <table border="0" cellpadding="3" cellspacing="0"  width="90%">     <tr><td align = "right"><a href="http://www.magnaromagna.it/bioritmo/" target="_blank" class="pagelinks">calcola altro bioritmo</a>       </td></tr></table>     </div>     <div align="center"><center>     <table border="1" cellpadding="7" cellspacing="0"  width="90%" class="outertable">       <tr>         <td align="center" class="genericstyle"><p class="bluesubheader">         <?php            if($name != "")            {              echo "bioritmo per $name<br>";            }            else            {               echo "mappa dei tuoi bioritmi<br>";            }          ?>          <?php            echo "nascita: $month/$day/$year<br>data di oggi: $date";         ?>         </p>         <p align="center"><img src="<?php echo "$subnum"; ?>">             rosso: ciclo emozionale&nbsp;|&nbsp;             blu: ciclo fisico&nbsp;|&nbsp;             verde: ciclo intelligenza <br>             viola: intuito&nbsp;|&nbsp;             acqua: ciclo spirituale&nbsp;|&nbsp;             giallo: ciclo estetico&nbsp;|&nbsp;             arancione:ciclo consapevolezza</p>         <p align="left"><span class="bluesubheader"><br>         capire il tuo bioritmo</span></p>        </td>       </tr>     </table>     </center></div>     <div align="center"><center>     <table border="0" cellpadding="3" cellspacing="0"  width="90%">     <tr><td align = "right"><a href="http://www.magnaromagna.it/bioritmo/" class="pagelinks" target="_blank">calcola altro bioritmo</a>       </td></tr></table>     </div>     <div align="center"><center>      <table border="0" cellpadding="7" cellspacing="0" width="300">       <tr>         <td align="center" class="copyright">copyright magnaromagna</td>       </tr>     </table>     </center></div>     </body>     </html>     <?php include("images/dummies/cleanup.php"); ?> 

edit:

after executing it, following happens:

the gateway did not receive timely response upstream server or application

so still script problem or looking @ server issues?


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -