Confusing Error Message Related To New Installation

I am installing my existing Yii developed application on a new development PC and am running into an issue (which I don’t have on my existing development PC).

When trying to login to my application I get the following error:

This code works on other development PC, so there must be something else causing it. Anyway, this is how the code looks like:

SecurityController is a component class which extends CController, and the getSecurityKey() only returns a string.

Any ideas what could be causing this?

You have to declare the SecurityController method getSecurityKey() as static.

public static function getSecurityKey() {

Thank you Joblo, indeed declaring it static solved that particular problem.

After I managed to login, I noticed that this message appears in a couple of more places, which would require me to review the entire code to ensure they are statically declared.

However, the confusing part is why it works on the other development PC without being declared static?

I had error reporting E_ALL switched on which was showing these messages. However, when turning it off I don’t see them anymore and it is working as it should. But it’s strange since I should be able to have the error reporting on and still be able to use the application?

The only other difference is that I’m using PHP 5.4 on the new PC while only using PHP 5.3 on the old.

Any ideas about this?

You can remove E_STRICT from error reporting.

But you should better correct your code and turn E_STRICT on at your development machine.

It’s an error to use none static declared methods as static.

You should try to avoid problems in the future, on different servers, on different configurations…

Your application should not work only when supressing errors …

E_STRICT shows more errors like ‘undefined array index’ …