---
title: "Fixing the Strict Standards Error in php.ini"
description: "In this tutorial: What it is Why it displays How to fix it There are times when your site will give PHP errors after an upgrade or a site move that were not there before. One of the more common..."
url: https://www.inmotionhosting.com/support/website/strict-standards-fix/
date: 2014-12-09
modified: 2020-10-13
author: "Scott Mitchell"
categories: ["Website", "Website Error Numbers"]
type: post
lang: en
---

# Fixing the Strict Standards Error in php.ini

## In this tutorial:

[What it is](#what) [Why it displays](#why) [How to fix it](#fix)

There are times when your site will give **PHP errors** after an upgrade or a site move that were not there before. One of the more common errors we see with Content Management Systems is the **strict standards** error. It normally appears at the top of the page and looks something like the following one from a Joomla site.

Strict Standards: Non-static method JLoader::import() should not be called statically in on line 34
This error in particular can seem confusing since it was not in your previous setup. Never fear, this is nothing terrible and easy to take care of.

## What is the strict standards error?

This is not an actual ‘error’ message but merely an informational message meant more for developers. It does not mean that code needs to be altered in your script.

## Why you are getting the strict standards message

The *E_STRICT* setting was not included in the *E_ALL* group setting until PHP version 5.4, so it had to explicitly be set to report the messages. In most cases, this was not part of a default setting, so it did not show up. As of 5.4, however, *E_ALL* included *E_STRICT* so it now displays unless specifically excluded. If you are coming from a server that has a PHP version lower than 5.4, this may be why the error is displaying on your site with our servers and did not display on the old server.

## How to remove the ‘Strict Standards’ message

1. [Log into your cPanel dashboard](https://www.inmotionhosting.com/support/edu/cpanel/how-to-log-into-cpanel/).
2. [![click file manager icon](/support/images/stories/php/strict-standards/file-manager.png)](/support/images/stories/php/strict-standards/file-manager.png) Find the *Files* section and click on the **File Manager** icon.
3. [![open the php.ini](/support/images/stories/php/strict-standards/2-open-php-ini.png)](/support/images/stories/php/strict-standards/2-open-php-ini.png) Once in the *File Manager*, navigate to the **php.ini** file and [open it for editing](https://www.inmotionhosting.com/support/edu/cpanel/cpanel-multiphp-ini-editor/). If you do not have a *php.ini* file, please [contact Live Support](https://www.inmotionhosting.com/support/amp/how-to-get-great-technical-support/) so they can place one in your account for you.
4. [![find the error reporting](/support/images/stories/php/strict-standards/3-error-reporting.png)](/support/images/stories/php/strict-standards/3-error-reporting.png) Inside the *php.ini* file, locate the section for error reporting and then locate your particular setting. It will be the one without the semicolon ‘;’ in front of it.
5. Add ** & ~E_STRICT** to the end of the active error reporting line. For example, if your current setting is: error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED You would change it to read: error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
6. Click on the **Save Changes** button in the upper right corner of the screen.

| Before | After |
| --- | --- |
| [![settings prior to change](/support/images/stories/php/strict-standards/3-error-reporting.png)](/support/images/stories/php/strict-standards/3-error-reporting.png) | [![](/support/images/stories/php/strict-standards/4-final.png)](/support/images/stories/php/strict-standards/4-final.png) |
