Monday, August 24, 2015

How to Install APC on cPanel


Download the PECL extensions package. APC is one of the extensions included in the package. The latest package can be downloaded from the PECL page of php.net (see Resources). Once downloaded, open the package and locate the php_apc.dll file.
Log into 'WHM cPanel' and navigate to the extensions directory. Note that you will need to have administrative access to add or remove extensions. Having a standard cPanel account that comes with a shared hosting package will not be suitable. You will need to have access to the WHM reseller panel, which typically comes with VPS and dedicated server packages. Adding extensions here will make the extension available to all cPanel accounts on the server.
Upload the php_apc.dll file to the extensions directory. Click 'Add an Extension.' Browse to the location of the file, then select 'Upload.' The APC extension will be added to the server.
Add the extension to the php.ini file. Open the file with a text editor such as Windows Notepad. Scroll down to the section for other extensions and add the following code to the end of the section: extension=php_apc.dll.
Add the extension parameters to the php.ini file. Add the following code to the end of the php.ini file:apc.shm_segments=1
apc.optimization=0
apc.shm_size=128
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=1After the code has been added, click “File” then click “Save.” Use the cPanel file manager to upload the revised php.ini file to the root directory of the server.
Upload the apc.php file to the server. Refer back to the PECL extensions package to locate the apc.php file. Use the cPanel file manager to upload the file to the root directory of your server.
Open the apc.php file in your browser. Navigate to 'yourname.com/apc.php' (replacing “yourname.com” with your Internet domain). This will open the Alternative PHP Cache manager for your server.
VPS Hosting

1 comment:

  1. Browse to the location of the file, then select 'Upload.' The APC extension will be added to the server. VPS Hosting

    ReplyDelete