M
M
Matvey Mamonov2015-06-29 12:47:57
PHP
Matvey Mamonov, 2015-06-29 12:47:57

Why doesn't PHP output any errors?

Good morning.
The fact is that my PHP does not display ANY errors. Wrong path for require? Doesn't output. I wrote a set of random characters in the code - it doesn't matter. Generally no errors.
I immediately thought that it does not work at all, but no, if you insert a simple print () at the beginning of the script, then what is written there is displayed. I interpose after require_once - already happens nothing. I sin on require_once 'app/core/router.php', because it is after it that all the mess begins. Why is not clear.

<?php
  require_once 'vendor/autoload.php';
  require_once 'app/core/router.php';
  
  print('dfgdfg');
  Router::run();
?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ablizin, 2015-06-29
@eucalipt

PHP : Enable display of PHP warnings and errors
Enable display of all errors and warnings in the php.ini file
error_reporting = E_ALL
display_errors = On
display_startup_errors = On Enable
display of all errors and warnings in PHP script code
.php file the following lines:
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
Enabling the output of all errors and warnings in the .htaccess file
php_value display_errors 1
php_value display_startup_errors 1
php_value error_reporting E_ALL

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question