Set Error Reporting

I'm running zenphoto 1.4.5.9. I have not been able to set error reporting via a new php.ini file as described in the forum due to my hosts parameters (I guess?). I cannot create a folder preceded by a period (as in .php).

I found the following in the zp-core folder: functions-basic.php lines 103, 104
'error_reporting(E_ALL | E_STRICT);
@ini_set('display_errors', 1);'

In doing some web search, I came across this suggestion

'ini_set('display_errors', 0);
ini_set('log_errors', 1);'

Can I replace the '@ini_set('display_errors', 1);' with the above two lines without causing problems and will it disable the php display errors [is enabled] setting?

Thanks!

Comments

  • You will note that the line of code is within an if statement. This means it does not get executed unless the TEST_RELEASE define is `true`. Most likely you are not running in TEST_RELEASE mode, so your change would have no effect.

    You could add an `}else{` and your lines of code after the `@ini_set` statement. The only draw back with this is it is a change you will need to make each time you update Zenphoto.

    It would really be better to contact your host service and find out how you are supposed to set PHP options for your site.
Sign In or Register to comment.