I've made a first aid patch for the apache2 of suphp 0.6.2, it takes place in
the file 'mod_suphp.c'
add this code ( the first and the last comments are alread presents in the file
and let you see where you have to place the patch )
/* check if suPHP is enabled for this request */
if (((sconf->engine != SUPHP_ENGINE_ON)
&& (dconf->engine != SUPHP_ENGINE_ON))
|| ((sconf->engine == SUPHP_ENGINE_ON)
&& (dconf->engine == SUPHP_ENGINE_OFF)))
return DECLINED;
/********************************/
/** First Aid Patch Start Here **/
/* On récupère la dernière extension du fichier */
char* file_ext = strrchr(r->filename, '.');
// Si pas d'extension, on n'éxécute pas Ôo
if ( file_ext == NULL )
return DECLINED;
if ( strcmp(file_ext, '.php') != 0
&& strcmp(file_ext, '.php4') != 0
&& strcmp(file_ext, '.php5') != 0
&& strcmp(file_ext, '.phtml') != 0 )
{ return DECLINED; }
/******************************/
/** First Aid Patch End Here **/
/* check if file is existing and acessible */
I've tested it, and it works for me, but i don't know anything about making
mods for apache, so i'm not able to get extensions from the apache
configuration. Hope it will be usefull...
_______________________________________________
suPHP mailing list
[email protected]
http://lists.marsching.biz/mailman/listinfo/suphp