Zend optimizer or other php accelerator

14 posts / 0 new
Last post
#1 Wed, 08/31/2011 - 09:34
DoubleSpeed

Zend optimizer or other php accelerator

Is there an add-on/installer etc to load Zend optimizer or other php accelerator as a module etc?

Wed, 08/31/2011 - 09:38
andreychek

Howdy,

Nope! But that's generally pretty straight forward, it's usually just a matter of putting those in a directory, and then editing $HOME/etc/php.ini, and adding a line there that loads those from the directory you put them into.

-Eric

Wed, 08/31/2011 - 10:37
DoubleSpeed

Isn't there an install process?

Wed, 08/31/2011 - 10:49
andreychek

There is no automated method of installing Zend or other php accelerators.

If you'd like to install those, they will work, but you'd have to follow the installation instructions included with the accelerators.

It's usually as simple as:

  • Unpack the accelerator into a directory

  • Add a line to $HOME/etc/php.ini that loads the accelerator

But, we don't have an automated method of doing that, nor do we have instructions for installing the various accelerators out there, you'll have to follow the instructions provided with the accelerator :-)

-Eric

Mon, 09/12/2011 - 06:58
DoubleSpeed

I guess this is a bit of a generic question as I'm not too sure if it relates to Virtualmin or just general configuration..

The install for Zend Optimizer seems really straight forward however it's not working for me and I wonder if anyone can give me any guidance on this? I have PHP 5.2.17 installed on my server and the install guide for Zend Optimizer has just 4 steps …

1. Extract the Zend Optimizer package.

2. Locate the ZendOptimizer.so file in the directory which
corresponds to your version of PHP (4.3.x, 4.4.x, 5.0.x, 5.1.x, 5.2.x).

2. Add the following line to your php.ini file:
Linux and Mac OS X: zend_extension=

3. Restart your Web server.

I have therefore added this to my php.ini and rebooted…

zend_extension=/root/ZendOptimizer/data/5_2/ZendOptimizer.so

However Zend Optimizer isn’t being loaded when I view phpinfo, can anyone give me any guidance on this?

Mon, 09/12/2011 - 08:51
andreychek

Howdy,

Well, there's two things I'd suggest.

One, make sure that it's the Virtual Server's php.ini file that you're adding that line to... that's in $HOME/etc/php.ini.

Second, the /root directory is owned by root, and not accessible to normal users.

So, if you put files in there, a normal user wouldn't be able to see it.

My recommendation would be to put your Zend Optimizer files somewhere globally accessible... perhaps in /usr/local/ZendOptimizer.

Also, you can look in the Apache errors logs, $HOME/logs/error_log, for clues as to why things aren't working.

-Eric

Mon, 09/12/2011 - 10:33
DoubleSpeed

Thanks for coming back to me on this, I've moved to:

zend_extension=/usr/local/ZendOptimizer/data/ZendOptimizer.so

Updated the php.ini files and rebooted, still nothing, whats weird is that the sites access & error logs arn't giving me anything to go on doesn't mention any php issues, any other ideas?

Mon, 09/12/2011 - 13:23
andreychek

Which PHP Execution mode are you using? That's configured in Server Configuration -> Website Options. The default is FCGID. If it's using mod_php, that would mean it's using a different php.ini file.

-Eric

Mon, 09/12/2011 - 13:27
DoubleSpeed

Yes using mod_php, my php.info files says Loaded Configuration File /etc/php.ini

Mon, 09/12/2011 - 13:31
andreychek

Okay, rather than the $HOME/etc/php.ini file I mentioned earlier, you'd need to add your Zend Optimizer extension to /etc/php.ini.

-Eric

Mon, 09/12/2011 - 13:35
DoubleSpeed

I've actually already put it in that one as well however I still don't see anyting after reboot in the phpinfo.php file?

Mon, 09/12/2011 - 13:38
andreychek

Now that you have it in /etc/php.ini, do you see any errors in $HOME/logs/error_log or /var/log/httpd/error_log when accessing your site?

Also, you may want to try restarting Apache:

/etc/init.d/httpd restart

When you do that, do any errors show up in either log file?

-Eric

Mon, 09/12/2011 - 14:49
DoubleSpeed

no nothing that I can see

Wed, 09/14/2011 - 06:56
DoubleSpeed

OK got to the bottom of this, sorry it was user error! Just in case someone else makes my stupid mistake it was down to having put a 32 bit version onto a 64 bit server doh! Anyway put the 64 bit version onto the server rebooted and worked first time.

Topic locked