Strict standards : Non-static methods called statically

Joomla version 1.5 is end-of-life and are no longer supported. Please use Joomla 3.x instead.

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.
houldsworth1
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Wed Sep 22, 2010 3:58 am

Re: Strict standards : Non-static methods called statically

Post by houldsworth1 » Wed Sep 22, 2010 4:07 am

I'm sorry - but it just isn't working for me. Total noob here, but I can at least follow directions!

I changed /opt/lampp/etc/php.ini and set error_reporting to E_ALL & ~E_NOTICE
I also changed display_errors = Off

I go to the web page again and...

pages of errors like :

Code: Select all

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

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

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

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

Strict Standards: Non-static method JLoader::load() should not be called statically in /opt/lampp/htdocs/libraries/loader.php on line 161
Someone please tell me what I am doing wrong?

This was installed under XAMPP, on Ubunto 10.04.1

Thanks.

houldsworth1
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Wed Sep 22, 2010 3:58 am

Re: Strict standards : Non-static methods called statically

Post by houldsworth1 » Thu Sep 23, 2010 1:31 am

Forget it. If only someone had mentioned that I needed to restart lampp... :-[

sitelerinsitesi
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Oct 02, 2010 12:16 pm
Contact:

Re: Strict standards : Non-static methods called statically

Post by sitelerinsitesi » Sat Oct 02, 2010 5:02 pm

Ok, I am sorry. I have the same problem as the first poster.

houldsworth1
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Wed Sep 22, 2010 3:58 am

Re: Strict standards : Non-static methods called statically

Post by houldsworth1 » Sat Oct 02, 2010 5:14 pm

sitelerinsitesi wrote:Ok, I am sorry. I have the same problem as the first poster.
Don't be sorry - that's what forums are for.

Have you tried modifying your php.ini file?

Mine was as follows (using lampp)

Code: Select all

Change /opt/lampp/etc/php.ini 
set error_reporting to E_ALL & ~E_NOTICE
display_errors = Off
Then (very important because I missed this at first) you need to stop and start the lampp server (if you are not using lampp then bounce whichever webserver you are using).

I hope that helps.

yashmistrey
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Fri Oct 22, 2010 5:02 pm

Re: Strict standards : Non-static methods called statically

Post by yashmistrey » Mon Jan 03, 2011 6:18 am

i am having trouble on login i think it same error

http://sandesh.shreshthbharat.in/a/administrator/

also here http://sandesh.shreshthbharat.in/a/ in index page

houldsworth1
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Wed Sep 22, 2010 3:58 am

Re: Strict standards : Non-static methods called statically

Post by houldsworth1 » Mon Jan 03, 2011 12:23 pm

Yours doesn't seem to be the same issue as this one - but my guess is that you don't have the level of access needed - can you make sure that you have read/write access to the files and directories specified.

yashmistrey
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Fri Oct 22, 2010 5:02 pm

Re: Strict standards : Non-static methods called statically

Post by yashmistrey » Mon Jan 03, 2011 3:42 pm

can you define, i am not very smart in joomla or php. please if you can solve this

houldsworth1
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Wed Sep 22, 2010 3:58 am

Re: Strict standards : Non-static methods called statically

Post by houldsworth1 » Mon Jan 03, 2011 3:52 pm

I'm no expert here either. But anyway, look at the messages you have. Things like : PHP Notice: "Trying to get property of non-object in E:\HostingSpaces\shreshth\sandesh.shreshthbharat.in\wwwroot\a\templates\gk_twn\html\com_content\frontpage\default_item.php on line 98"
and
"PHP Warning: imagejpeg() [<a href='function.imagejpeg'>function.imagejpeg</a>]: Unable to open 'E:\HostingSpaces\shreshth\sandesh.shreshthbharat.in\wwwroot\a\modules\mod_gk_news\cache\stories.demo.finance.bis5.jpg' for writing: Permission denied in E:\HostingSpaces\shreshth\sandesh.shreshthbharat.in\wwwroot\a\modules\mod_gk_news\helpers\image.helper.php on line 223"

Looking at that it seems to be that the web server doesn't have access to "E:", wherever that is mapped. You should log into your web server, find out where E: maps to and see if you have permission to access that. If you don't know how to do that then perhaps setting up Joomla is something you could get another person to help you with. If it a hosted server then perhaps your hosting company can help you with that.

yashmistrey
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Fri Oct 22, 2010 5:02 pm

Re: Strict standards : Non-static methods called statically

Post by yashmistrey » Tue Jan 04, 2011 5:07 am

hi,
my hosting provider say
"We have assigned required permissions on your website"

User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6029
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

Re: Strict standards : Non-static methods called statically

Post by dpacadmin » Tue Jan 04, 2011 5:17 am

I see a lot of template problems, try switching to one of the default templates and see if that makes a difference.

yashmistrey
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Fri Oct 22, 2010 5:02 pm

Re: Strict standards : Non-static methods called statically

Post by yashmistrey » Tue Jan 04, 2011 5:43 am

but i cant redirect after login

User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6029
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

Re: Strict standards : Non-static methods called statically

Post by dpacadmin » Tue Jan 04, 2011 6:30 am

You site seems to be working now
http://sandesh.shreshthbharat.in/a/

yashmistrey
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Fri Oct 22, 2010 5:02 pm

Re: Strict standards : Non-static methods called statically

Post by yashmistrey » Tue Jan 04, 2011 8:17 am

yeah , i disable error reporting in admin panel, should i do that ?

User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6029
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

Re: Strict standards : Non-static methods called statically

Post by dpacadmin » Tue Jan 04, 2011 9:21 pm

Error reporting is only used to find problems in your site, if it is not working correctly, and should not be left on. Same goes for Debug, only for finding problems and not meant to be left on.

SPolischook
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Jul 22, 2010 5:36 pm

Re: Strict standards : Non-static methods called statically

Post by SPolischook » Sun Jan 23, 2011 5:55 pm

Для русскоязычных добавил описание решения здесь -
For the Russian added description of the solution here -
http://kotoblog.pp.ua/ubuntu/xamppxdebu ... l#comments

huuloi
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Feb 16, 2011 3:24 pm

Re: Strict standards : Non-static methods called statically

Post by huuloi » Wed Feb 16, 2011 3:32 pm

You can paste this code index.php for frontend and backend. It works for me!
// Set flag that this is a parent file
define( '_JEXEC', 1 );
error_reporting( E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING );

exentric
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Fri May 01, 2009 4:12 pm

Re: Strict standards : Non-static methods called statically

Post by exentric » Tue Feb 22, 2011 1:51 pm

nevermind. misunderstood the earlier code :-[

cogito
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sat Feb 26, 2011 5:27 am

Re: Strict standards : Non-static methods called statically

Post by cogito » Sun Feb 27, 2011 7:45 pm

Hello everybody.
Please Im having exactly the same problem as the first poster, but Im using xampp1.7.4 on window XP.
Please what do I need to change? I tried using that value of 6135 in 'configuration.php' but it only worked half-way! I want all the error lines to go and a clean log-in page.
Thanks

User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6029
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

Re: Strict standards : Non-static methods called statically

Post by dpacadmin » Mon Feb 28, 2011 11:53 am

Switch to Xampp 1.7.1.

cogito
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sat Feb 26, 2011 5:27 am

Re: Strict standards : Non-static methods called statically

Post by cogito » Mon Feb 28, 2011 2:25 pm

dpacadmin, u had helped me solved the prblem on the other thread! I changed things in 'php.ini' and everything is fine now, I have the admin page. Thanks

hkfletch
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat May 07, 2011 10:46 pm

Re: Strict standards : Non-static methods called statically

Post by hkfletch » Sun May 08, 2011 12:17 am

My first post from as a new Joomla! user trying to install Joomla_1.5.23-Stable-Full_Package after being succesful with 1.6 installation. But I wanted to try Virtuemart which it said won't work on 1.6 so I needed 1.5. I'm using XAMPP 1.7.4 .

1.6 worked fine and I have installed 1.5 before with no problems (Though I was never able to get a web site together. I figure as a newbie just trying to learn IT stuff, it'll take me several runs to get it.) but now I get this ...

"Strict Standards: Non-static method JLoader::import() should not be called statically"
over and over, which so many are complaining about here.

And I did several reinstalls also but still had the problem.

So I find the php.ini-development and php.ini-production files in c:/xampp/php/

and find php.ini files and make the changes...

error_reporting = E_ALL & ~E_NOTICE ; Show all errors except for notices
display_errors = Off ; Print out errors (as a part of the output)
... and I stop and restart apache each time I try something.

Most of the posts say that's all they have to do to make it work, and it makes sense but it does not work for me.

I have read there is a third php.ini file and looked in apache.
Someone said it is in xampp\apache\bin\php.ini which I can't find.

I even tried commenting or remming out out the
;error_reporting = ...
and
;display_errors = OFF
... settings as I read somewhere.

I tried ...
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
... to try to eleiminate all possibilities.

All I can think is there must be another php.ini which I could not find. I even used Windows search.

Is there anything wrong with putting the -development and -production as in php.ini-development and php.ini-production file names? That's how they came so I don't think so.

I've been working on it all day and for several days. What else can I be missing that hasn't been mentioned in all the blog forums I've read through? A third php.ini file?

If there is something else out there I'd appreciate hearing about it. Thanks!
hkfletch Joomla! Newbie

User avatar
aaronrakib
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Apr 28, 2011 5:35 pm

Re: Strict standards : Non-static methods called statically

Post by aaronrakib » Tue May 10, 2011 9:30 am

i faced similar problem and found solution.
check it: http://forum.joomla.org/viewtopic.php?f ... 9#p2497189

User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6029
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

Re: Strict standards : Non-static methods called statically

Post by dpacadmin » Tue May 10, 2011 1:42 pm

If that doesn't help try hitting F5 while on the site in your browser, or delete your browser's Temp Internet files and any cookies from your site.

User avatar
Kev261266
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 177
Joined: Thu May 20, 2010 7:33 am
Location: South Shields, UK

Re: Strict standards : Non-static methods called statically

Post by Kev261266 » Tue May 10, 2011 4:19 pm

Hi, thought I'd add my bit as confusion seems to be taking over in this thread.

I'm running:
XP pro
joomla 1.6.3
XAMPP 1.7.4 (had been running 1.7.3 with no problems)

After a recent XP fresh install I decided to try the new XAMPP 1.7.4, and also got tons of errors relating to strict standards. I had never got these errors using 1.7.3. Rather than go back to 1.7.3 I thought I would try to fix the reporting problem, using the information found throughout this thread. The fixes DO WORK, but how to apply the fixes is all over the place.

Firstly, this has nothing to do with Joomlart T3 Framework, I have used this on all my builds and still do. Mostly for the megamenu options. Uninstalling T3 will not solve the problem! so just leave it installed if you use it.

To remove strict standards errors in backend do the following (note D is where I installed XAMPP, obviously you need to change where necessary)

goto:

D\XAMPP\PHP\php.ini
In my install this was on line 109

change
error_reporting = E_ALL | E_STRICT
to
error_reporting = E_ALL & ~E_NOTICE

Next go to

D\XAMPP\HTDOCS\"yourjoomlainstallname"\configuration.php
(line 20 in my installation)

Change the $error_reporting value to 6135

If you have not already turned XAMPP off then turn it off (fully off) turn it back on and the error notices will no longer appear.

*You do not have to change error reporting in the backend global settings as you did this above.
**You can still check errors in Eclipse, Dreamweaver etc. as they have their own error detection services.
***The strict standards you see are kind of like seeing non compliance of ISO standards (or in this case W3C standards) in as much as they do not mean that your site is not working properly, just that some code has been written in a non standard way or a way that differs to assigned protocol. If you worried about every error notice you got, you would never get a site built.

Hope this is of use.
Cheers.

Kev.
----

User avatar
aaronrakib
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Apr 28, 2011 5:35 pm

Re: Strict standards : Non-static methods called statically

Post by aaronrakib » Tue May 10, 2011 8:27 pm

thanks for such inspiring speeches that would be greatly helpful for newbies like me.

I NOTICED ANOTHER ERRORS:

i have been using XAMPP 1.7.4 and working with Joomla 1.6.3, OS Win 7 64bit; but while i try to setup Joomla 1.5x at /htdocs/joom15/, i found millions of errors at both end.

i dont even know whether its not possible to use/install joomla in 2 or more different folders at a time!! cant i develop several joomla sites at the same time in different folders at my HTDOCS?

thanks//

User avatar
Kev261266
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 177
Joined: Thu May 20, 2010 7:33 am
Location: South Shields, UK

Re: Strict standards : Non-static methods called statically

Post by Kev261266 » Wed May 11, 2011 1:43 am

Hi aaronrakib,

To answer part of your question. Yes, you can develop several joomla sites at the same time in different folders. In your case you would have

htdocs/joom15A
htdocs/joom15B
And so on..

Not sure how you are doing your installs but the way I do it is set up the folders first and then extract the joomla files from the zip into each separate folder. You will then have a fresh joomla install in each folder and can go through the setup etc. for each one.

I don't have Win7 so can't comment on the errors, if it causes too much of a problem I would just change back to the earlier version of XAMMP. Remember XAMMP is not adding any benefit or value to your site, it is simply a ways to run a localhost. So running the earlier version is not making you lose out on any new features.
Cheers.

Kev.
----

User avatar
aaronrakib
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Apr 28, 2011 5:35 pm

Re: Strict standards : Non-static methods called statically

Post by aaronrakib » Wed May 11, 2011 3:42 am

Kev261266 wrote:Hi aaronrakib,

To answer part of your question. Yes, you can develop several joomla sites at the same time in different folders. In your case you would have

htdocs/joom15A
htdocs/joom15B
And so on..

Not sure how you are doing your installs but the way I do it is set up the folders first and then extract the joomla files from the zip into each separate folder. You will then have a fresh joomla install in each folder and can go through the setup etc. for each one.

I don't have Win7 so can't comment on the errors, if it causes too much of a problem I would just change back to the earlier version of XAMMP. Remember XAMMP is not adding any benefit or value to your site, it is simply a ways to run a localhost. So running the earlier version is not making you lose out on any new features.
sir, thank you very much for your time & such cordial suggestions. yes i also did same process to install joomla each time, but i faced it while i tried to setup joomla 1.5x while i have joomla 1.6 present.
by the way, do you think earlier version of XAMPP might help me to get rid of it? then will also try that.

as i am a newbie, i do have thousands of questions, but i little bit worried wishing not to both all, specially you a lot.

anyways, thank you again.

User avatar
Kev261266
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 177
Joined: Thu May 20, 2010 7:33 am
Location: South Shields, UK

Re: Strict standards : Non-static methods called statically

Post by Kev261266 » Wed May 11, 2011 8:38 am

Hya aaronrakib,

It does seem that XAMMP 1.7.4 is unstable with joomla (at present). I would feel the same as you, that I want the newest installation. But, if it is causing too many problems and wasting too much time, it's better to go back to 1.7.3. As I said earlier this is only affecting your testing server (localhost) the problems will not exist once you go live (I am assuming you will be using different hosting for your live site).

The only thing I would suggest that you do first is post a new thread and ask the same question but specific to Win7. Someone else who uses the same setup as you will have had the same problems, and hopefully will be able to give you a workaround.

Don't be worried about posting lots of questions in the forums, Thats what they are for, and with joomla (as with most open source software) it's the best way to learn.

Joomla is superb software, but is sometimes not the easiest to work with or understand, keep at it though and you will be really happy with what it's capable of.

Kev.
Cheers.

Kev.
----

wdemilly
Joomla! Intern
Joomla! Intern
Posts: 58
Joined: Sun Dec 28, 2008 12:18 am

Re: Strict standards : Non-static methods called statically

Post by wdemilly » Mon May 23, 2011 1:25 am

Hi, after three days of trying to simply point my localhost to my local pc, I finally am at the point where others are on this thread:

using xampp 1.74 , and getting tons of "strict standards" errors.

Is it possible that an expert in this forum could condense the combined knowledge about the required settings to fix this problems into one post?

As far as 1.74 goes, I can say that I've had problems with WAMP and a lesser-known package (I think the name is "universal host" which uses WAMP)

So I'm not sure that XAMPP is the prob.

thanks for any advice

DevByStarlight
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Fri Nov 12, 2010 3:25 am

Re: Strict standards : Non-static methods called statically

Post by DevByStarlight » Mon May 23, 2011 2:56 am

As mentioned, this is a result of php.ini settings.

Technically, it's due to the code violating STRICT standards as identified in the errors.

However, to hide the errors from appearing on your development web pages, you have a few options.
  • Disable the PHP messages - or at least reduce what's reported
  • Hack the code and temporarily disable warnings around the offending lines code
For Choice #2, I posted the "temp hack" solution separately since the original reply post became *huge* ... well, both still are huge but now it's two less huge chunks ... temp hack post coming up next!

~~~~

For choice #1 ... php.ini

All of the following assume you have access to the php.ini and can restart the web server after making changes.

In the php.ini file ... this should be located in your php.ini installation directory (./php/php.ini)

Locate the line which defines the "error_reporting" flags which will look something like:

Code: Select all

error_reporting = E_ALL | E_STRICT
To hide the "Strict Standards" error messages, remove the "| E_STRICT" portion. For example:

Code: Select all

error_reporting = E_ALL
However, "E_ALL" includes the E_NOTICE flag (the "Notice: Trying to get property of non-object..." messages). So you can bitwise that flag out using:

Code: Select all

error_reporting = E_ALL | ~E_NOTICE
Or, alternatively, you can explicitly set the flags you want such as the major errors:

Code: Select all

error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
Remember, you are hiding the error (and notice) warnings. In other words, errors in any php code you write will also be hidden. Therefore, I highly recommend keeping the E_STRICT (and E_NOTICE) flags enabled in development. Otherwise, unsafe coding will happen (accidentally of course).

The "good" news is ... your live web host server probably has all flags disabled except for ERROR messages Or, possibly, redirected to a log file or a devnull - so they probably won't appear. Probably. Maybe.

In my case I ran into it on J1.6 when I installed Jumi ...

The real solution is to fix the errant code in ./jumirouter/jumirouter.php and ./jumi/jumi.php.

However, I'm reluctant to hack the jumi codebase since I''m sure a proper fix is on the way in the next release.

[I'm cross-linking the post from [email protected] (http://edo.webmaster.am/forum/post2145.html#p2145) to this thread]
Last edited by DevByStarlight on Mon May 23, 2011 3:13 am, edited 3 times in total.


Locked

Return to “Installation 1.5”