Error after moving to new server (STRICT STANDARDS) Error after moving to new server (STRICT STANDARDS)
 

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

Main Menu

Error after moving to new server (STRICT STANDARDS)

Started by PencilGeek, July 20, 2012, 05:54:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PencilGeek

After moving to my new server, I'm now getting the dreaded:
QuoteStrict 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?

Αndré

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

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

PencilGeek

Quote from: Phill Luckhurst 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.

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

Here's my actual messages.
QuoteStrict 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

PencilGeek

Quote from: Αndré on July 20, 2012, 06:59:53 AM
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:

<?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.

Αndré


PencilGeek

Quote from: Αndré 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

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.

Αndré

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.


Quote from: PencilGeek on July 20, 2012, 04:54:41 PM
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:
Quote from: PencilGeek on July 20, 2012, 04:54:41 PM
debug_notice: 0

PencilGeek

Quote from: Αndré 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.

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

Αndré

Quote from: PencilGeek on July 21, 2012, 07:12:57 AM
In my last post, I mentioned I could also no longer log in.
Quote from: Joachim Müller on September 28, 2008, 10:28:42 AM
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.


Quote from: PencilGeek on July 21, 2012, 07:12:57 AM
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
Quote from: Joachim Müller on September 28, 2008, 12:46:26 PM
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.

Animor

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.

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.