I installed APC on my ubuntu 11.04 Linux module and I want to do some performance tests to see what improves speed compared to PHP without APC, but I don't know how to disable / remove APC.
I tried to clear the apc.ini files, but this did not work. Even after I load the page for the first time, the page will be cached, and the second time I load the page, it loads much faster.
Here's the php file that I use to measure time.
<?php
function getTime()
{
$a = explode (' ',microtime());
return(double) $a[0] + $a[1];
}
$Start = getTime();
?>
<?php require_once("includes/connection.php");?>
<?php require_once("includes/functions.php");?>
<?php
find_selected_page(true);
?>
<?php require_once("includes/header.php");?>
<table id="structure">
<tr>
<td id="navigation">
<?php echo navigation_public($sel_subject,true);
?>
</td>
<td id="page">
<?php
if($sel_page!=NULL)
{
echo "<h2>".htmlentities($sel_page['menu_name'])."</h2>";
echo "<p>".strip_tags(nl2br($sel_page['content']),"<b><br><p><a>")."</p>";
}
else if($sel_subject!=NULL)
{
echo "<h2>".$sel_subject['menu_name']."</h2>";
}
else
{
echo "<h2>Welcome to Widget Corp</h2>";
}
?>
</td>
</tr>
</table>
<?php
$End = getTime();
echo "Time taken = ".number_format(($End - $Start),3)." secs";
?>
<?php require("includes/footer.php");?>
source
share