Results 1 to 5 of 5

Thread: PHP Accelerator

  1. #1
    Join Date
    Mar 2002
    Location
    Philadelphia, PA
    Posts
    2,517

    PHP Accelerator

    No warranties are made

    First goto http://www.php-accelerator.co.uk/download.php and find the version that suits your platform. In this tutorial for reference, I will be using the Linux alpha version.

    'create a directory
    root@Server [~]# mkdir /usr/local/phpA

    'Go into dir
    root@Server [~]# cd /usr/local/phpA

    'get the goods
    root@Server [~]# wget http://www.php-accelerator.co.uk/rel...glibc2.1.3.tgz

    'unpack
    root@Server [~]# gzip -d php_accelerator-1.3.2_php-4.0.6_linux_alpha-glibc2.1.3.tgz

    'remove
    root@Server [~]# rm -f php_accelerator-1.3.2_php-4.0.6_linux_alpha-glibc2.1.3.tgz

    'untar
    root@Server [~]# tar -xvf php_accelerator-1.3.2_php-4.0.6_linux_alpha-glibc2.1.3.tar

    'go into dir created
    root@Server [~]# cd php_accelerator-1.3.2_php-4.0.6_linux_alpha-glibc2.1.3/

    'move it one directory down
    root@Server [~]# mv * ../

    'move yourself one dir down
    root@Server [~]# cd ..

    'cd to root
    root@Server [~]# cd

    'change to home
    root@Server [~]# cd /home

    'make cache directory
    root@Server [~]# mkdir phpacache

    'set access
    root@Server [~]# chmod 577 phpacache

    'open up php.ini in vi/pico etc
    root@Server [~]# vi /usr/local/lib/php.ini

    Now look for Dynamic Exension, after the Dynamic Exension arguments (the end of them), paste the following.

    zend_extension="/usr/local/phpA/php_accelerator_[VERSION].so"
    phpa.cache_dir = /home/phpacache
    phpa.shm_ttl = 12h
    phpa.shm_max_processes = 512
    phpa.shm_stats_check_period = 5m
    phpa.shm_size = 32
    phpa.enable_php_memory_bug_workaround = 1

    Save php.ini

    'restart apache
    root@Server [~]# /etc/init.d/httpd restart
    Last edited by Akash; 03-08-2004 at 06:46 PM.

  2. #2
    Join Date
    Dec 2002
    Location
    The Shadows
    Posts
    2,925
    Just a note, with the latest version, there are also a few other directives you should set:

    phpa.phpa=on
    phpa.tweaks=on

    But other then that, it worked for me.
    Last edited by Akash; 03-08-2004 at 06:47 PM.

  3. #3
    Join Date
    Jul 2002
    Posts
    3,734
    Another note: don't install this if you require the Zend Optimizer (needed for many popular closed source 3rd party scripts). The two will not work together.

  4. #4
    Join Date
    Dec 2002
    Location
    The Shadows
    Posts
    2,925
    Good note...
    Last edited by Akash; 03-08-2004 at 06:47 PM.

  5. #5
    Join Date
    Aug 2002
    Posts
    655
    Originally posted by Andrew
    Another note: don't install this if you require the Zend Optimizer (needed for many popular closed source 3rd party scripts). The two will not work together.
    Thanks, this is a good note!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •