PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Whenever I'm logged out of my session (which I also can't explain why it's happening) and reload the page, it takes about 3 full minutes for it to load, even though the PEAR timer claims otherwise:
time index ex time %
Start 1215786404.88426100 - 0.00%
Auth: Start 1215786404.91293000 0.028669 50.09%
Auth: Finish 1215786404.91962200 0.006692 11.69%
ACL: Start 1215786404.91989000 0.000268 0.47%
ACL: Finish 1215786404.91994300 0.000053 0.09%
Stop 1215786404.94149500 0.021552 37.66%
total - 0.057234 100.00%
There's hardly any code being executed though... what could be causing this? It's not my internet connection because it's also happening on my localhost WIndows test server. Both servers run Apache.
Are you on a shared server? It may be severely overloaded.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
No, it's a dedicated server and it's not overloaded at all; the load is 0.18 / 4 on a Dual Core AMD Opteron(tm) Processor 270
Also, it's happening on my local Windows testing environment as well so it is probably not hardware related. I'm not sure where to start looking for the issue because the timer reports that the site is being processed in less than a second... I'm wondering why it takes the browser that long to process.
Ping your servers and check the response times.
Post the code you're using.
Hm... don't really know what else to try. =/
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
$page = $p["path"].".php";
// Access control
if (@$_REQUEST["logout"])
{
$auth = Zend_Auth::getInstance();
$auth->clearIdentity();
flash(trl("You have been logged out."),"/admin");
}
elseif (!ALLOW_ACCESS)
{
if ($userLogin = user("login"))
{
$msg["error"]->add(trl("$userLogin is not allowed to access this page.
Please upgrade to an account with higher security clearance."));
}
$p["layout"] = "none";
include(LIB_LAYOUTS_PATH."login.php");
}
elseif (strstr($page,"pages") === false)
{
// If we're not including a standard page (cron job) -> get output only
$html = getData($_SERVER["HTTP_HOST"]."/".$page."?".$_SERVER["QUERY_STRING"]);
}
else // Process PHP page
{
ob_start();
include($page);
$html = ob_get_contents();
ob_end_clean();
}
$admin = true; // Use admin templates
include(LIB_DRIVERS_PATH."dispatch.php");
Library dispatcher (called at the end of the previous file):
if (!empty($p["html"]))
{
// Replace standard HTML
$html = $p["html"];
}
if (!empty($p["layout"]) && $p["layout"] !== "none")
{
$customLayout = LAYOUTS_PATH.$p["layout"].".php";
if (file_exists($customLayout))
{
include($customLayout);
}
else // There is no custom layout defined
{
include(LIB_LAYOUTS_PATH.$p["layout"].".php");
}
}
else echo @$html;
if (VERBOSE >= 2)
{
$timer->display();
}
Have you checked for a load spike whenever a request is pending? That would indicate a faulty loop of some sort. Someone else was having this problem a while back and I believe they were using Zend as well. I don't believe there was a solution posted.