Jump to content

Recommended Posts

I have checked my PHP ini file (php.ini) and display_errors is set and also error reporting is E_ALL. I have restarted my Apache webserver. I have tried all things those are mentioned here ( show all php errors ). I have even put these lines at the top of my script, and it doesn't even catch simple parse errors. For example, I declare variables with a "$" and I don't close statements";". But all my scripts show a blank page on these errors, but I want to actually see the errors in my browser output.

 

PHP Code :

 

error_reporting(E_ALL); ini_set('display_errors', 1); 

 

Edited by requinix
removing link
Link to comment
https://forums.phpfreaks.com/topic/315267-how-to-get-php-errors/
Share on other sites

If the script doesn't parse, that could be a reason you are not seeing errors.  Since most editors catch these types of problems in advance, I'm not sure why you would not fix them in advance.  You can also use the command line linter with php -l sourcefile.php.

Sometimes this trick can help get around the problem of a stubborn parsing error that causes a 500 error:

Make a script named something like debug.php:

<?php
//debug.php

error_reporting(E_ALL);
ini_set("display_errors", 1);
require("filewitherrors.php");

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.