Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Nate on October 25, 2002, 06:23:26 PM

Title: The ionCube PHP Accelerator?
Post by: Nate on October 25, 2002, 06:23:26 PM
Anyone have any problems running the PHP Accelerator?  I've installed it on a couple of e-smith boxes "512" and its improved performance by quite a bit.  The pages load faster and the load on the server is much less.  On my production server, I'm running a couple hundred imap accounts with 75 percent of them switched over to using webmail all the time(no more outlook/outlook express security updates).  PHP 4.2.2 with

Horde: 2.1
IMP: 3.1 (run IMP tests)
Turba: 1.0
Kronolith: 1.0
Nag: 1.0
Mnemo: 1.0
Vacation: 2.0
The performance boost is amazing on this server.  Pages load much quicker and server load is greatly reduced.

My home server(with only 6 accounts) is running PHP 4.2.2 with

Horde: 3.0-cvs
IMP: 4.0-cvs
Turba: 2.0-cvs
Gollem: 0.0.1-cvs
Nic: 0.0.2-cvs
Kronolith: 2.0-cvs
Jonah: 0.0.3-cvs
Mnemo: 2.0-cvs
Nag: 2.0-cvs
Vacation: 2.0.1-cvs
all running great.  I don't see a server load decrease with the Php accelerator on this server because of only having 6 accounts and the load is already very small, but the pages load much quicker.
Is anyone else running this program?  If so, have you had any problems?
thanks,
Nate
Title: Re: The ionCube PHP Accelerator?
Post by: Nate on October 25, 2002, 06:34:58 PM
The link.
http://www.php-accelerator.co.uk/
Title: Re: The ionCube PHP Accelerator?
Post by: Nathan Fowler on October 25, 2002, 07:03:09 PM
Thanks, I'm going to check that out.  I'm in a similar situation, many accounts using the server for IMAP with a PHP front-end.  Constant use, I can' t say my overhead is very high but anything to increase the load times of the pages would be excellent.

Nate, check out mod_gzip, it saves me at least 250MB in bandwidth a month:
http://www.remotecommunications.com/apache/mod_gzip/
Title: Re: The ionCube PHP Accelerator?
Post by: Nate on October 25, 2002, 07:13:06 PM
I'll check it out, thanks,
Nate
Title: Re: The ionCube PHP Accelerator?
Post by: Nate on October 25, 2002, 08:04:44 PM
mod_gzip is very nice.  Here is the link to the rpm and How-to for anyone else interested.
http://www.star-support.com/downloads/mitel/contrib/apache-mod-gzip/
Title: Re: The ionCube PHP Accelerator?
Post by: Nathan Fowler on October 25, 2002, 08:39:46 PM
Nate, also check out mod_ziplook.

http://pihl.kumpu.org/mod_ziplook/
Title: Re: The ionCube PHP Accelerator?
Post by: Lc on October 28, 2002, 02:53:44 AM
I've got it installed on my home server - it's great, no problems so far.  Webmail (and everything else PHP) on my poor old P100 seems much quicker now.
Title: Re: The ionCube PHP Accelerator?
Post by: jamson on October 29, 2002, 06:50:10 AM
I have installed mod_gzip lately. It is difficult to tell now that It have lessen the load of the server as the taffic is low at this point of time.

Unfortunately, going through /var/log/httpd/error_log show tons of error msg as follow,
-------------------------------------------------------------------------------------
[root@e-smith root]# tail -f /var/log/httpd/error_log
[Tue Oct 29 11:34:41 2002] [error] mod_gzip: EMPTY FILE [/tmp/_1694_105_6.wrk] in sendfile2
[Tue Oct 29 11:34:41 2002] [error] mod_gzip: Make sure all named directories exist and have the correct permissions.
[Tue Oct 29 11:34:41 2002] [error] mod_gzip: EMPTY FILE [/tmp/_2458_104_5.wrk] in sendfile2
[Tue Oct 29 11:34:41 2002] [error] mod_gzip: Make sure all named directories exist and have the correct permissions.
[Tue Oct 29 11:34:41 2002] [error] mod_gzip: EMPTY FILE [/tmp/_1700_103_4.wrk] in sendfile2
[Tue Oct 29 11:34:41 2002] [error] mod_gzip: Make sure all named directories exist and have the correct permissions.
[Tue Oct 29 11:34:45 2002] [error] mod_gzip: EMPTY FILE [/tmp/_2457_104_5.wrk] in sendfile2
[Tue Oct 29 11:34:45 2002] [error] mod_gzip: Make sure all named directories exist and have the correct permissions.
[Tue Oct 29 11:34:45 2002] [error] mod_gzip: EMPTY FILE [/tmp/_2462_103_4.wrk] in sendfile2
[Tue Oct 29 11:34:45 2002] [error] mod_gzip: Make sure all named directories exist and have the correct permissions.
--------------------------------------------------------------------------------------------------

I have did a search on google with explanation on the error but no resolution yet. Anyone can provide some direction on fixing this error.

Many thanks
Title: Re: The ionCube PHP Accelerator?
Post by: Bahuma on November 01, 2002, 07:58:28 AM
WOW! This makes a huge different on loading times for webmail. Very easy to install. Give it a go people!
Title: Re: The ionCube PHP Accelerator?
Post by: Nate on November 01, 2002, 05:05:34 PM
"I have did a search on google with explanation on the error but no resolution yet. Anyone can provide some direction on fixing this error."  
The only good fix I have seen, is to not use SSL.  The problem is that SSL grabs up the file before gzip has a chance to compress it.
Title: Re: The ionCube PHP Accelerator?
Post by: Nathan Fowler on November 01, 2002, 05:08:06 PM
Nate, my same conclusions exactly.  There are other fixes but it involves using mod_rewrite (I believe), and most of those are obfuscated work-arounds which actually create security issues.

I host several other vhosts, and despite my extensive use of SSL, I find mod_gzip to still be powerful, saving me on the average 200 to 300Mb monthly.
Title: Re: The ionCube PHP Accelerator?
Post by: Michael Maggard on November 07, 2002, 08:11:35 PM
Ok, I'm looking to install the ionCube PHP Accelerator 1.3.2 revision 2
but can't find the right template to copy to edit to change the php.ini file.

If I'm following this all right I need to:

1. Copy one of the templates in
/etc/e-smith/templates/etc/php.ini/ ???
to
/etc/e-smith/templates-custom/etc/php.ini/ ???

2. Edit that file to add:
; PHP Accelerator extension
zend_extension="/path/to/php_accelerator_1.3.2.so"

3. Then update the php.ini file to use this with:
/sbin/e-smith/expand-template /etc/php.ini

4. Finally shut down and restart the Apache server so this all takes effect.

So, can anyone advice me which of the /etc/e-smith/templates/etc/php.ini/ I should be editing, and of course is my understanding of the entire process correct?

-- Michael
Title: Re: The ionCube PHP Accelerator?
Post by: Nathan Fowler on November 07, 2002, 08:25:17 PM
/etc/php.ini isn't templated...unless something changed in 5.5 and I don't know about it.
Title: Re: The ionCube PHP Accelerator?
Post by: Dan Brown on November 07, 2002, 08:46:43 PM
I'm pretty sure this did change in 5.5; it definitely is templated in 5.6.
Title: Re: The ionCube PHP Accelerator?
Post by: Nathan Fowler on November 07, 2002, 08:53:44 PM
Dan, do you run Ver >= 5.5?  If so, could you help him out, I don't think the positioning of the PHPA matters, but it would probably be a good idea to position it close to the commented zend section and I'm not sure what template fragment that would be.

Thanks,
Nathan
Title: Re: The ionCube PHP Accelerator?
Post by: Michael Maggard on November 07, 2002, 09:15:58 PM
> -----Original Message-----
> From: Nathan Fowler [mailto:evilghost@packetmail.net]
> Sent: Thursday, November 07, 2002 12:25 PM
> Subject: Re: The ionCube PHP Accelerator? [3:23077:23537]
>
> /etc/php.ini isn't templated...unless something changed in
> 5.5 and I don't know about it.

Yes, it appears that >=5.5 uses templates for php.ini, at least I'm seeing them on my 5.5:

/etc/e-smith/templates/etc/php.ini/

 00PHP
 10LanguageOptions
 20ResourceLimits
 30ErrorHandling
 40DataHandling
 50PathsDirectories
 60FileUploads
 65FopenWrappers
 70DynamicExtension00
 70DynamicExtension30imap
 70DynamicExtension50ldap
 70DynamicExtension70mysql
 80ModuleSettings
 template-begin

Doing some spelunking of these (very unfamiliar territory) in "70DynamicExtension00" I've come across the instructions:

 #;;;;;;;;;;;;;;;;;;;;;
 # Dynamic Extensions ;
 #;;;;;;;;;;;;;;;;;;;;;
 # if you wish to have an extension loaded automaticaly, use the
 # following syntax:  extension=modulename.extension
 # Note that it should be the name of the module only, no directory information
 # needs to go here.  Specify the location of the extension with the
 # extension_dir directive above.}

Which leads me to believe this is to be a double edit. Anyone care to confirm? [Thanks]

-- Michael

ps yes I'll make this into a How-To when done, I'm 1/2way there already ;)
Michael Maggard wrote:
Title: Re: The ionCube PHP Accelerator?
Post by: Nathan Fowler on November 07, 2002, 09:23:53 PM
Perfect, that's the information I needed to confirm/help you out (and others running 5.5).

mkdir -p /etc/e-smith/templates-custom/etc/php.ini
pico -w /etc/e-smith/templates-custom/etc/php.ini/70ionCube01

[Add the lines]
; PHP Accelerator extension
zend_extension="/path/to/php_accelerator_1.3.2.so"
[Save]

/sbin/e-smith/expand-template /etc/php.ini
/etc/rc.d/init.d/httpd restart
Title: Re: The ionCube PHP Accelerator?
Post by: Nate on November 07, 2002, 09:24:00 PM
Make a custom template /etc/e-smith/templates-custom/etc/php.ini/75phpa, and put the stuff needed by phpa into that file.  Expand the template, restart httpd, and see what happens.  Worst case you would have to delete 75phpa and re-expand the template.