Mask Fatal and Strict-standard errors

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Mask Fatal and Strict-standard errors

Bhoomit
Hi,

We are using PHP 5.3.5, and cakePHP 1.3.7.

We are not able to mask the error messages we are getting - 'Strict
Standards", "Fatal errors". The problem we are running into is -

We tried this solution.....


Configure::write('debug', 0);
and
Configure::write('log', false);


in core.php but it did not work.

currently we are commenting  echo $_this->_output($data); in
debugger.php to stop notice/warnings but we are unable to stop strict-
standard/ Fatal errors

Right now, we cannot move to a diff. version of CakePHP as we have an
upcoming imp. milestone and so we want to avoid any regressions that
might happen as a result of moving to a diff. version. We may try that
later on.


We are looking to -
1.) either mask the errors we are getting?
2.) any other way to handle these errors?

Thanks

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|

Re: Mask Fatal and Strict-standard errors

Dakota
Hi,

Firstly, you do not mask fatal or strict errors. You fix them. Fatal
erros mean that there is something wrong in your code and php cannot
continue parsing your code. If you "mask" a fatal error, your user
will simply get a white screen. Strict errors mean that
you are doing something that will probably break in a future version
of php.

Post some of your errors and we'll help you fix them.

I also recommend you upgrade to the latest CakePHP 1.3 version for
security and stability reasons. All CakePHP point releases are fully
tested, and you do not need to worry about regression errors.

Simply put, ignoring pho notices, warnings, strict and fatal errors is
asking for trouble. Don't hide them, fix them.

Also, don't edit CakePHP core files, ever!

On Nov 22, 8:24 am, Bhoomit <[hidden email]> wrote:

> Hi,
>
> We are using PHP 5.3.5, and cakePHP 1.3.7.
>
> We are not able to mask the error messages we are getting - 'Strict
> Standards", "Fatal errors". The problem we are running into is -
>
> We tried this solution.....
>
> Configure::write('debug', 0);
> and
> Configure::write('log', false);
>
> in core.php but it did not work.
>
> currently we are commenting  echo $_this->_output($data); in
> debugger.php to stop notice/warnings but we are unable to stop strict-
> standard/ Fatal errors
>
> Right now, we cannot move to a diff. version of CakePHP as we have an
> upcoming imp. milestone and so we want to avoid any regressions that
> might happen as a result of moving to a diff. version. We may try that
> later on.
>
> We are looking to -
> 1.) either mask the errors we are getting?
> 2.) any other way to handle these errors?
>
> Thanks

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|

Re: Mask Fatal and Strict-standard errors

Bhoomit
Hi Walther,

Thanks for the reply. You have a point that we don't mask these errors
we fix them but I cant show fatal error in production, so I want to
mask Fatal error and show default page or some default error and log
the actual error to fix it.

Strict standard errors we are getting is below:

Strict Standards: Non-static method Configure::read() should not be
called statically, assuming $this from incompatible context in /var/
www/hachi-2.0/cake/libs/debugger.php on line 308 Strict Standards: Non-
static method Configure::getInstance() should not be called
statically, assuming $this from incompatible context in /var/www/
hachi-2.0/cake/libs/configure.php on line 155 Strict Standards: Non-
static method CakeLog::write() should not be called statically,
assuming $this from incompatible context in /var/www/hachi-2.0/cake/
libs/debugger.php on line 311 Strict Standards: Non-static method
String::insert() should not be called statically, assuming $this from
incompatible context in /var/www/hachi-2.0/cake/libs/debugger.php on
line 311 Strict Standards: Non-static method CakeLog::getInstance()
should not be called statically, assuming $this from incompatible
context in /var/www/hachi-2.0/cake/libs/cake_log.php on line 230

We are also trying to migrate to new version as you recommended.

Thanks

On Nov 23, 9:25 am, Walther <[hidden email]> wrote:

> Hi,
>
> Firstly, you do not mask fatal or strict errors. You fix them. Fatal
> erros mean that there is something wrong in your code and php cannot
> continue parsing your code. If you "mask" a fatal error, your user
> will simply get a white screen. Strict errors mean that
> you are doing something that will probably break in a future version
> of php.
>
> Post some of your errors and we'll help you fix them.
>
> I also recommend you upgrade to the latest CakePHP 1.3 version for
> security and stability reasons. All CakePHP point releases are fully
> tested, and you do not need to worry about regression errors.
>
> Simply put, ignoring pho notices, warnings, strict and fatal errors is
> asking for trouble. Don't hide them, fix them.
>
> Also, don't edit CakePHP core files, ever!
>
> On Nov 22, 8:24 am, Bhoomit <[hidden email]> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > We are using PHP 5.3.5, and cakePHP 1.3.7.
>
> > We are not able to mask the error messages we are getting - 'Strict
> > Standards", "Fatal errors". The problem we are running into is -
>
> > We tried this solution.....
>
> > Configure::write('debug', 0);
> > and
> > Configure::write('log', false);
>
> > in core.php but it did not work.
>
> > currently we are commenting  echo $_this->_output($data); in
> > debugger.php to stop notice/warnings but we are unable to stop strict-
> > standard/ Fatal errors
>
> > Right now, we cannot move to a diff. version of CakePHP as we have an
> > upcoming imp. milestone and so we want to avoid any regressions that
> > might happen as a result of moving to a diff. version. We may try that
> > later on.
>
> > We are looking to -
> > 1.) either mask the errors we are getting?
> > 2.) any other way to handle these errors?
>
> > Thanks

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|

Re: Mask Fatal and Strict-standard errors

ajay_rapid
This post has NOT been accepted by the mailing list yet.
In reply to this post by Bhoomit
Strict standards: Non-static method String::insert() should not be called statically, assuming $this from incompatible context in C:\wamp\www\fieldforce\cake\libs\debugger.php on line 398

My problem is same,please give me appropriate solution.

Thanks

Ajay!