Welcome Guest, Not a member yet? Register   Sign In
PHP errors not showing in testing environment
#1

[eluser]Unknown[/eluser]
Hello,

I run into a weird problem where I cannot figure the answer for. I have searched Google and so on but there does not seem to be a solid answer. I am running a CentOS server with apache and so on and php is normally logging into a /var/log/phperrors.log file.

Now I have altered index.php as follows:

Code:
switch (ENVIRONMENT)
{
  case 'development':
  
   error_reporting(E_ALL);
  
   $system_path  = 'cut';
   $application_folder = 'cut';
  
  break;
  
  case 'testing':
  
   error_reporting(E_ALL);
  
   $system_path  = 'cut';
   $application_folder = 'cut';
  
  break;
  
  case 'production':
  
   error_reporting(0);
  
  break;

  default:
   exit('The application environment is not set correctly.');
}

So in my opinion one would expect for php errors to popup on screen when the environment is set to both development and testing. I would certainly like to have it this way since development is on my local machine, testing is on a replica machine of the production server and eventually the production server is on its own.

When I set my environment on the testing server to "development" all goes well, I get errors popping up However when I switch the environment to testing all errors disapear and I am just left with a blank screen. Also the errors do not get logged to my general php error log which is set server wide.

Can anyone tell me if this is a bug or if I am missing something in the picture here.

Thanks!


Messages In This Thread
PHP errors not showing in testing environment - by El Forum - 04-14-2012, 04:59 PM
PHP errors not showing in testing environment - by El Forum - 04-15-2012, 03:24 PM
PHP errors not showing in testing environment - by El Forum - 04-16-2012, 03:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB