instalar o activar cache en servidor

  • ¿Como podría hacer para activar la cache en el servidor, tengo una web en un xeon E3124 a 3.30GHz con 8 nucleos y 16gb ram, y me sirve la web más lentamente que cuando lo tenía en vps simplón. La web usa php 5.3 y tengo puesto el php switcher, puede ir mas lenta por esto?, en el otro el 5.3 venia de serie.

  • Hello,

    If you use the PhpSwitcher plugin, you must install the APC Pecl extension. See the README file to know how. If you really need a howto, ask me and I'll write it in few minutes.


  • Give me some minutes to write a howto ;)


  • @Puntonetsvb

    Here, comes the howto ;) Note that you have nothing to download manually.

    Howto install APC Pecl extension for PHP 5.3.29 (as provided by the PhpSwitcher plugin)

    As root user, run the following command:

    1. # /opt/phpswitcher/php5.3/bin/pecl install apc

    For the questions, just press enter.
    Once done, you must enable the APC extension by creating a dedicated ini file. For instance:

    1. # echo "" > /opt/phpswitcher/php5.3/etc/php/conf.d/01_apc.ini

    Once done, you must configure the APC extension according your needs. For instance, you could add the following configuration snippet in the /opt/phpswitcher/php5.3/etc/php/php.ini file:

    1. [apc]apc.enabled = 1apc.shm_segments = 1apc.shm_size = 48Mapc.num_files_hint = 7000apc.user_entries_hint = 4096apc.ttl = 7200apc.user_ttl = 7200apc.gc_ttl = 3600apc.stat = 0;apc.include_once_override = 0apc.enable_cli = 0apc.file_update_protection = 2apc.max_file_size = 2Mapc.cache_by_default = 1apc.use_request_time = 1apc.slam_defense = 0apc.mmap_file_mask = /tmp/apc.XXXXXXapc.stat_ctime = 0apc.canonicalize = 1apc.write_lock = 1apc.report_autofilter = 0apc.rfc1867 = 0apc.rfc1867_prefix = upload_apc.rfc1867_name = APC_UPLOAD_PROGRESSapc.rfc1867_freq = 0apc.rfc1867_ttl = 3600apc.lazy_classes = 0apc.lazy_functions = 0

    Once done, you must restart Apache2 or the PHP-FPM instance according the i-MSCP httpd server implementation that you use:

    If you use the PHP-FPM Apache2 httpd server implementation:

    1. # service psw-5.3-fpm restart

    If you use the Fcgid Apache2 httpd server implementation:

    1. # service apache2 restart

    phpinfo result



  • Howto edited. Replaced zend_extension by extension. APC is not a Zend extension.