gazbond
(Gaz)
1
Hi, I’m using the following to configure custom error handlers for my modules:
class AdminModule extends CWebModule
{
public function init()
{
Yii::app()->setComponents(array(
'errorHandler'=>array(
'errorAction'=>'admin/site/error',
),
));
$this->setImport(array(
'admin.components.*',
'admin.controllers.*',
));
}
}
This works fine on my development machine running PHP 5.2.11 but fails on my live server running PHP 5.1.6
No rendering occurs at all on my live server
I read that magic __toString() is not available pre PHP 5.2
Any suggestions about whats causing this problem?
Many thanks 
zaccaria
(Matteo Falsitta)
2
Put this in your index.php for better debug:
error_reporting(E_ALL);
ini_set('display_errors',1);
Maybe you have a problem with case sensitive file system.
gazbond
(Gaz)
3
Tried that, no errors at all.
mdomba
(Maurizio Domba Cerin)
4
First thing… try without your custom error handler…
if then all is working… the problem is in your error handler… post it here for inspection 
gazbond
(Gaz)
5
I commented out the error handler code:
class AdminModule extends CWebModule
{
public function init()
{
//Yii::app()->setComponents(array(
// 'errorHandler'=>array(
// 'errorAction'=>'admin/site/error',
// ),
//));
$this->setImport(array(
'admin.components.*',
'admin.controllers.*',
));
}
}
And the error handler defined in config/main.php worked.
Strange thing…
I then commented the error handler code back in and it is now working :\
Thanks for your help 