Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1] 2   Go Down

Author Topic: Bunch of Inspekt errors/warnings  (Read 25289 times)

0 Members and 1 Guest are viewing this topic.

Rookie

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Bunch of Inspekt errors/warnings
« on: January 10, 2011, 06:00:41 am »

Fresh install, latest version and I see a bunch of errors such as:

Strict Standards: Non-static method Inspekt::makeSuperCage() should not be called statically in ...\include\init.inc.php on line 50

It is quite annoying and I do not want to change warning setups.  Any idea... running latest PHP.

Thanks.

Rookie.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Bunch of Inspekt errors/warnings
« Reply #1 on: January 18, 2011, 10:48:52 am »

Try to replace
Code: [Select]
$superCage = Inspekt::makeSuperCage($strict);with
Code: [Select]
$inspekt = new Inspekt();
$superCage = $inspekt->makeSuperCage($strict);
in include/init.inc.php.


Moving to misc board.
Logged

marcou007

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Bunch of Inspekt errors/warnings
« Reply #2 on: January 27, 2011, 03:40:58 am »

Hi Rookie,

did you try the solution proposed by André?

Did it work?

I am getting the same problem. I have install easyphp 5.3.5.0 and then unzip coppermine cpg1.5.12 to the "www" folder. Then, when I run coppermine from then "Local Web", I get the same error,

Strict standards: Non-static method Inspekt::makeSuperCage() should not be called statically

first says @ init.inc.php on line 50,
then says @ install.php on line 94,

Any clue what this could be?

thx,
Marc
Logged

marcou007

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Bunch of Inspekt errors/warnings
« Reply #3 on: January 27, 2011, 03:50:49 am »

here are screenshots of the errors I mention bellow
Logged

marcou007

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Bunch of Inspekt errors/warnings
« Reply #4 on: January 27, 2011, 04:17:59 am »

André, I have made your code change to file init.inc.php...

I think it worked since I got over the first error, however, it create an other error, same non-static, except this time in says at file inspekt.php @ line 284. then the second error appears (install.php) then the screen freeze and goes blue, then nothing?

any more instruction, ideas?

attached is screenshot
thx,
Marc
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Bunch of Inspekt errors/warnings
« Reply #5 on: January 27, 2011, 09:28:52 am »

Either you change all lines that generates errors as already suggested, or you google how you can disable strict error messages.
Logged

marcou007

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Bunch of Inspekt errors/warnings
« Reply #6 on: January 27, 2011, 02:31:25 pm »

Hi André,

I cannot change all lines that generate errors, I am newbie and do not understand what this code is for or what to replace it with... I am hopping there is a simpler solution.  But, is this a bug from coppermine cpg1.5.12 code or from my PC or some wrong settings? I believe users should have to alter the code of a program to have it work? So I assum some wrong settings on PC, no? I prefer change settings that alter the code of coppermine...If I must change some code, please guide me what changes to bring to the code.

I am running Coppermine locally on my PC with easyphp 5.3.5.0 under Windows XP, I am not running from remote server. I did not upload via ftp site, but copied to "www" folder of easyphp. Perhaps some parameter or some settings are wrong?

About the errors messages,
I googled how to disable strict error messages;
http://www.windowsnetworking.com/articles_tutorials/Disable-Error-Reporting-Windows-XP-Server-2003.html

If I do as instructed above, will coppermine then completely install properly, because it seamed to bug with these errors?
I mean if these errors are critical, not showing the errors will not solve them, I believe?

I will try tonight and let you know if it disabling the erros message solved the problem,
thx,
Marc
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Bunch of Inspekt errors/warnings
« Reply #7 on: January 27, 2011, 02:53:50 pm »

Have a look at your php.ini file. There you'll find an entry
Code: [Select]
error_reporting  = 
According to the PHP documentation
Version    Description
5.0.0    E_STRICT introduced (not part of E_ALL).
it should work if you use the following setting in your php.ini file:
Quote
error_reporting  =  E_ALL & ~E_NOTICE
(that's how it's set in my testbed).
Logged

marcou007

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Bunch of Inspekt errors/warnings
« Reply #8 on: January 27, 2011, 03:46:44 pm »

André,

ok, I will try your suggestion and let you know if it works ok.

By muting error messaging, if it resolves the problem, will it affect the Coppermine functionality?

Marc
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Bunch of Inspekt errors/warnings
« Reply #9 on: January 27, 2011, 04:03:26 pm »

I don't think so, but I haven't tested it. You'll see it very fast, as we use the Inspekt library all over the Coppermine code. If you can create categories, albums and upload images, everything is fine.
Logged

marcou007

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Bunch of Inspekt errors/warnings
« Reply #10 on: January 28, 2011, 03:23:33 am »

André,

As you suggested, I have changed the php.ini files, I found a php.ini file in folder apache and a other php.ini file in folder conf_files . Both files had this code:

error_reporting = E_ALL | E_STRICT

I replaced it with this code:

error_reporting  =  E_ALL & ~E_NOTICE

And not on did the error disapear, but Coppermine finally installed completly! I do not know if it is fully functional yet, but so far, all looks good!! :-)

Thank you so much for you help, I am glade I finally got coppermine on my server! Now I will try it out for the first time.

Marc
ps: you can change the staus of this Topic as SOLVED
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Bunch of Inspekt errors/warnings
« Reply #11 on: January 28, 2011, 09:23:43 am »

Resolve your threads
you can tag your answer as "solved" by clicking on the little image in your initial posting on your thread.
Logged

Alungatu

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Bunch of Inspekt errors/warnings
« Reply #12 on: June 08, 2013, 01:03:41 pm »

Sorry for reopen this topic, but I get same errors too.

Quote
Strict Standards: Non-static method Inspekt_Supercage::Factory() should not be called statically, assuming $this from incompatible context in /home/soferii/public_html/foto/include/inspekt.php on line 282

Strict Standards: Non-static method Inspekt::makeGetCage() should not be called statically, assuming $this from incompatible context in /home/soferii/public_html/foto/include/inspekt/supercage.php on line 124

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /home/soferii/public_html/foto/include/inspekt.php on line 147

Strict Standards: Non-static method Inspekt::makePostCage() should not be called statically, assuming $this from incompatible context in /home/soferii/public_html/foto/include/inspekt/supercage.php on line 125

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /home/soferii/public_html/foto/include/inspekt.php on line 170

Strict Standards: Non-static method Inspekt::makeCookieCage() should not be called statically, assuming $this from incompatible context in /home/soferii/public_html/foto/include/inspekt/supercage.php on line 126

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /home/soferii/public_html/foto/include/inspekt.php on line 192

Strict Standards: Non-static method Inspekt::makeEnvCage() should not be called statically, assuming $this from incompatible context in /home/soferii/public_html/foto/include/inspekt/supercage.php on line 127

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /home/soferii/public_html/foto/include/inspekt.php on line 215

Strict Standards: Non-static method Inspekt::makeFilesCage() should not be called statically, assuming $this from incompatible context in /home/soferii/public_html/foto/include/inspekt/supercage.php on line 128

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /home/soferii/public_html/foto/include/inspekt.php on line 238

Strict Standards: Non-static method Inspekt::makeServerCage() should not be called statically, assuming $this from incompatible context in /home/soferii/public_html/foto/include/inspekt/supercage.php on line 134

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /home/soferii/public_html/foto/include/inspekt.php on line 124

I verified php.ini configuration from WebHost Manager, and error_reporting is E_ALL & ~E_NOTICE & ~E_DEPRECATED. Still not working... what to do?

PS: Sorry for my english..
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Logged

Alungatu

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Bunch of Inspekt errors/warnings
« Reply #14 on: June 08, 2013, 09:20:01 pm »

Thanks! Worked.
Logged

cobraspaz

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Bunch of Inspekt errors/warnings
« Reply #15 on: August 07, 2013, 09:03:58 pm »

Terrible response from the Devs by the way. When the code has errors, telling someone to turn off the error messages is NOT a fix.

When someone responds that they can't modify php.ini because they are on a shared web host, telling them to get a new web host is NOT a fix.

Rewritting the code to follow the "Strict Standards" that would work. Or even explaining how to interpret the error messages so the end user can fix it, that works as well.  So in the case someone else has this same error, I will explain an easy way to fix it and have your gallery working again.

On each line it says something like:
Code: [Select]
Non-static method Inspekt::makeSuperCage() should not be called statically in ...
Don't worry about the line after in, because it IS in fact a static method but PHP doesn't think it is. Therefore you have to find the function itself and declare it as a function.

The part of the line that says Inspekt::makeSuperCage() this is calling the function makeSuperCage() in the class Inspekt. The word before the :: is referring to the class and the word after the :: is the function within that class. So how do we fix it?

First we locate the class Inspekt which happens to be conveniently located in the file Inspekt.php.
Next we locate the following line:
Code: [Select]
function makeSuperCage()
and add public static before it like so:
Code: [Select]
public static function makeSuperCage()
Do this for every item that you have an error for. Then everything will work. I fixed my copper-mine gallery this way after I saw that the response from the Devs was useless.

The only downside to this is that the next time you upgrade you will have to re-fix your code because it seems obvious the devs don't care and they aren't planning on fixing it. They just want you to turn off Strict Standards or pick a different web host.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Bunch of Inspekt errors/warnings
« Reply #16 on: August 07, 2013, 09:54:48 pm »

Excuse me but we do care. These are "WARNINGS", not "ERRORS" as has been stated many times above. They are for developers information and should not be displayed on a live website. I cannot think of a decent host where you cannot turn off those WARNINGS either via php.ini, .htaccess or even via the cPanel in some cases.

It IS being addressed and code IS being worked on. Please remember that we are a very small team doing this for FREE in our spare time. You are enjoying the fruits of that FREE package and our valuable time spent giving you it. So please do not come on telling us we do not care, we certainly do or we would not have given up thousands of hours developing and supporting Coppermine.

I would like however to thank you for your detailed explanation of how users can adjust the code although there are almost certainly better methods which are part of a big code overhaul. We are slowly working on CPG 1.6 which will be fully up to date PHP version wise.
« Last Edit: August 07, 2013, 10:05:12 pm by Phill Luckhurst »
Logged
It is a mistake to think you can solve any major problems just with potatoes.

cobraspaz

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Bunch of Inspekt errors/warnings
« Reply #17 on: August 07, 2013, 11:49:30 pm »

I will apologize for saying that the devs don't care. I was just aggravated that it seemed the first response was to turn off the warnings, and in another thread the user was told to get a different web host. I feel like sometimes the devs on here could use a little bit of tact when responding to people who need help.

That made me upset enough that I had to post a reply. The problem with the strict warnings is that when they are turned on, not only do they jumble up the page with nonsense, they also stop the code from running properly. The other problem is knowing where in the cPanel to adjust the php settings and turn them off.

Hopefully my post will help anyone in the future who can't or doesn't know how to turn off the warnings. The quick and dirty fix that I posted will work until version 1.6.

and since I use and do like coppermine gallery. Thanks for your support.
Logged

VLK

  • Coppermine newbie
  • Country: fi
  • Offline Offline
  • Gender: Male
  • Posts: 5
Re: Bunch of Inspekt errors/warnings
« Reply #18 on: September 27, 2013, 12:59:48 pm »

Hi,

I have made public static change to a inspekt.php file and some warnings removed. But still there is the following warnings, how can I remove them?


Strict Standards: Non-static method Inspekt_Supercage::Factory() should not be called statically in /home/mtjart/public_html/kuvagalleria/include/inspekt.php on line 283

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically in /home/mtjart/public_html/kuvagalleria/include/inspekt.php on line 147

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically in /home/mtjart/public_html/kuvagalleria/include/inspekt.php on line 170

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically in /home/mtjart/public_html/kuvagalleria/include/inspekt.php on line 192

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically in /home/mtjart/public_html/kuvagalleria/include/inspekt.php on line 215

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically in /home/mtjart/public_html/kuvagalleria/include/inspekt.php on line 238

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically in /home/mtjart/public_html/kuvagalleria/include/inspekt.php on line 124

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Bunch of Inspekt errors/warnings
« Reply #19 on: September 27, 2013, 07:37:42 pm »

Try to apply all of those changes: http://sourceforge.net/p/coppermine/code/8589/
Logged
Pages: [1] 2   Go Up
 

Page created in 0.027 seconds with 20 queries.