1

I am upgrading a Joomla 25 site to J3, and developing a new template. I am working locally on MAMP.

However, whenever any php error occur, Joomla won't show what the error is, instead I am getting the blank screen and making it a real pain to fix those errors and work efficiently.

Whatever I try, I always get the local value of the error_reporting as 0. (Master value is 32767).

I set it in the configuration.php, tried setting via the htaccess, I modified and set it directly in the error handling function inside the includes/framework.php, I ini_set it in the index.php of Joomla and also at the top of the index.php of the template, but yet the local error_reporting value remains 0.

There is no additional php.ini file loaded other than the main php config file and all other local php/joomla sites I have on my MAMP do show php errors according to their specified settings.

What's wrong with this site?

1

Inside your php.ini file, have a look for the following and make sure the values are set as follows:

; display_errors
  Default Value: On


; error_reporting
  Default Value: E_ALL & ~E_NOTICE

Once any changes are made to the php.ini file, be sure to restart Apache.

If this doesn't work, it could possible be an issue with the XDebug extensions that comes installed with PHP. Try uninstalling it, and installing a newer version

  • Hey, thanks for getting involved (isn't late in UK now?) - I found the cause of the issue. You will fall from the sky when you read what it was. The solution now might seem easy, but it drove me crazy till I end there. – FFrewin Aug 9 '15 at 23:32
  • Was a Sunday bed time answer lol. Wow, I never thought a plugin would do such a thing. Do you know which plugin is? – Lodder Aug 10 '15 at 7:14
  • Hi @Lodder: it's a SEO system plugin, but for its name see my comment to webchun on my answer below. – FFrewin Aug 10 '15 at 8:19
  • I updated my answer including the plugin name. – FFrewin Aug 10 '15 at 11:06
0

With all common approaches exhausted with no success at changing the local error_reporting value, I started thinking that somewhere in the system's flow there is something that sets the error_reporting to 0, which is overriding anything else.

I did a system find/search for the term "error_reporting" in the root directory of this site. In my search results, I got a bunch of referenced files.

I started opening them one by one, to investigate. Then finally I came across a system plugin that had the following piece of code inside its main file.

// error_reporting set to show all errors except those for notices and coding standards warnings
// error_reporting (E_ALL ^ E_NOTICE);
// error_reporting (E_ALL ^ E_DEPRECATED);
// error_reporting (E_ALL);
error_reporting (0);

I commented out the error_reporting(0) and immediately the local error_reporting value became the same as the Master one, and finally I took back the control of being able to show any php errors.

Update:

After requests in the comments to publish the plugin name, I checked if the original code included the error_reporting(0). I found the same version of the plugin and indeed this code was part of it. The plugin is SEO-GENERATOR v4.6
* I don't have access to review the latest version of the plugin to see if it is changed on this part.

  • what plugin is that? so we can avoid it in the future – webchun Aug 10 '15 at 2:35
  • 1
    @webchun: Well, because I inherited this site and from what I see, there are many others that have put their hands on it doing all kind of things, I can't be sure if the plugin was developed this way, or someone else did this at some point. It's a SEO system plugin, but before publishing the plugin name, I will search for that plugin version (is about 2 years old) and see if the original code included this and also will try also to check its latest version. If I find the same code, then I will publish its name, otherwise I don't think it will be fair to diminish the plugin and its developer. – FFrewin Aug 10 '15 at 8:17
  • 1
    @webchun: I updated my answer including the plugin name. – FFrewin Aug 10 '15 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.