PHP Issue
Posted: Mon Feb 13, 2012 8:39 am
Hi all,
My problem is this: I have an SWF embedded in a php page, which every 5 minutes runs some code and then calls a separate php script to save the changes to a database. If, instead of every 5 minutes, I set it to run every 1 minute it works great (so I know the problem is back end). However, set at 5 minutes it doesn't even execute once, even though the SWF is running, nothing is getting saved to the database. Also if I refresh the page after that time all I get is a blank page. It seems to me as if between 1 and 5 minutes the session variable is being unset or something, but I'm not sure why that would happen or how to fix it, or if that's even really the cause. As you can see from the code, I've tried ini_set and set_time_limit each without success. Any advice/help on this would be greatly appreciated. Thanks.
My problem is this: I have an SWF embedded in a php page, which every 5 minutes runs some code and then calls a separate php script to save the changes to a database. If, instead of every 5 minutes, I set it to run every 1 minute it works great (so I know the problem is back end). However, set at 5 minutes it doesn't even execute once, even though the SWF is running, nothing is getting saved to the database. Also if I refresh the page after that time all I get is a blank page. It seems to me as if between 1 and 5 minutes the session variable is being unset or something, but I'm not sure why that would happen or how to fix it, or if that's even really the cause. As you can see from the code, I've tried ini_set and set_time_limit each without success. Any advice/help on this would be greatly appreciated. Thanks.
Code: Select all
<?php
session_start();
ini_set('max_execution_time', 0);
set_time_limit(0);
?>
<?php
if (isset($_SESSION['uID'])) {
?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
html, body { height:100%; background-color: #ffffff;}
body { margin:0; padding:0; overflow:hidden; }
#flashContent { width:100%; height:100%; }
</style>
</head>
<body>
<div id="flashContent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="100%" id="SWF" align="middle">
<param name="movie" value="SWF.swf" />
<param name="quality" value="best" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="SWF.swf" width="100%" height="100%">
<param name="movie" value="SWF.swf" />
<param name="quality" value="best" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
</body>
</html>
<?php
} ?>