Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] PHP4 not working with eaccelerator-0.9.4 on apache
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
MadEgg
l33t
l33t


Joined: 06 Jun 2002
Posts: 678
Location: Netherlands

PostPosted: Sat May 27, 2006 3:54 pm    Post subject: [solved] PHP4 not working with eaccelerator-0.9.4 on apache Reply with quote

I've got apache, dev-lang/php (4) and dev-php4/eaccelerator emerged, but eaccelerator doesn't work when I start apache...

These are the installed versions:
Code:

[ebuild   R   ] net-www/apache-2.0.55-r1  +apache2 -debug -doc +ldap* -mpm-leader -mpm-peruser -mpm-prefork -mpm-threadpool -mpm-worker -no-suexec (-selinux) +ssl -static-modules -threads 0 kB
[ebuild   R   ] dev-lang/php-4.4.2-r2  -adabas -apache +apache2 -bcmath +berkdb -birdstep +bzip2 -calendar -cdb +cgi -cjk +cli +crypt -ctype -curl -db2 -dbase -dbmaker -dbx -debug -discard-path -doc -empress -empress-bcs -esoob +exif +expat -fastbuild -fdftk -filepro -firebird +flatfile -force-cgi-redirect -frontbase +ftp +gd -gd-external +gdbm -gmp -hardenedphp -hyperwave-api -iconv +imap -informix -inifile -interbase -iodbc +ipv6 -java-external -java-internal -kerberos +ldap -libedit -mcal -mcve -memlimit -mhash -ming -mnogosearch -msql -mssql +mysql +ncurses +nls -oci8 -oci8-instant-client -odbc -oracle7 -overload -ovrimos -pcntl +pcre -pfpro -pic +posix -postgres +readline -recode -sapdb +session +sharedext +sharedmem -snmp -sockets -solid +spell -sqlite +ssl -sybase -sybase-ct -sysvipc -threads -tokenizer +truetype +unicode -wddx +xml -xmlrpc -xpm -xsl -yaz -zip +zlib 0 kB
[ebuild   R   ] dev-php4/eaccelerator-0.9.4  -inode +session 0 kB


This is apache's error-message(from /var/log/apache2/error_log:
Code:

PHP Warning:  [eAccelerator] Can not create shared memory area in Unknown on line 0
PHP Fatal error:  Unable to start eAccelerator module in Unknown on line 0


Thing is, when I use php from CLI(e.g. php index.php) it works fine, and when I type php -v it says the eaccelerator is running. So somehow the extension itself works fine.

Any clues?
_________________
Pentium 4 Prescott 3,2 GHz
Asus P4P800 SE, i865PE chipset
1024 MB PC3200 RAM
AOpen Aeolus GeForce 6800 Ultra 256 MB DDR2
Creative Audigy2 ZS
gentoo-sources-2.6.20-r7
nVidia-drivers version 9755


Last edited by MadEgg on Sun May 28, 2006 9:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
MadEgg
l33t
l33t


Joined: 06 Jun 2002
Posts: 678
Location: Netherlands

PostPosted: Sun May 28, 2006 7:15 pm    Post subject: Reply with quote

*kick*
_________________
Pentium 4 Prescott 3,2 GHz
Asus P4P800 SE, i865PE chipset
1024 MB PC3200 RAM
AOpen Aeolus GeForce 6800 Ultra 256 MB DDR2
Creative Audigy2 ZS
gentoo-sources-2.6.20-r7
nVidia-drivers version 9755
Back to top
View user's profile Send private message
MadEgg
l33t
l33t


Joined: 06 Jun 2002
Posts: 678
Location: Netherlands

PostPosted: Sun May 28, 2006 9:40 pm    Post subject: Reply with quote

Right, I finally found some hint in a Japanese site or something, the problem is the following line in /etc/php/apache2-php/ext/eaccelerator.ini :

Code:

eaccelerator.shm_size="64"



Apparently the Linux kernel has a default shared memory size of only 32 MiB so 64 MiB doesn't work. This can be fixed by lowering the value in eaccelerator.ini or increasing the kernel shared memory size by doing:

Code:

echo 67108864 > /proc/sys/kernel/shmmax


for 64 MiB, or adding

Code:

kernel.shmmax=67108864


to /etc/sysctl.conf
_________________
Pentium 4 Prescott 3,2 GHz
Asus P4P800 SE, i865PE chipset
1024 MB PC3200 RAM
AOpen Aeolus GeForce 6800 Ultra 256 MB DDR2
Creative Audigy2 ZS
gentoo-sources-2.6.20-r7
nVidia-drivers version 9755
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum