BMWFAQ Club BMWFAQ Club

Regresar   BMW FAQ Club > Blogs > Danny Bembibre, Crawlability Inc.
Registrarse Obtener Código Activación Blogs Galería Marcar como leído Ayuda Lista de usuarios

Noticias

Pensamientos al azar acerca de vBSEO y bmwfaq.com
Valorar Entrada

Enable caching functions get and put in eAccelerator

Escrito 20/11/07 a las 09:57:26 por Danny
eAccelerator_get and eAccelerator_put functions are now disabled by default. These functions have been disabled because when leaving them on without any precautions these functions can be used for a local DoS attack by keep putting data in shared memory.

http://eaccelerator.net/ticket/37

The correct way to enable it is configure with the following atribute

Código:
--with-eaccelerator-shared-memory
Configure and install secuence

Código:
export PHP_PREFIX="/usr"
 
$PHP_PREFIX/bin/phpize
 
./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config --with-eaccelerator-shared-memory
 
make
 
make install

Test page with functions and cached data

Código PHP:
<?php
$rfunc 
get_extension_funcs'eaccelerator' );
print_r($rfunc);
 
function 
ea ($str)
{
eaccelerator_put("testkey"$str);
for (
$i 0$i 1e5$i++)
{
$r eaccelerator_get("testkey");
}
return 
$r;
}
 
$str str_repeat("1234567890"1024); // 10 KB
$r ea($str);
echo 
strlen($r);
 
?>
Output from my server

Código PHP:
Array ( 
[
0] => eaccelerator_put 
[1] => eaccelerator_get 
[2] => eaccelerator_rm 
[3] => eaccelerator_gc 
[4] => eaccelerator_lock 
[5] => eaccelerator_unlock 
[6] => eaccelerator_caching 
[7] => eaccelerator_optimizer 
[8] => eaccelerator_clear 
[9] => eaccelerator_clean 
[10] => eaccelerator_info 
[11] => eaccelerator_purge 
[12] => eaccelerator_cached_scripts 
[13] => eaccelerator_removed_scripts 
[14] => eaccelerator_list_keys 
[15] => eaccelerator_encode 
[16] => eaccelerator_load 
[17] => _eaccelerator_loader_file 
[18] => _eaccelerator_loader_line 

 
10240 
vBSEO Working with eAccelerator

Categoría: BMWFAQ Club, vBSEO
Comentarios 0 Enviar Entrada de Blog por Correo
Total de Comentarios 0

Comentarios

 

Todas las horas son GMT +2. La hora es 17:58:50.
© 1998-2007 BMW FAQ CLUB
Para cualquier información relacionada con este sitio contacte con Danny:info@bmwfaq.com
Todos los logos y marcas registradas que puedan aparecer, son propiedad de sus respectivos dueños.
Esta web cumple con las leyes LSSI como puede ver en: Condiciones de uso y Privacidad de datos
One of the largest message boards on the web !
Search Engine Friendly URLs by vBSEO 3.2.0
Página Generada en 0,05562 segundos