Strict standards : Non-static methods called statically

Need help installing Joomla! 1.5? For all Joomla! 1.5 installation issues please use this forum.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
alchimie
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Mar 02, 2008 3:00 pm

Strict standards : Non-static methods called statically

Postby alchimie » Sun Mar 02, 2008 4:26 pm

Hi guys,

This is my first try at Joomla, and I'm having an issue at the end of install process.

I have PHP/mySQL websites running just fine both online and on localhost powered by apache and configured by myself. Just to say that I'm not the absolute noob, although I'm self-taught, and sometimes misleaded. Thx for bringing me back on the trail when it's the case ;)
I'm merely setting up a test site on localhost to check out Joomla awesome features !! :o

Here are my sys specs :
Kubuntu FF
Server config : Apache/2.2.3 (Ubuntu) PHP/5.2.1
mySQL Client 5.0.38 (UTF-8)
Joomla package : 1.5.1-Stable-fr.zip from http://www.joomla.fr

No error at all on step 2
step 4 : The mySQL tables are created (I checked with phpMyAdmin)
Step 5 : I skip the FTP layer thing because it's unnecessary on localhost (as I read on last version of Installation Manual found on this forum)
Step 6 : if I click on the "install sample" button, I get the XML error, so I skip this part

Install seems to end up nicely, as I get the congratulation message. ;D
I delete the installation directory in my joomla site

I cheerfully click on the Admin button to start playing !! (I also tried with Home button)

That's where I get lots (I mean LOTS) of Strict standards warning / errors : ???
here's the first one :
Strict Standards: Non-static method JLoader::import() should not be called statically in /var/www/webdev/testjoomla/libraries/joomla/import.php on line 34

and this goes on for pretty much EVERY function call (well - I must admit I didn't compare with the source :P )

From my php.ini

Code: Select all

error_reporting  =  E_ALL & ~E_NOTICE | E_STRICT

Doesn't that mean my server shouldn't be reporting Strict standards related problems ?
And it's checked on step 2, isn't it ? So I figure this is not causing my problem.

On http://localhost/(mypath )/testjoomla, the template is loaded but I get the same errors.

I also get a session_start : headers already sent error, but this is because of the previous error messages.

I've re-installed a couple times already... same cause, same effect

I've read posts about file and directories permissions ; my whole joomla site dir, subdirs and files are owned by my usual user and usergroup with 755 perms. Should I change according to fableman (apache's group with 770 perms) ?
location : /var/www/(myownlittlepath)/testjoomla

Despite a perusal search, I haven't found any clue about my issue... Can someone tell me what I did wrong ?

Could it be related to the XML error, and if so, could it be a matter of (default) character encoding (UTF-8 vs iso-8859-n) ? like mySQL and PHP not understanding each other ?
I have a statement in /etc/apache2/conf.d/charset - however, it doesn't show with phpinfo() ???

Code: Select all

AddDefaultCharset UTF-8

And the Joomla mySQL tables are UTF-8 also

Thanks for your answers and advice.
Last edited by alchimie on Sun Mar 02, 2008 5:19 pm, edited 2 times in total.

igrimpe
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 234
Joined: Wed Feb 20, 2008 8:59 am

Re: Strict standards : Non-static methods called statically

Postby igrimpe » Sun Mar 02, 2008 5:00 pm

error_reporting = E_ALL & ~E_NOTICE | E_STRICT

No. It means: report everything except e_notice, also report e_strict (introduced in 5 therefore not in e_all)

In case you are common with binary operators, it's like:
5 AND (NOT 1) OR 8 -> 4 OR 8 -> 12
You assume (I guess): 5 AND NOT (1 OR 8 ) -> 4

BUT! error_reporting is also set from Joomla through error_reporting(value_from_configfile). If your config overrides this, you might want to change that behavior.

alchimie
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Mar 02, 2008 3:00 pm

Re: Strict standards : Non-static methods called statically

Postby alchimie » Sun Mar 02, 2008 5:09 pm

Thanks igrimpe

That means the
| E_STRICT

part is superfluous

The line
error_reporting = E_ALL & ~E_NOTICE

would report e_script, wouldn't it ?

alchimie
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Mar 02, 2008 3:00 pm

Re: Strict standards : Non-static methods called statically

Postby alchimie » Sun Mar 02, 2008 5:18 pm

Well I guess not !!

Because I changed php.ini accordingly
error_reporting = E_ALL & ~E_NOTICE


:laugh: No more Strict standards errors, but a beautiful login screen instead

Thx a lot, igrimpe.

By the way, :P I am not that common with binary operators, so I'm going to work on that !

igrimpe
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 234
Joined: Wed Feb 20, 2008 8:59 am

Strict standards : Non-static methods called statically

Postby igrimpe » Sun Mar 02, 2008 5:20 pm

E_SCRIPT ???

E_ALL = E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_RECOVERABLE_ERROR

Since E_STRICT is not in E_ALL, one has to OR it in.
If you don't want E_NOTICE you have to ANDNOT it out.

Simply set $error_reporting in configuration.php to 6135 if you want all errors except E_NOTICE and E_STRICT

alchimie
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Mar 02, 2008 3:00 pm

Re: Strict standards : Non-static methods called statically

Postby alchimie » Sun Mar 02, 2008 7:48 pm

Sorry for the dyslexy :P on E_SCRIPT : I meant E_STRICT of course

Now I got it all : I remember wondering about this error_reporting thing when I first setup Apache, but it was some time ago.
In fact, I added the " | E_STRICT" on purpose, to make sure I'm writing clean code.

So if I want to keep this setting in my php.ini, I must set $error_reporting in configuration.php

Currently, it is set to -1, which I guess leaves the server settings unchanged.

What value should I enter not to have E_STRICT reported ?
like with

Code: Select all

E_ALL & ~E_NOTICE


And also, are the messages
Static method xxx should not be called statically

normal ?

Thanx anyway, now I got to the Admin interface, it's beautiful and I have plenty of stuff to discover

redrings
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Sat Feb 16, 2008 6:53 pm

Re: Strict standards : Non-static methods called statically

Postby redrings » Wed Mar 05, 2008 5:02 pm

I'm getting these errors too - has anyone figured out how to fix them or what is causing them? I can't simply hide the errors.

Thanks!

igrimpe
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 234
Joined: Wed Feb 20, 2008 8:59 am

Re: Strict standards : Non-static methods called statically

Postby igrimpe » Wed Mar 05, 2008 5:27 pm

I can't simply hide the errors.

Why not?
E_STRICT is not an "error" but only a "NOTICE" (Like "Hey dude, would be nice if you would start writing nicer code")
see here:
E_STRICT (integer): Run-time notices. Enable to have PHP suggest changes to your code which will ensure the best interoperability and forward compatibility of your code.

So? Turn it off or rewrite the Joomla core and all extensions ...

shinbet
Joomla! Intern
Joomla! Intern
Posts: 57
Joined: Tue Dec 20, 2005 2:17 pm
Contact:

Re: Strict standards : Non-static methods called statically

Postby shinbet » Mon Mar 17, 2008 3:09 am

Hi
I think your thread is relevant to my problem , but i am not so technically tuned to the PHP.INI file,
Basically, several components in joomla are give me errors that being with
Strict Standards: Non static methods...

And i believe this thread addresses the problems

Can you tell me, if i have to just go to the php.ini file (i've never really played with that file) and make some lines come alive, by deleting the semi colon?

Thanks so much for any help
http://www.einfal.com/ Einfal Web Design, We think for you..
http://www.cheaper.com Everything you wanted, just cheaper!

shinbet
Joomla! Intern
Joomla! Intern
Posts: 57
Joined: Tue Dec 20, 2005 2:17 pm
Contact:

Re: Strict standards : Non-static methods called statically

Postby shinbet » Mon Mar 17, 2008 5:10 pm

oh,
I was looking for php.ini in my joomla folder, not the one in the php core,
Also, I think every line you want to make active you just delete the semi-colon
Finally, you must restart your webserver.

That clears it up
http://www.einfal.com/ Einfal Web Design, We think for you..
http://www.cheaper.com Everything you wanted, just cheaper!

Blackbeard
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Apr 07, 2008 8:41 am

Re: Strict standards : Non-static methods called statically

Postby Blackbeard » Mon Apr 07, 2008 8:50 am

Hi,
i have just installed and have zillions of error messages (mainly about strict standards).
i tried changing $error_reporting in the configuration file - but it didnt work. i still have many errors.

Turning off error reporting (in php.ini) on our server is NOT an option for us...

What can we do?
Please - if we cant fix this soon we wont be able to use this software :(

igrimpe
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 234
Joined: Wed Feb 20, 2008 8:59 am

Re: Strict standards : Non-static methods called statically

Postby igrimpe » Tue Apr 08, 2008 8:12 am

To what value did you change the error reporting?

Blackbeard
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Apr 07, 2008 8:41 am

Re: Strict standards : Non-static methods called statically

Postby Blackbeard » Tue Apr 08, 2008 8:23 am

i tried all ( i think ) possible values... 0,2,4,8,16,32,64... 6,10,12,18,20,24... 6143,6145...
And i read somewhere that E_STRICT is outside the scope of this setting.

In php.ini i think the value has to be set explicitly, ie: E_ALL | E_STRICT
Anyways, we cant turn it off on our inhouse testing server

i even tried adding ini_set() to the config file - but it was ignored.

igrimpe
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 234
Joined: Wed Feb 20, 2008 8:59 am

Re: Strict standards : Non-static methods called statically

Postby igrimpe » Tue Apr 08, 2008 2:52 pm

Anyways, we cant turn it off on our inhouse testing server

?
Is E_STRICT set in php.ini of the server or not? If it is set, and the admin also has forbidden to override this setting, then you probably can not do anything. Except for asking the admin to change the setting.

nik_c
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 180
Joined: Fri Apr 20, 2007 3:00 pm

Re: Strict standards : Non-static methods called statically

Postby nik_c » Sun Jun 22, 2008 8:44 pm

Hi,

This fixed my errors as well!

Fantastic, - I have been looking / wondering about this for a long time.

It took me a long item to figure this out as it occurred only with the Joomla eXplorer (now nijaXplorer).

What I had to do is switch display_errors off...

My respective 2 lines in my php.ini now look like this:

Code: Select all

error_reporting   =   E_ALL & ~E_NOTICE      ; Show all errors except for notices
display_errors   =   Off   ; Print out errors (as a part of the output)


Thanks,

Nik C

hoochblues
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Jul 01, 2008 4:06 pm

Re: Strict standards : Non-static methods called statically

Postby hoochblues » Tue Jul 29, 2008 12:58 pm

nik_c wrote:Hi,

Code: Select all

error_reporting   =   E_ALL & ~E_NOTICE      ; Show all errors except for notices
display_errors   =   Off   ; Print out errors (as a part of the output)



I am having this same issue using xdebug with a joomla! application. Drives me crazy.

I've already set error_reporting & display_errors as indicated above. Restarted Apache. No change. I still get the warnings on the static calls in xdebug.

configuration.php has error_reporting = "-1".

Is there some other setting I need to hit?

Thanks!

Walt

hoochblues
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Jul 01, 2008 4:06 pm

Re: Strict standards : Non-static methods called statically

Postby hoochblues » Tue Jul 29, 2008 2:12 pm

hoochblues wrote:
nik_c wrote:Hi,

Code: Select all

error_reporting   =   E_ALL & ~E_NOTICE      ; Show all errors except for notices
display_errors   =   Off   ; Print out errors (as a part of the output)



I am having this same issue using xdebug with a joomla! application. Drives me crazy.

I've already set error_reporting & display_errors as indicated above. Restarted Apache. No change. I still get the warnings on the static calls in xdebug.

configuration.php has error_reporting = "-1".

Is there some other setting I need to hit?

Thanks!

Walt


Resolved!!!

I use phpDesigner as my editor. And debug using that. It has it's own internal settings for capturing php error events. Strict was set.

Works like a charm now!

arobert
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Aug 06, 2009 8:58 am

Re: Strict standards : Non-static methods called statically

Postby arobert » Thu Aug 06, 2009 9:08 am

I Think most of people makes the same mistake I made.
Actually, in php.ini (provided with EasyPhp3 (at last)) 'error_reporting' and 'display_errors' appear twice in the file ... So be care to edit the last one, because default value for this variables are :

Code: Select all

error_reporting = E_ALL | E_STRICT
display_errors = On

despite what is written at the first begginig of this file.
So the Full answer to this problem is :
In Apache php.ini (For easyPhp in %EASYPHP_HOME%/conf_files/php.ini
1/ change

Code: Select all

error_reporting = E_ALL | E_STRICT
by

Code: Select all

error_reporting = E_ALL & ~E_STRICT

2/ change

Code: Select all

display_errors = On
by

Code: Select all

display_errors = Off

Warning : Be sure your error_reporting and display_errors variables are the last one to be read in the php.ini file, else yours could be overwritten by default values.
Furthermore, you can leave var $error_reporting = '-1'; unchanged in joomla configuration.php

ckpepper02
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Aug 07, 2009 6:20 pm

Re: Strict standards : Non-static methods called statically

Postby ckpepper02 » Fri Aug 07, 2009 6:28 pm

I am getting this error after moving Joomla from the testing server to my client's live server. I do not have access to the php.ini file. Is there another way around this???

arobert
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Aug 06, 2009 8:58 am

Re: Strict standards : Non-static methods called statically

Postby arobert » Fri Aug 07, 2009 7:46 pm

I don't know, best would be to ask an Joomla developer if it is possible to override display_errors variable writing display_errors=Off in configuration.php

BTW did you try that ?

ckpepper02
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Aug 07, 2009 6:20 pm

Re: Strict standards : Non-static methods called statically

Postby ckpepper02 » Fri Aug 07, 2009 8:23 pm

arobert wrote:I don't know, best would be to ask an Joomla developer if it is possible to override display_errors variable writing display_errors=Off in configuration.php

BTW did you try that ?


Yeah I tried that, it didn't work for me.

mdias
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Jan 20, 2010 9:25 am

Re: Strict standards : Non-static methods called statically

Postby mdias » Wed Jan 20, 2010 9:27 am

Put this right after "define( '_JEXEC', 1 );" on index.php:

Code: Select all

error_reporting( E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING );


You may need to do that on your administrator folder too.

Inprogress
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Fri Feb 12, 2010 9:05 pm

Re: Strict standards : Non-static methods called statically

Postby Inprogress » Mon Feb 15, 2010 8:12 am

Ok, I am sorry. I have the same problem as the first poster. Now, how do I edit my php.ini and where do I edit it?

I use Ubuntu 9.04. Do I need to install something or can I do it in the terminal? If I can do it via terminal, please explain steps if you will?

Inprogress
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Fri Feb 12, 2010 9:05 pm

Re: Strict standards : Non-static methods called statically

Postby Inprogress » Mon Feb 15, 2010 9:46 am

Ok, so I changed the error-reporting and display_errors but now I all I see is one link on the home pages, stating Home. Nothing else. There is just ZIP on the localhost/joomla page. No Admin buttons, not buttons mind you.

This is what I see.
You do not have the required permissions to view the files attached to this post.

sri-hari
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Mar 12, 2010 7:02 am

Re: Strict standards : Non-static methods called statically

Postby sri-hari » Fri Mar 12, 2010 7:05 am

you can add one htaccess file with the following line that ll hide the error notices

Code: Select all

php_flag display_errors Off


:)

User avatar
humvee
Joomla! Master
Joomla! Master
Posts: 14713
Joined: Wed Aug 17, 2005 10:27 pm
Location: Kent, England

Re: Strict standards : Non-static methods called statically

Postby humvee » Sat Mar 13, 2010 9:27 am

Inprogress wrote:Ok, so I changed the error-reporting and display_errors but now I all I see is one link on the home pages, stating Home. Nothing else. There is just ZIP on the localhost/joomla page. No Admin buttons, not buttons mind you.

This is what I see.

The reason for this is that you did not install the sample_data at Step 6 of the installation. In essence you have a "virgin" Joomla! installation and you must create all the menus and content from scratch.

If you are new to Joomla! I would suggest that you either reinstall Joomla! making sure you follow the Installation Manual for Browser Installation or you could import the sample_data into your database using PHPMyAdmin (but this does require a bit of understanding), or you could follow one of the the Installation Guides at http://docs.joomla.org/beginners which will walk you through creating a site from scratch.

User avatar
bettsaj
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Fri Feb 13, 2009 10:17 am

Re: Strict standards : Non-static methods called statically

Postby bettsaj » Mon Jul 05, 2010 8:23 am

I too have this error.

I've installed Easy PHP as a base and for ease of installation, and installed the newest version of Joomla. I've gone through the entire installation with no issues, untill the end. I'm now getting the infamous:

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\Program Files\EasyPHP-5.3.2i\www\libraries\loader.php on line 186


this is obviously a setting in the php.ini file. i'm using the latest version of PHP and have discovered that there's infact 2 php.ini files. One is called php.ini-development and the other is called php.ini-production

Now, they both have the same code from the look of it so I assume I'll have to change the code in BOTH ini files??

The error reporting code I've found in both files is as follows, can anyone please tell me what I should change it to to stop this issue that I'm getting.

Code: Select all

; error_reporting
;   Default Value: E_ALL & ~E_NOTICE
;   Development Value: E_ALL | E_STRICT
;   Production Value: E_ALL & ~E_DEPRECATED


there is also a php.ini file in the easyphp conf_files directory.

User avatar
bettsaj
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Fri Feb 13, 2009 10:17 am

Re: Strict standards : Non-static methods called statically

Postby bettsaj » Mon Jul 05, 2010 10:39 am

Sorted :D

User avatar
mlatelcom
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Jul 28, 2008 8:40 pm
Contact:

Re: Strict standards : Non-static methods called statically

Postby mlatelcom » Sun Aug 01, 2010 6:22 pm

Sorted :D

What did you do? I've tried all the codes posted in this forum without any success. I have the same php.ini code

; error_reporting
; Default Value: E_ALL & ~E_NOTICE
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED

judy2segev
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Sep 16, 2010 12:15 pm

Re: Strict standards : Non-static methods called statically

Postby judy2segev » Thu Sep 16, 2010 12:38 pm

Once I was trying to remove these following errors after installing Joomla-
Strict Standards: Non-static method JLoader::import() should not be called statically in /opt/lampp/htdocs/joomla/libraries/joomla/import.php on line 29

Strict Standards: Non-static method JLoader::register() should not be called statically in /opt/lampp/htdocs/joomla/libraries/loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in /opt/lampp/htdocs/joomla/libraries/joomla/import.php on line 32

Strict Standards: Non-static method JLoader::register() should not be called statically in /opt/lampp/htdocs/joomla/libraries/loader.php on line 71

Strict Standards: Non-static method JLoader::load() should not be called statically in /opt/lampp/htdocs/joomla/libraries/loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in /opt/lampp/htdocs/joomla/libraries/loader.php on line 138

Strict Standards: Non-static method JRequest::clean() should not be called statically in /opt/lampp/htdocs/joomla/libraries/joomla/import.php on line 33


I was able to repair it by changing the following value in configuration.php file which is present in Joomla home folder.

* EARLIER VALUE : var $error_reporting = ‘-1′;
* CHANGED VALUE: var $error_reporting = ’6135′;


May be this can help somebody facing related problem.


Return to “Installation 1.5”

Who is online

Users browsing this forum: No registered users and 6 guests