Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Error after moving to new server (STRICT STANDARDS)  (Read 17625 times)

0 Members and 1 Guest are viewing this topic.

PencilGeek

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Error after moving to new server (STRICT STANDARDS)
« on: July 20, 2012, 05:54:49 am »

After moving to my new server, I'm now getting the dreaded:
Quote
Strict Standards: Non-static method Inspekt::makeSuperCage() should not be called statically in C:\xampp\htdocs\gallery\include\init.inc.php on line 50

Strict Standards: Non-static method Inspekt_Supercage::Factory() should not be called statically in C:\xampp\htdocs\gallery\include\inspekt.php on line 284

Strict Standards: Non-static method Inspekt::makeGetCage() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\gallery\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 C:\xampp\htdocs\gallery\include\inspekt.php on line 149

Strict Standards: Non-static method Inspekt::makePostCage() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\gallery\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 C:\xampp\htdocs\gallery\include\inspekt.php on line 172

Strict Standards: Non-static method Inspekt::makeCookieCage() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\gallery\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 C:\xampp\htdocs\gallery\include\inspekt.php on line 194

Strict Standards: Non-static method Inspekt::makeEnvCage() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\gallery\include\inspekt\supercage.php on line 129

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\gallery\include\inspekt.php on line 217

Strict Standards: Non-static method Inspekt::makeFilesCage() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\gallery\include\inspekt\supercage.php on line 130

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\gallery\include\inspekt.php on line 240

Strict Standards: Non-static method Inspekt::makeServerCage() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\gallery\include\inspekt\supercage.php on line 136

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\gallery\include\inspekt.php on line 126

Before anybody asks, yes I've viewed these threads:
http://forum.coppermine-gallery.net/index.php?topic=72712.0
http://forum.coppermine-gallery.net/index.php/topic,69667.0.html

And before you ask gain, yes my permissions in php.ini are set as follows:
error_reporting = E_ALL & ~E_NOTICE

And yes, I've restarted apache (didn't need to because php.ini was already set correctly...but restarted anyways).

I wasn't getting any of these errors until I installed imagemagick...but then again, I wasn't trying to add new photos to a gallery either.  I used the ubuntu synaptic manager to install imagemagick, and that's when the problem started.

Knowing that I had built my own imagemagick on my old server, I built from those sources and installed from those sources instead.

At this point, I can't get rid of these messages and I can't add any new photos to the gallery.

Here's the chronology of events:
  • Built new server with apache, php, and mysql.
    Made sure that my various .ini files matched.
    Exported my old sql databases, and imported them to the new server.  Perfect.
    Installed all of my web sites, and verified they all work (many are database driven...so this is a good sign).
    Tested coppermine in VIEW mode only.  Didn't see any errors.
    Wanted to upload new gallery and noticed I don't have imagemagick installed.
    Installed imagemagic from synaptics package manager, and problems started.
    Built imagemagic from source, and installed from source without removing synaptic version.  Still errors.
    Removed synaptics version of imagemagic.  Still errors.

Now what?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: Error after moving to new server (STRICT STANDARDS)
« Reply #1 on: July 20, 2012, 06:59:53 am »

I assume notices are enabled in the Coppermine config. Please disable them and try again.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4856
    • Windsurf.me
Re: Error after moving to new server (STRICT STANDARDS)
« Reply #2 on: July 20, 2012, 08:05:43 am »

xampp for webhosting? That always worries me. You would need to re-configure your php.ini file in xampp, there are plenty of articles on how to do this via Google. You would also need to check which version of PHP xampp is using as its releases often use the very latest version before any normal host would even consider using it.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

PencilGeek

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Re: Error after moving to new server (STRICT STANDARDS)
« Reply #3 on: July 20, 2012, 04:16:05 pm »

xampp for webhosting? That always worries me. You would need to re-configure your php.ini file in xampp, there are plenty of articles on how to do this via Google. You would also need to check which version of PHP xampp is using as its releases often use the very latest version before any normal host would even consider using it.

Actually, that's a cut-paste from the other thread.  Xampp is not on my system...whatever that is.

Here's my actual messages.
Quote
Strict Standards: Non-static method Inspekt::makeSuperCage() should not be called statically in /var/www/photobucket/include/init.inc.php on line 50

Strict Standards: Non-static method Inspekt_Supercage::Factory() should not be called statically in /var/www/photobucket/include/inspekt.php on line 284

Strict Standards: Non-static method Inspekt::makeGetCage() should not be called statically, assuming $this from incompatible context in /var/www/photobucket/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 /var/www/photobucket/include/inspekt.php on line 149

Strict Standards: Non-static method Inspekt::makePostCage() should not be called statically, assuming $this from incompatible context in /var/www/photobucket/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 /var/www/photobucket/include/inspekt.php on line 172

Strict Standards: Non-static method Inspekt::makeCookieCage() should not be called statically, assuming $this from incompatible context in /var/www/photobucket/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 /var/www/photobucket/include/inspekt.php on line 194

Strict Standards: Non-static method Inspekt::makeEnvCage() should not be called statically, assuming $this from incompatible context in /var/www/photobucket/include/inspekt/supercage.php on line 129

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /var/www/photobucket/include/inspekt.php on line 217

Strict Standards: Non-static method Inspekt::makeFilesCage() should not be called statically, assuming $this from incompatible context in /var/www/photobucket/include/inspekt/supercage.php on line 130

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /var/www/photobucket/include/inspekt.php on line 240

Strict Standards: Non-static method Inspekt::makeServerCage() should not be called statically, assuming $this from incompatible context in /var/www/photobucket/include/inspekt/supercage.php on line 136

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /var/www/photobucket/include/inspekt.php on line 126
Logged

PencilGeek

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Re: Error after moving to new server (STRICT STANDARDS)
« Reply #4 on: July 20, 2012, 04:22:25 pm »

I assume notices are enabled in the Coppermine config. Please disable them and try again.

I would understand this a little better if this were a fresh install.  But since it's literally copied from one server to another, with all of the configuration and (any) .htaccess files, and with the sql database as well, I'm not sure how the config would change.

I assume in the config, you're talking about the config.inc.php file.  Here are its contents:

Code: [Select]
<?php
// Coppermine configuration file
// MySQL configuration
$CONFIG['dbserver'] =                         'localhost';        // Your database server
$CONFIG['dbuser'] =                         '*******';        // Your mysql username
$CONFIG['dbpass'] =                         '******';                // Your mysql password
$CONFIG['dbname'] =                         'photobucket';        // Your mysql database name


// MySQL TABLE NAMES PREFIX
$CONFIG['TABLE_PREFIX'] =                'cpg15x_';
?>

I don't see anything in there that would enable php errors.  If that's not the config file you meant, please let me know.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: Error after moving to new server (STRICT STANDARDS)
« Reply #5 on: July 20, 2012, 04:24:50 pm »

I'm talking about your Gallery Configuration (admin.php). See http://documentation.coppermine-gallery.net/en/configuration.htm#admin_misc_debug_notices
Logged

PencilGeek

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Re: Error after moving to new server (STRICT STANDARDS)
« Reply #6 on: July 20, 2012, 04:54:41 pm »

I'm talking about your Gallery Configuration (admin.php). See http://documentation.coppermine-gallery.net/en/configuration.htm#admin_misc_debug_notices

I think we're talking about two different problems.  Again, I could understand if this were a new installation with a new database.  But this was literally copied from a working system (which is still working), and from a database that hasn't changed (other than to create a few new album titles).

I checked the link you sent, and checked my database for these debug values.
debug_mode: 0
debug_notice: 0

I also looked in admin.php, but nothing in there jumped out at me.  Can you please be more specific?

I've now noticed that I can't even log in any longer.  I get a blank error message on the screen; the screen keeps reloading; and when I click continue, the same blank message continues to reload.  Something is now very screwed up.

I forgot to mention earlier, that I tried to re-run the installation php script.  But that failed because the database already existed and wanted me to choose a different cp* prefix.  At that point, I restored the original config.inc.php file.  Not sure if this would now prevent me from logging in.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: Error after moving to new server (STRICT STANDARDS)
« Reply #7 on: July 20, 2012, 05:08:18 pm »

We're talking about exactly one issue here: the "strict standards" notices. It seems that you've already found those threads, so I don't know what exactly you want to know beyond that. Try to set PHP's error reporting so it won't show those notices.


I also looked in admin.php, but nothing in there jumped out at me.  Can you please be more specific?
That's not what I've asked you. However, you already confirmed that you've disabled PHP notices in the config:
debug_notice: 0
Logged

PencilGeek

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Re: Error after moving to new server (STRICT STANDARDS)
« Reply #8 on: July 21, 2012, 07:12:57 am »

We're talking about exactly one issue here: the "strict standards" notices. It seems that you've already found those threads, so I don't know what exactly you want to know beyond that. Try to set PHP's error reporting so it won't show those notices.

That's not what I've asked you. However, you already confirmed that you've disabled PHP notices in the config:

Sigh.  In my last post, I mentioned I could also no longer log in.  I'm sure they are not one in the same issue.

As I mentioned in post-1, I already set my php.ini permissions according to your recommendations but was still getting this error.  So setting them again to the same thing will not change the behavior.

But for others trying to solve this problem, it turns out newer versions of php (as of 5.3 and later) will not work without a slightly different value for error_reporting in php.ini.

Older versions of php would work with the following settings in php.ini:
error_reporting = E_ALL & ~E_NOTICE

To fix this problem in php version 5.3 and later, use these settings in php.ini:
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: Re: Error after moving to new server (STRICT STANDARDS)
« Reply #9 on: July 21, 2012, 10:30:57 am »

In my last post, I mentioned I could also no longer log in.
10. One question per thread
We have a strict "One question/issue per thread rule", which helps both supporters/moderators to keep track of open/closed issues as well as users who search the board or browse it, looking for answers to their question. Don't try to "hijack" other's threads by posting unrelated questions to an existing thread.


To fix this problem in php version 5.3 and later, use these settings in php.ini:
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
I didn't know that the behavior changed, simply as this is no PHP configuration support board, but the Coppermine support board. However, thanks for posting the solution. Finally, please
tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.
Logged

Animor

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: Error after moving to new server (STRICT STANDARDS)
« Reply #10 on: August 29, 2012, 08:20:57 pm »

I'm bumping this thread since I ran into the same issue so I've searched for a solution.
I don't think that manipulating php.ini is the right fix. The real problem resides somewhere within the CPG code, which is not compatible with php 5.4.

PHPBB forums had the same issue with 5.4 PHP, and they fixed it for the PHPBB 3.0.11 version, which was released few days ago.

Hence, I believe that this should be resolved within CPG code, without asking to modify general files which are not related to the CPG installaion.
Moreover, I'm not sure everyone can access php.ini and modify it. Once hosts will upgrade to PHP 5.4, this problem will be rise more commonly.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4856
    • Windsurf.me
Re: Error after moving to new server (STRICT STANDARDS)
« Reply #11 on: August 30, 2012, 04:30:34 pm »

Not at all,  this is NOT a CPG bug but simply because you have your error reporting set poorly. You would see the same errors with many PHP scripts such as Joomla, Wordpress, Drupal etc. It is a warning for developers that code may not be future proof. It is not something that should urgently need attention. There is no problem with the script, just that some of the code used will probably not work when PHP 6.x is released. Those warnings are meant for developers and should not be enabled on a normal functioning webhost, or at least should be an option for the user. In most cases that option is available via the php.ini file. On many hosts that level of reporting is something you have to enable if you need it, which is how it should be IMHO.
Logged
It is a mistake to think you can solve any major problems just with potatoes.
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 19 queries.