[Invalid]: Undefined variable during install [Invalid]: Undefined variable during install
 

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]

Main Menu

[Invalid]: Undefined variable during install

Started by aravot, March 26, 2010, 06:31:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

aravot

I get following notices during second step of installation.

QuoteNotice: Undefined variable: lang_versioncheck_php in \include\versioncheck.inc.php  on line 48
Notice: Use of undefined constant cpg_fillArrayFieldWithSpaces - assumed 'cpg_fillArrayFieldWithSpaces' in \include\versioncheck.inc.php  on line 90
Notice: Undefined index: no_modification_check in \include\versioncheck.inc.php  on line 424
Notice: Undefined index: txt_modified in \include\versioncheck.inc.php  on line 473

Joachim Müller

Then turn notices display off if that worries you, as per http://documentation.coppermine-gallery.net/en/configuration.htm#admin_misc_debug_notices
Post the real problem (if you have one) doing as suggested per board rules.

aravot

No need to bite, I know I can turn off notice reporting just trying to give feedback to make coppermine better, some shared host don't give the option to modify php.ini

Joachim Müller

Quote from: aravot on March 26, 2010, 08:09:05 AMNo need to bite
We like to hear your test reports, but you need to have read the testing docs that explains how your report is supposed to look like. Yours just doesn't help at all, because you clearly failed to read the docs before posting.

Quote from: aravot on March 26, 2010, 08:09:05 AM
some shared host don't give the option to modify php.ini
You don't have to modify php.ini. You just don't disable notices_display in coppermine's config in the first place if your gallery is already up-and-running. If you have enabled that option in error, turn it off.
If your webhost has configured PHP to display notices out of the box (i.e. during install), it's time to look for another webhost pretty fast. My recommendation: run, as they have no idea what they're doing.

aravot

Quote from: Joachim Müller on March 26, 2010, 08:25:03 AM
If your webhost has configured PHP to display notices out of the box (i.e. during install), it's time to look for another webhost pretty fast. My recommendation: run, as they have no idea what they're doing.

I figure you would say that, any time a dev can't fix something says change host, thanks but no thanks, good luck with cpg 1.5.x stable.

Joachim Müller

Quote from: aravot on March 26, 2010, 04:15:59 PM
I figure you would say that, any time a dev can't fix something says change host, thanks but no thanks, good luck with cpg 1.5.x stable.
I figured you would say that: any time a user is too lazy to play by the rules and is being told about the rules he quits, thanks but no thanks, good luck with getting support from somewhere else.

jimav

This problem persists (still there in April 2013 with version 1.5.22).   8000+ warnings logged after only two page accesses...

Per another bug (http://forum.coppermine-gallery.net/index.php/topic,71384.msg347009.html#msg347009) some of the undefs were once fixed but not all.   As the author of that bug said, it would really be better to fix the code to avoid referencing undefined variables.   

Yes, I know I could disable seeing php warnings in served pages, but they are helpful in a test environment (a private web server) where all other software is warning-clean if there is nothing I need to respond to.   But even if the only problem was clogging up the apache error.log it would be inconvenient, because it makes it more difficult to check if there is anything which actually needs admin attention.

In 1.5.22, the problem areas seems limited to the following places in the code:

Undefined index: no_modification_check in include/versioncheck.inc.php on line 425
Undefined index: txt_modified in include/versioncheck.inc.php on line 474
Undefined index: no_modification_check in include/versioncheck.inc.php on line 312
Undefined index: txt_missing in include/versioncheck.inc.php on line 777
Undefined index: no_modification_check in include/versioncheck.inc.php on line 786

I hope the above is helpful

Αndré

The other thread reported real bugs, here we need to fix just cosmetical stuff which wouldn't be displayed if server admins adjust the error reporting correctly. PHP notices aren't helpful for end users, neither on production servers nor on test servers. They're just helpful while developing an application. That's all explained in the docs and has been discussed already too often in several threads.

However, I just fixed the PHP notices during the installation in SVN revision 8561.