Disable or remove apc

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);
                      //            $sel_page is sent as a GLOBAL   so that we can reuse is in the page area
                    ?>
                </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");?>
+5
source share
4 answers

Edit:

extension=apc.so

By:

;extension=apc.so

AT:

/etc/php5/apache2/conf.d/apc.ini

And restart the Apache server:

apache2ctl graceful
+11
source

You can enter the following command with root privileges:

pecl uninstall apc
+7
source

apc.enabled 0, APC php.ini - php-fpm.

+6

script, 1- php ,

apc_clear_cache();
0

All Articles