Lenny et suphp
Par Sébastien Le Ray le mardi 3 mars 2009, 19:03 - Lenny - Lien permanent
Erreurs avec suphp suite à la mise à jour vers Lenny.
Si vous avez effectué des modifications locales sur le fichier /etc/suphp/suphp.conf et que vous n'avez pas été très vigilant lors de la mise à jour vers Lenny vous pouvez vous retrouver avec de genre d'erreurs dans votre log apache:
[Xxx Xxx xx xx:xx:xx xxxx] [error] [client xxx.xxx.xxx.xxx] SecurityException in Application.cpp:440: Handler not found in configuration [Xxx Xxx xx xx:xx:xx xxxx] [error] [client xxx.xxx.xxx.xxx] Caused by KeyNotFoundException in Configuration.cpp:234: Handler "application/x-httpd-php" not found [Xxx Xxx xx xx:xx:xx xxxx] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: xxxxx.php
Cela vient du fait que pour des raisons de sécurité, on est passé d'un AddHandler x-httpd-php à un AddType application/x-httpd-php. Du coup il faut mettre à jour la section [handlers] du fichier suphp.conf:
x-httpd-php=php:/usr/bin/php-cgi
devient
application/x-httpd-php=php:/usr/bin/php-cgi
Et le tour et joué (même pas besoin de redémarrer Apache)