eAccelerator setting causes blank pages

eAccelerator setting causes blank pages

by Sileet A -
Number of replies: 19
I'm on linux, Ubuntu Feisty Fawn.

I installed eAccelerator and it appears to be working fine. I see a lot of cached scripts with control.php.

In my moodle, under the performance settings, there is an option called:

"Cache Type"

Currently I have it set to "internal". I tried setting it to "eaccelerator" and it caused moodle to break.

The banner would load, but nothing below the banner. I had to go in through mdl_config and set it back to internal because I couldn't get anything but the banner to show.

Any ideas why?
Average of ratings: Useful (1)
In reply to Sileet A

Re: eAccelerator setting causes blank pages

by Jörg Knegten -
Hello Sileet A,

if you have eaccelerator 0.9.5.1 in your setup, run configure with --with-eaccelerator-shared-memory

This should help you.

Greetings
Jörg
Average of ratings: Useful (2)
In reply to Jörg Knegten

Re: eAccelerator setting causes blank pages

by Andy Hediger -
Hallo Jörg

Thank you for this hint. Unfortunately our moodle still produces blank pages
(showing only the header) after installing eaccelerator. We can switch eaccelerator off and on via DB, its definitely the reason for the blank pages.

PHP Version 5.2.4-2
eaccelerator Version 0.9.5.2
We did try on both moodle 1.9beta2 and moodle 1.8.2+

Greetings from Zurich smile
andy
Attachment Bild_8.png
In reply to Sileet A

Re: eAccelerator setting causes blank pages

by Heather P -
Mine did exactly the same. How did you turn it back to internal as I can't get anything.
Have I got to rummage in the database?
Thanks
In reply to Heather P

Re: eAccelerator setting causes blank pages

by Brad Tippett -
Hi Heather,

You should be able to turn caching off by modifying your Moodle database directly through phpmyadmin or some other method. The table you're looking for is mdl_config and the record name is rcache. Change that from 1 to 0 to disable record caching.

Good luck!
Brad
Average of ratings: Useful (2)
In reply to Heather P

Re: eAccelerator setting causes blank pages

by Manuel de la Torre -
You can turn it back adding the following lines to your config.php in your moodle diectory.

$CFG->rcache = false;
$CFG->cachetype = 'internal';

Manuel.
Average of ratings: Useful (2)
In reply to Manuel de la Torre

Re: eAccelerator setting causes blank pages

by 米 嘉仓 -
<>

why?

I configured config.php of my moodle,followed

$CFG->rcache = true;
$CFG->cachetype = 'eaccelerator';

I access my moodle ,then I catch followed errer!

Fatal error

>: Call to undefined function _get() in /var/www/moodle18/lib/eaccelerator.class.php on line 56

I must set

$CFG->rcache = false;
$CFG->cachetype = 'internal';

how can I using eaccelerator  accelering my moodle!Please! 
In reply to 米 嘉仓

Re: eAccelerator setting causes blank pages

by Florent Lartet -
I don't have any answer but I will firm up details about this problem.

/var/www/moodle18/lib/eaccelerator.class.php
class eaccelerator {
function eaccelerator() {
global $CFG;
if ( function_exists('eaccelerator_get')) {
$mode = 'eaccelerator';
} elseif (function_exists('mmcache_get')) {
$mode = 'mmcache';
} else {
debugging("\$CFG->eaccelerator is set to true but the required functions are not available. You need to have either eaccelerator or turckmmcache extensions installed, compiled with the shmem keys option enabled.");
}

$this->mode = $mode;
$this->prefix = $CFG->dbname .'|' . $CFG->prefix . '|';
}

$mode is empty => nothing_get

I have looked for this function but it doesn't exist in Moodle files or eaccelerator files. Maybe its name has changed with recent version of eaccelerator ...

In reply to Florent Lartet

Re: eAccelerator setting causes blank pages

by Martín Langhoff -
I fixed this a while ago in 1.8.x and 1.9. It is caused by having eaccelerator installed but without the "mmcache" option.

The easiest way is to upgrade to to a later 1.8. Anything post Sept 20th. There are also some tricks in this thread: http://moodle.org/mod/forum/discuss.php?d=75689#p345295
In reply to Martín Langhoff

Re: eAccelerator setting causes blank pages

by Florent Lartet -
Thanks !
Indeed, I've configured eaccelerator (on|in)? this way :
./configure --with-php-config=$PHP_PREFIX/bin/php-config --with-eaccelerator-shared-memory

and errors disappeared. I had the latest 1.8 when there was errors too.

One another point configuring eaccelerator, I don't really understand when rcache should be switch on/off in Moodle. Is it internal ?
In reply to Florent Lartet

Re: eAccelerator setting causes blank pages

by Andy Hediger -
we still get a blank page in moodle as soon as
cachetype = eaccelerator and rcache = 1 (yes)

we did try to install eaccelerator with various settings

./configure --with-php-config=/usr/bin/php-config --with-eaccelerator-shared-memory

./configure --with-php-config=/usr/bin/php-config --enable-eaccelerator=shared

and
./configure --with-php-config=/usr/bin/php-config --with-eaccelerator-shared-memory --enable-eaccelerator=shared

on
PHP Version 5.2.4-2
eaccelerator Version 0.9.5.2
moodle 1.9beta2

thanks for any help
Attachment Bild_1.png
In reply to Andy Hediger

Re: eAccelerator setting causes blank pages

by Dark Nova -
I'm also getting the same issue?

Has anyone managed to resolve this issue??

Regards

DK
In reply to Dark Nova

Re: eAccelerator setting causes blank pages

by Charlie Owen -
If you turn on Moodle debugging do you get the same issue as reported here? I'm wondering if this is a Moodle bug or not.
In reply to Dark Nova

Re: eAccelerator setting causes blank pages

by Martín Langhoff -
If you look in this thread, you'll find an earlier post by me discussing the resolution. smile
In reply to Dark Nova

Re: eAccelerator setting causes blank pages

by Arjen Vrielink -
A bit late, but here's some issue you might have forgotten:

When reconfiguring your makefile, did you run "make clean" before running "make", "make test" amd "make install".

So after "./configure --with-eaccelerator-shared-memory --with-eaccelerator-sessions --with-eaccelerator-content-caching" or something, you should run "make clean" to clean up your old compilation.

Hope this helps (it did for me). You should have these directives shown in the eaccelerator section of your phpinfo() page:

eaccelerator.content shm_and_disk eaccelerator.keys shm_and_disk eaccelerator.sessions shm_and_disk
Average of ratings: Useful (1)
In reply to Arjen Vrielink

Re: eAccelerator setting causes blank pages

by Dale Davies -
Wow! Arjen, thank you!

Ive spent what seems like hours recompiling with different options and still not managed to get the php functions available.

What I was missing was to use "make clear" as you suggested. After that everything worked fine!

All the best mate smile
In reply to Florent Lartet

Re: eAccelerator setting causes blank pages

by A. H. -
Hello Florent,
Did you turn on rcache?
if you did, did you get blank pages?

My case is that once i enable rcache, i get blank pages. Whats wrong? I configured eaccelerator the same way u did.

thnx,
amer
In reply to Martín Langhoff

Re: eAccelerator setting causes blank pages

by A. H. -
Hello,
I am facing this problem of blank pages whenever i set rcache true.
i had accelerator installed and running perfect on Moodle165.
Now it seems it doesnt work on moodle184?!

how do i uninstall eaccelerator or do i just create a new config and isntall again?
What is the options you used to have it run?

The load is getting so high on the real server and i need to get things back to normal asap.

(If i didnt select eaccelerator to be used by moodle, queries wont be cacheed? coz i dont remember there was this option in moodle165)

eAccelerator

eAccelerator support enabled
Version 0.9.5
Caching Enabled true
Optimizer Enabled true
Memory Size 16,777,180 Bytes
Memory Available 436 Bytes
Memory Allocated 16,776,744 Bytes
Cached Scripts 196
Removed Scripts 0
Cached Keys 0

Directive Local Value Master Value
eaccelerator.allowed_admin_path no value no value
eaccelerator.cache_dir /tmp/eaccelerator /tmp/eaccelerator
eaccelerator.check_mtime 1 1
eaccelerator.compress 1 1
eaccelerator.compress_level 9 9
eaccelerator.debug 0 0
eaccelerator.enable 1 1
eaccelerator.filter no value no value
eaccelerator.log_file no value no value
eaccelerator.name_space no value no value
eaccelerator.optimizer 1 1
eaccelerator.shm_max 0 0
eaccelerator.shm_only 0 0
eaccelerator.shm_prune_period 0 0
eaccelerator.shm_size 16 16
eaccelerator.shm_ttl 0 0





thnx for your help,
amer
In reply to A. H.

Re: eAccelerator setting causes blank pages

by Gary Anderson -
A couple notes:

1. In version 1.9, there is a setting for cache type for eaccelerator. So, perhaps there is a compatibility issue.

2. Your memory allocation is too low. Your memory allocated should be smaller than memory size. On 1.9 we use about 35MB to cache all common scripts, so you may want to set this to 50MB and see what it does to these numbers.

--Gary


In reply to Gary Anderson

Re: eAccelerator setting causes blank pages

by A. H. -
Hi All,

These are my config files...i am still not managing to get rid of the blank pages when i turn rcache on.

PHP config:
'./configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--build=i386-redhat-linux' '--host=i386-redhat-linux' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db4=/usr' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-aspell' '--with-xml' '--with-expat-dir=/usr' '--with-dom' '--with-dom-xslt=/usr' '--with-dom-exslt=/usr' '--with-xmlrpc' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-pear=/usr/share/pear' '--with-imap=../imap-2004c1' '--with-kerberos' '--with-ldap' '--with-mysql' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mime-magic=/usr/share/file/magic.mime'


eaccelerator configuration:
./configure --enable-eaccelerator=shared --with-php-config=/usr/bin/php-config --with-eaccelerator-shared-memory --with-eaccelerator-sessions --with-eaccelerator-content-cachin

What should i do for rcache to work?!!!

thank you for ur help,
amer