Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP not displaying any errors

I know this has been asked multiple times in the past but none of the solutions worked for me.

This is my PHP code:

<?php
  function
?>

This should produce an error. However, it's just returning a 500 error and not loading.

I tried less severe error producing code like this:

<?php
  $test = $example;
?>

Calling on an undefined variable produced an error on a different computer.

In my php.ini, I have display_errors = On, display_startup_errors = On, and error_reporting = E_ALL.

Edit Thanks to aspiringCodingArtisan's suggestion, I realized I was editing the wrong php.ini file. Problem solved.

like image 507
UserIsCorrupt Avatar asked Jul 01 '26 15:07

UserIsCorrupt


1 Answers

Are you looking at the correct php.ini file? If you have something like MAMP you will find that it has multiple versions of PHP.

like image 170
kaizenCoder Avatar answered Jul 03 '26 05:07

kaizenCoder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!