hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Hosting Security and Technology Tutorials : eAccelerator Install - method should work for most PHP versions...
Reply

Hosting Security and Technology Tutorials Tutorials related to server security or the like.
Forum Jump

eAccelerator Install - method should work for most PHP versions...

Reply Post New Thread In Hosting Security and Technology Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 03-04-2006, 02:15 PM
layer0 layer0 is offline
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.
Reply With Quote


Sponsored Links
  #2  
Old 03-04-2006, 02:22 PM
Steven Steven is online now
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.

Reply With Quote
  #3  
Old 03-04-2006, 02:24 PM
layer0 layer0 is offline
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.
Reply With Quote
Sponsored Links
  #4  
Old 03-16-2006, 03:42 PM
UnrealSilence UnrealSilence is offline
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?

Reply With Quote
  #5  
Old 03-25-2006, 04:58 PM
layer0 layer0 is offline
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,

Reply With Quote
  #6  
Old 03-26-2006, 09:40 AM
layer0 layer0 is offline
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,

Reply With Quote
  #7  
Old 04-06-2006, 05:40 PM
azn_romeo_4u azn_romeo_4u is offline
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!

Reply With Quote
  #8  
Old 04-06-2006, 09:16 PM
layer0 layer0 is offline
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,

Reply With Quote
  #9  
Old 04-06-2006, 09:25 PM
azn_romeo_4u azn_romeo_4u is offline
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?

Reply With Quote
  #10  
Old 04-07-2006, 07:06 AM
layer0 layer0 is offline
Performance Specialist
 
Join Date: Dec 2004
Location: New York, NY
Posts: 10,341
Yeah, it's installed

Reply With Quote
  #11  
Old 06-04-2006, 03:17 AM
seeker2002 seeker2002 is offline
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

Reply With Quote
  #12  
Old 06-04-2006, 09:15 PM
layer0 layer0 is offline
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.

Reply With Quote
  #13  
Old 06-05-2006, 03:41 AM
seeker2002 seeker2002 is offline
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

Reply With Quote
  #14  
Old 07-13-2006, 03:58 AM
firestarter firestarter is offline
Web Hosting Evangelist
 
Join Date: Oct 2004
Location: India
Posts: 491
How do I uninstall eAccelerator ?

Reply With Quote
  #15  
Old 07-15-2006, 11:56 PM
firestarter firestarter is offline
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.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Softaculous Releases Auto Installer Version 4.1.7 Web Hosting News 2012-12-19 16:45:21
Microsoft Updates Licensing, Offers Four Versions of Windows Server 2012 Web Hosting News 2012-07-06 10:31:48
What WordPress Hosting Customers Want Web Hosting News 2012-02-27 14:16:11
Google Plans to Disable Online Revocation Checks in Future Chrome Versions Web Hosting News 2012-02-09 13:26:57
Attracta Offers Single-Click Web App Installation to Customers Web Hosting News 2011-08-11 16:57:09


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?