
03-04-2006, 02:15 PM
|
|
Performance Specialist
|
|
Join Date: Dec 2004
Location: New York, NY
Posts: 10,341
|
|
eAccelerator Install - method should work for most PHP versions...
Downloadable version: http://noc.medialayer.com/ea.txt
Just wget it and run "sh ea.txt".
edit: see link for updated version(s).
I have ran this on quite a few servers and it works perfectly. Particularly with PHP 4.4.2 and the latest version of Zend Optimizer.
The /scripts/restartsrv_httpd is only available in cPanel, you can replace it:
Code:
service httpd stop; service httpd startssl
This should work flawlessly on PHP 5 as well - it's the 0.9.4 version.
HTH,
edit - just fixed some of the wordwrap issues, let me know if you have any problems.
Last edited by layer0; 03-04-2006 at 02:27 PM.
|

03-04-2006, 02:22 PM
|
|
I like ice cream
|
|
Join Date: Mar 2003
Location: California USA
Posts: 11,634
|
|
I would like to make a statement about putting the cache directory in /..
Some dedicated providers create a very small / and put everything else in /usr /var and /home... Which could cause / to get full rapidly.. I would look at your partition setup first and then determine where to place it. I like to place it in /home since /home is usually the largest partition.
|

03-04-2006, 02:24 PM
|
|
Performance Specialist
|
|
Join Date: Dec 2004
Location: New York, NY
Posts: 10,341
|
|
Quote:
|
Originally Posted by Steven
I would like to make a statement about putting the cache directory in /..
Some dedicated providers create a very small / and put everything else in /usr /var and /home... Which could cause / to get full rapidly.. I would look at your partition setup first and then determine where to place it. I like to place it in /home since /home is usually the largest partition.
|
Yes, that can easily be modified, I might add some variables to the script for easy modification of that...
A lot of other how-tos state that they recommend to place the cache in /tmp - which IMHO is even worse.
- Edit: updated file, should be a lot better now.
Last edited by layer0; 03-04-2006 at 02:37 PM.
|

03-16-2006, 03:42 PM
|
|
Disabled
|
|
Join Date: Jan 2006
Posts: 907
|
|
Anyone know why it won't work on 4.4.2 for me?
I get httpd configtest = syntax ok
I have shm size in /etc/sysctl.conf set to
kernel.shmmax = 2147483648
apache error shows:
[Thu Mar 16 13:34:24 2006] [notice] SIGHUP received. Attempting to restart
[Thu Mar 16 13:34:24 2006] [notice] FastCGI: process manager initialized (pid 19273)
[Thu Mar 16 13:34:24 2006] [emerg] (22)Invalid argument: Failed to allocated shared memory.
[Thu Mar 16 13:34:24 2006] [alert] (9)Bad file descriptor: FastCGI: read() from pipe failed (0)
[Thu Mar 16 13:34:24 2006] [alert] (9)Bad file descriptor: FastCGI: the PM is shutting down, Apache seems to have disappeared - bye
[Thu Mar 16 13:35:08 2006] [emerg] (22)Invalid argument: Failed to allocated shared memory.
[Thu Mar 16 13:35:11 2006] [emerg] (22)Invalid argument: Failed to allocated shared memory.
[Thu Mar 16 13:35:30 2006] [emerg] (22)Invalid argument: Failed to allocated shared memory.
[Thu Mar 16 13:35:34 2006] [emerg] (22)Invalid argument: Failed to allocated shared memory.
[Thu Mar 16 13:35:55 2006] [emerg] (22)Invalid argument: Failed to allocated shared memory.
[Thu Mar 16 13:36:21 2006] [emerg] (22)Invalid argument: Failed to allocated shared memory.
[Thu Mar 16 13:36:35 2006] [emerg] (22)Invalid argument: Failed to allocated shared memory.
[Thu Mar 16 13:37:33 2006] [notice] mod_security/1.9.1 configured - Apache
[Thu Mar 16 13:37:36 2006] [warn] pid file /usr/local/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Mar 16 13:37:36 2006] [notice] FastCGI: process manager initialized (pid 22998)
[Thu Mar 16 13:37:36 2006] [notice] Apache configured -- resuming normal operations
[Thu Mar 16 13:37:36 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
php.ini was always:
zend_extension="/ea/eaccelerator-0.9.4-rc1/modules/eaccelerator.so"
eaccelerator.shm_size="4096"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
Now this works just fine on 4.4.1 with same config as above but not 4.4.2.
What could be the problem?
|

03-25-2006, 04:58 PM
|
|
Performance Specialist
|
|
Join Date: Dec 2004
Location: New York, NY
Posts: 10,341
|
|
Quote:
|
Originally Posted by UnrealSilence
Anyone know why it won't work on 4.4.2 for me?
I get httpd configtest = syntax ok
I have shm size in /etc/sysctl.conf set to
kernel.shmmax = 2147483648
apache error shows:
[Thu Mar 16 13:34:24 2006] [notice] SIGHUP received. Attempting to restart
[Thu Mar 16 13:34:24 2006] [notice] FastCGI: process manager initialized (pid 19273)
[Thu Mar 16 13:34:24 2006] [emerg] (22)Invalid argument: Failed to allocated shared memory.
[Thu Mar 16 13:34:24 2006] [alert] (9)Bad file descriptor: FastCGI: read() from pipe failed (0)
[Thu Mar 16 13:34:24 2006] [alert] (9)Bad file descriptor: FastCGI: the PM is shutting down, Apache seems to have disappeared - bye
[Thu Mar 16 13:35:08 2006] [emerg] (22)Invalid argument: Failed to allocated shared memory.
[Thu Mar 16 13:35:11 2006] [emerg] (22)Invalid argument: Failed to allocated shared memory.
[Thu Mar 16 13:35:30 2006] [emerg] (22)Invalid argument: Failed to allocated shared memory.
[Thu Mar 16 13:35:34 2006] [emerg] (22)Invalid argument: Failed to allocated shared memory.
[Thu Mar 16 13:35:55 2006] [emerg] (22)Invalid argument: Failed to allocated shared memory.
[Thu Mar 16 13:36:21 2006] [emerg] (22)Invalid argument: Failed to allocated shared memory.
[Thu Mar 16 13:36:35 2006] [emerg] (22)Invalid argument: Failed to allocated shared memory.
[Thu Mar 16 13:37:33 2006] [notice] mod_security/1.9.1 configured - Apache
[Thu Mar 16 13:37:36 2006] [warn] pid file /usr/local/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Mar 16 13:37:36 2006] [notice] FastCGI: process manager initialized (pid 22998)
[Thu Mar 16 13:37:36 2006] [notice] Apache configured -- resuming normal operations
[Thu Mar 16 13:37:36 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
php.ini was always:
zend_extension="/ea/eaccelerator-0.9.4-rc1/modules/eaccelerator.so"
eaccelerator.shm_size="4096"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
Now this works just fine on 4.4.1 with same config as above but not 4.4.2.
What could be the problem?
|
If you uninstall eA and use my installer you will not have this problem.
Thanks,
|

03-26-2006, 09:40 AM
|
|
Performance Specialist
|
|
Join Date: Dec 2004
Location: New York, NY
Posts: 10,341
|
|
Hello,
Just as an update..if you get
"PHP Warning: Unknown(): Unable to load dynamic library './/usr/local/lib/php/extensions/eaccelerator.so' - .//usr/local/lib/php/extensions/eaccelerator.so: cannot open shared object file: No such file or directory in Unknown on line 0"
in your error_log then you can simply do these changes:
nano -w /usr/local/lib/php.ini
Search for (with CTRL+W) extension_dir
Set the value to "usr/local/lib/php/extensions"
Now search for eaccelerator.so
replace "/usr/local/lib/php/extensions/eaccelerator.so" with just "eaccelerator.so"
exit out
service httpd restart
I have tested that on cPanel and it works fine.
However, if you are running Plesk it can get a bit tricky (you should have disabled IonCube from the beginning actually as well).
Soon I will have a Plesk eAccelerator installer available.
HTH,
|

04-06-2006, 05:40 PM
|
|
Web Hosting Guru
|
|
Join Date: Jun 2005
Posts: 288
|
|
how do you know that it's installed? I followed the steps and did sh ea.txt and it just ran a bunch of processes....btw i'm a total noob.
Awesome setup though!
|

04-06-2006, 09:16 PM
|
|
Performance Specialist
|
|
Join Date: Dec 2004
Location: New York, NY
Posts: 10,341
|
|
Quote:
|
Originally Posted by azn_romeo_4u
how do you know that it's installed? I followed the steps and did sh ea.txt and it just ran a bunch of processes....btw i'm a total noob.
Awesome setup though!
|
First insure that Apache can be restarted properly.
service httpd restart
then run
php -v
If you see "eaccelerator" there then yes, it has been installed.
I will soon be updating this script to be more interactive and intuitive for newbies.
HTH,
|

04-06-2006, 09:25 PM
|
|
Web Hosting Guru
|
|
Join Date: Jun 2005
Posts: 288
|
|
PHP 4.4.1 (cli) (built: Apr 5 2006 23:28:45)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
I saw this...but when I go to view my phpinfo, It does say
eAccelerator
eAccelerator support enabled
Version 0.9.4
Caching Enabled true
Optimizer Enabled true
Memory Size 16,777,176 Bytes
Memory Available 16,774,744 Bytes
Memory Allocated 2,432 Bytes
Cached Scripts 1
Removed Scripts 0
Cached Keys 0
Does that mean it's installed?
|

04-07-2006, 07:06 AM
|
|
Performance Specialist
|
|
Join Date: Dec 2004
Location: New York, NY
Posts: 10,341
|
|
Yeah, it's installed 
|

06-04-2006, 03:17 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Jan 2005
Location: Kingdom of Bahrain
Posts: 56
|
|
> php -v
PHP 5.1.4 (cli) (built: May 28 2006 23:19:23)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with eAccelerator v0.9.5-beta2, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
with Zend Extension Manager v1.0.10, Copyright (c) 2003-2006, by Zend Technologies
with Zend Optimizer v3.0.0, Copyright (c) 1998-2006, by Zend Technologies
|

06-04-2006, 09:15 PM
|
|
Performance Specialist
|
|
Join Date: Dec 2004
Location: New York, NY
Posts: 10,341
|
|
Quote:
|
Originally Posted by seeker2002
> php -v
PHP 5.1.4 (cli) (built: May 28 2006 23:19:23)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with eAccelerator v0.9.5-beta2, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
with Zend Extension Manager v1.0.10, Copyright (c) 2003-2006, by Zend Technologies
with Zend Optimizer v3.0.0, Copyright (c) 1998-2006, by Zend Technologies
|
Looks good, but I do not suggest running a beta version. You should run 0.9.4 until 0.9.5 is fully stable.
|

06-05-2006, 03:41 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Jan 2005
Location: Kingdom of Bahrain
Posts: 56
|
|
Quote:
|
Originally Posted by elix
Looks good, but I do not suggest running a beta version. You should run 0.9.4 until 0.9.5 is fully stable.
|
PHP 5.1.4 work fine with eAccelerator v0.9.5-beta2
|

07-13-2006, 03:58 AM
|
|
Web Hosting Evangelist
|
|
Join Date: Oct 2004
Location: India
Posts: 491
|
|
How do I uninstall eAccelerator ?
|

07-15-2006, 11:56 PM
|
|
Web Hosting Evangelist
|
|
Join Date: Oct 2004
Location: India
Posts: 491
|
|
I got the information to deactivate eAccelerator. Just need to # out the zend_extension with the eAccelerator line and restart the httpd.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|