forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 install => Topic started by: aravot on March 26, 2010, 06:31:32 am

Title: [Invalid]: Undefined variable during install
Post by: aravot on March 26, 2010, 06:31:32 am
I get following notices during second step of installation.

Quote
Notice: 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
Title: Re: Undefined variable during install
Post by: Joachim Müller on March 26, 2010, 07:05:57 am
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 (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616).
Title: Re: Undefined variable during install
Post by: aravot on March 26, 2010, 08:09:05 am
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
Title: Re: Undefined variable during install
Post by: Joachim Müller on March 26, 2010, 08:25:03 am
No 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.

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.
Title: Re: Undefined variable during install
Post by: aravot on March 26, 2010, 04:15:59 pm
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.
Title: Re: [Invalid]: Undefined variable during install
Post by: Joachim Müller on March 26, 2010, 07:30:05 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.
Title: Re: [Invalid]: Undefined variable during install
Post by: jimav on April 25, 2013, 08:38:02 pm
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
Title: Re: [Invalid]: Undefined variable during install
Post by: Αndré on April 26, 2013, 10:43:38 am
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.