WebFaction
Community site: login faq

I just installed a WordPress theme on my site but its full of error messages.

Here is one such error message. Strict Standards: Non-static method className::method() should not be called statically in /home/username/webapps/wp-site/wp-content/themes/theme-name/framework/admin/layout.php on line 12

I think this can be set in php.ini ? But whats the setting ? (only for strict standards)
I tried entering error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT in php.ini but it still shows.

asked 01 Dec '12, 06:28

epqrs's gravatar image

epqrs
16921030
accept rate: 0%

edited 01 Dec '12, 06:37


Yes, that should be one that would work, but depending on the server you are on, you might also need to edit your .htaccess file too. See Configuring PHP for more info.

Other directives you could add in your php.ini file would be the display_errors and log_errors. A complete php.ini file should look like:

error_reporting = E_ALL & ~E_STRICT & ~E_DEPRECATED
display_errors = Off
log_errors = Off

If you keep seeing errors, then check if you override the behaviour somewhere in your scripts. Search for example for any lines like 'ini_set('display_errors', 1);' or similar.

If you are unable to resolve this, you could always open a ticket and we can take a closer look.

permanent link

answered 01 Dec '12, 07:03

iliasr's gravatar image

iliasr ♦♦
1.7k4
accept rate: 37%

edited 01 Dec '12, 09:17

Im able to suppress the errors by giving display_errors = Off in my php.ini (Im on web323) but I don't want to turn off all errors - just Strict Standards error messages. Is that possible ?

(01 Dec '12, 07:19) epqrs epqrs's gravatar image

Make sure that you do not override the directives set in your php.ini file in any of your wordpress or theme files. Try something like grep -R error_reporting /home/username/webapps/wp-site to find any possible overrides.

Regarding the suppress of errors, the official php documentation mentions that you should have that off on a production system and it would be better to use the log_errors and error_log directives to save output in a flat file in the server instead.

(01 Dec '12, 09:17) iliasr ♦♦ iliasr's gravatar image

Thanks - solved it by overwriting a line in the theme file itself. Thanks.

(01 Dec '12, 09:56) epqrs epqrs's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×238

question asked: 01 Dec '12, 06:28

question was seen: 11,984 times

last updated: 01 Dec '12, 11:16

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2017 PARAGON INTERNET GROUP LIMITED
WEBFACTION IS A SERVICE OF PARAGON INTERNET GROUP LIMITED
REGISTERED IN ENGLAND AND WALES 7573953 - VAT REGISTRATION NUMBER 182147021
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM