Fix Log Rotation Problems Published: Jul 14, 2004
  • Rating


The Zend Optimizer is a free application that runs the files encoded by the Zend Encoder and Zend SafeGuard Suite, while enhancing the running speed of PHP applications.

The Zend Optimizer is a free application that runs the files encoded by the Zend Encoder and Zend SafeGuard Suite, while enhancing the running speed of PHP applications. Many scripts require that you have Zend Optimizer installed so you are able to run them on your server while decrypting and running them on the fly while increasing runtime performance.

Tested On:
This tutorial was test on: Red Hat Enterprise Linux ES using Cpanel and assumes you will be installing on a Cpanel based system otherwise you may need to make modifications in the locations of files and directories for your OS/Control Panel.


1) First off you’ll need to grab a copy of the optimizer depending on what platform you would like to install it on.
Linux users should grab the Linux glibc2.1

2) Once you have downloaded the file locally you’ll need to upload it to your web server. FTP to your server and upload it to a directory of your choice. It’s to bad that Zend had to make it so they couldn’t provide us with a direct download so you can’t wget the file directly from the server… a bit of a pain.

3) Uncompress/extract  the file
tar zvfx ZendOptimizer*.tar.gz
cd ZendOptimizer-2.5.3-linux-glibc21-i386/

4) Now run the installer,

5) The welcome screen
zend optimizer install step 1

6) The agreement

zend optimizer install step 2

7) Where do you want to install Zend Optimizer?

zend optimizer install step 3

8) Locate your php.ini file

zend optimizer install step 4

9) Select Yes, chances are you are using Apache web server

zend optimizer install step 5

10) Enter the location of where apache files are 

zend optimizer install step 7

11) Zend changing your php.ini file location, make a note of this.

zend optimizer install step 7


zend optimizer install step 8

13) Restart your web server for the changes to take effect

zend optimizer install step 9

14) Apache should restart successfully.
You may also restart Apache manually using # /etc/init.d/httpd restart

zend optimizer install step 10

15) Ensure that Zend Optimizer is working you can do the following in the shell.
php -v

You should see something like this for output:

PHP 4.3.8 (cgi) (built: Sep  1 2004 17:00:35)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
with Zend Optimizer v2.1.0, Copyright (c) 1998-2003, by Zend Technologies

16) After the installation is complete you can remove the directory.
cd to where the extracted Zend first.
rm –rf ZendOptimizer-2.5.3-linux-glibc21-i386

Congrats, you have now installed Zend Optimizer.

Article written by Steven Leggett Copyright 2004

  • Rating


Related Articles

Comments (6)

  • Gravatar - Nicholas Tritchew
    Nicholas Tritchew 16:39, August 4, 2004
    For the: Home / Hosting Tutorials / Cpanel Tutorials / Fix Log Rotation Problems <br />
    <br />
    I was curious if this log rotate procedure outlined deletes the previous log files when it rotates.<br />
    <br />
    Or does it compress the previous log, stores it in a archive folder, and then creates a new log?<br />
    <br />
  • Gravatar - Vince
    Vince 21:53, August 8, 2004
    Hi,<br />
    <br />
    Prior that you mention this:<br />
    "but if you do find some more, please drop me a line so I can update the article."<br />
    <br />
    We have a file xferlog in our /var/log directory.<br />
    <br />
    /var/log/xferlog<br />
    This is about 8MB now.<br />
    <br />
    Can we apply the log rotate which you have provide in<br />
    <br />
    pico /etc/logrotate.conf<br />
    add the below entry:<br />
    <br />
    /usr/local/cpanel/logs/error_log {<br />
    weekly<br />
    rotate 1<br />
    }<br />
    <br />
    Thanks for your advise.<br />
    Sincerely,<br />
    Vincent Kam<br />
    <br />
    <br />
  • Gravatar - Diana Ward
    Diana Ward 20:48, December 23, 2004
    You are quickly becoming my guru! Thank you!
  • Gravatar - tc
    tc 02:18, February 23, 2006
    i use cpanel and the logs for my websites are located at: /usr/local/apache/domlogs/<br />
    <br />
    They are getting rotated. I'm not sure how but they all go back to January 31 and today is February 22. 2006.<br />
    <br />
    This article is old, maybe its out of date as cPanel has gone through a lot of updates. So I'm posting this comment to let others know things may be different.<br />
  • Gravatar - Flash Alexander
    Flash Alexander 15:01, May 28, 2006
    The first instruction refers to apache 'system' logs. Therefore I read it to not cover the 'domlogs'. <br />
    <br />
    Should I also include a line for the domlogs?
  • Gravatar - Louish
    Louish 17:50, January 19, 2009
    My problem isn't the /usr/local/cpanel/logs/ log files, its the ones in /usr/local/apache/logs/ that are huge.<br />
    <br />
    I've had 3 servers lock up because the error_log has gotten over 2 gigs. Can I simply change your weekly rotate 1 code to point to the apache folder? Or is something else special needed?

Add Your Thoughts is a hosting directory, not a web host.

Copyright © 1998-2018