I have tried both of :
ini_set('include_path', '.:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes');
and also :
php_value include_path ".:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes"
in the .htaccess file.
Both methods actually do work but only intermittently. That is, they will work fine for about 37 pages requests and then fail about 42 pages requests resulting in an require() call to cause a fatal error effectively crashing the site.
I'm not even sure where to begin trying to find out what is going on!
Looks like you duplicated the current directory in your include path. Try removing one of the '.:' from your string.
The in script version was originally
ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . 'lib' . PATH_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'classes');
and thus the .:.: was coming from the existing path:
ini_get('include_path')
I tried removing it anyway and the problem persists.
It turned out the issue was related to a PHP bug in 5.2.5
Setting an "admin_flag" for include_path caused the include path to be empty in some requests, and Plesk sets an admin_flag in the default config for something or other. An update of PHP solved the issue.