Depuis les nouvelles versions, PHP5 et souvent livré, compilé avec la protection de Suhosin (Hardened PHP Project).

# php -v
PHP 5.2.0 with Suhosin-Patch 0.9.6.1 (cli) (built: Nov 27 2006 22:39:24)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
   with Suhosin v0.9.10, (C) Copyright 2006, by Hardened-PHP Project

Suhosin is an advanced protection system for PHP installations. It was designed to protect servers and users from known and unknown flaws in PHP applications and the PHP core. Suhosin comes in two independent parts, that can be used separately or in combination. The first part is a small patch against the PHP core, that implements a few low-level protections against bufferoverflows or format string vulnerabilities and the second part is a powerful PHP extension that implements all the other protections.

http://www.hardened-php.net/suhosin/a_feature_list.html

  • Allows enforcing limits on REQUEST variables or separated by type (GET, POST, COOKIE)
    • Supports a number of variables per request limit
    • Supports a maximum length of variable names [with and without indicies]
    • Supports a maximum length of array indicies
    • Supports a maximum length of variable values
    • Supports a maximum depth of arrays

Bien qu'il permette de limiter les attaques, il est fréquent qu'il vous bride vos vieux sites web, voir même phpmyadmin avec des grosses tables. Ce qui fût mon cas, phpmyadmin apres une recherche ne me retournait pas le résultat de ma requête, mais le message :

Vous devez accepter les cookies pour poursuivre.

Il fallait éditer /etc/php5/conf.d/suhosin.ini pour configurer Suhosin, puis relancer Apache.

Voici la configuration initiale de Suhosin.

En faisant la brute extrême, vous devriez plus rencontrer de problème en configurant comme suit :

suhosin.cookie.max_totalname_length = 100000
suhosin.get.max_totalname_length = 100000
suhosin.post.max_totalname_length = 100000
suhosin.post.max_value_length = 100000
suhosin.request.max_totalname_length = 100000
suhosin.request.max_value_length = 100000
suhosin.request.max_vars = 100000

Ou beaucoup plus simplement en désactivant l'extension suhosin (en commentant par ";" l'inclusion de ce module)

;extension = suhosin.so

Voici un lien connexe à ce problème sur le forum de developpez.com.