3

I have installed xampp on ubuntu. PHP is configured to show all possible errors, warnings, notices etc, but when i make an error in php code no error is displayed.

When i copy that file to other computer (debian with native apache, mysql and php set) and open it in browser it shows

Fatal error: Call to a member function fetch() on a non-object in... 

as expected, so why xampp with identical php.ini shows just an empty page?

3 Answers 3

2

Another solution is

add this line in your .htaccess file

php_value display_errors on
Sign up to request clarification or add additional context in comments.

Comments

2

there may be some serever configure mistake
write below as first line at your php page

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

NOTE: use Xdebug

Comments

1

Find your php.ini file. You can find the location by typing php --ini in the terminal.

Then look for display_errors and set it to 1. And error_reporting to E_ALL.

This will set the value globally.

If you only need to see errors for a particular script or application:

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

http://php.net/manual/en/function.error-reporting.php

http://php.net/manual/en/errorfunc.configuration.php

3 Comments

I have enabled displaying errors in php.ini: error_reporting = E_ALL | E_STRICT display_errors = On display_startup_errors = On
You might be getting that error because the database on the other computer is not the same. There might not be any error in your application.
Restart apache for changes to take effect.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.