Description of problem: gallery2 on fc21 fills ssl_error_log with PHP Deprecated: Non-static method calls. [Tue Apr 21 22:05:53.485835 2015] [:error] [pid 5691] [client 157.55.39.211:30669] PHP Deprecated: Non-static method GalleryDataCache::containsKey() should not be called statically, assuming $this from incompatible context in /usr/share/gallery2/modules/core/classes/Gallery.class on line 922 [Tue Apr 21 22:05:53.485870 2015] [:error] [pid 5691] [client 157.55.39.211:30669] PHP Deprecated: Non-static method GalleryDataCache::_getCache() should not be called statically, assuming $this from incompatible context in /usr/share/gallery2/modules/core/classes/GalleryDataCache.class on line 203 [Tue Apr 21 22:05:53.499205 2015] [:error] [pid 5691] [client 157.55.39.211:30669] PHP Deprecated: Non-static method GalleryUtilities::isEmbedded() should not be called statically, assuming $this from incompatible context in /usr/share/gallery2/modules/rewrite/classes/parsers/modrewrite/ModRewriteUrlGenerator.class on line 38 [Tue Apr 21 22:05:53.499230 2015] [:error] [pid 5691] [client 157.55.39.211:30669] PHP Deprecated: Non-static method GalleryDataCache::containsKey() should not be called statically, assuming $this from incompatible context in /usr/share/gallery2/modules/core/classes/Gallery.class on line 922 And so on... for 100s of gigs.
Me too! While travelling to Europe during June I saw that the root filesystem had zero space left. Luckily I found the ginormous /var/log/httpd/error_log file, zeroed it, and shut down httpd. Now home again, I am baffled at the cause. What went wrong? How to fix it?
The recurring error message in /var/log/httpd/error_log is this: [Sun Jul 05 21:22:14.821823 2015] [:error] [pid 25042] [client 66.249.64.214:33929] PHP Deprecated: Non-static method GalleryDataCache::containsKey() should not be called statically, assuming $this from incompatible context in /usr/share/gallery2/modules/core/classes/Gallery.class on line 922 When I count the times this appears in the last five weeks of log files: grep Non-static error* | wc I get 28041407 841930128 9059528290 28 million error messages consuming 9 gigabytes of disk space is not acceptable and means I can no longer use gallery2. I have searched diligently for a fix without result.
Created attachment 1051598 [details] patch that silences almost all the messages I did this really quickly. I tested it on my gallery2. Will add more later on as they show up in the logs.
This diff was generated on a Fedora 22 system. You should be able to apply to the base of your tree. At some point (if the gallery2 owner) doesn't do it, I may create a new src.rpm. But it will be a long time before I have time. I can test though.
I have a few more tweaks if anyone is interested.
Thank you very much, Joel. I applied your patch to my Fedora 21 system and most of the error messages have been suppressed. All except this one: [Wed Jul 15 10:55:14.074234 2015] [:error] [pid 12887] [client 66.249.67.49:52593] PHP Deprecated: Non-static method StringParser_Node::destroyNode() should not be called statically, assuming $this from incompatible context in /usr/share/gallery2/lib/bbcode/stringparser.class.php on line 356 I tried to make sense of stringparser.class.php, looking for any similarities with the patches, but couldn't find a way to fix it. My knowledge of this kind of code is non-existent. I hope you can find time to fix this one, too. Incidentally, the patches did not work perfectly on my Fedora 21 system. This fifth patch to ./gallery2/modules/core/classes/GalleryDataCache.class failed: @@ -198,9 +198,8 @@ * Does the cache contain the key specified? * @param string $key * @return boolean true if the cache contains the key given - * @static */ - function containsKey($key) { + public static function containsKey($key) { $cache =& GalleryDataCache::_getCache(); if (!$cache['memoryCacheEnabled']) { return false; It failed because the line - * @static was not present in the original code, so could not be removed. I added it to the code, it was duly removed, and the patch succeeded. In addition, at the end of the patch application came this line: Reversed (or previously applied) patch detected! Assume -R? [n] y As noted, I chose y and let it go. Not sure what chaos that caused. I expect to upgrade this system to Fedora 22 Real Soon Now, and will retain your patch file for use then.
Created attachment 1052395 [details] Fix to stringparser silent stringparser complaints
Thanks for the feedback. My diffs are really sloppy ... was trying to get as much done as quickly as possible. Here is a diff for stringparser. Give it a try? At some point soon I will try to send another update. Are you getting the mysql vs mysqli warnings? Which adodb driver are you using?
Also the GalleryView::getItem() fix will be more complicated as this is called both statically and non-statically. Will do some other time.
Created attachment 1052751 [details] Updated diff. Fixes enough of the warnings that it is unlikely to break logs This patch set obsoletes the previous patches. Please try!
Created attachment 1052766 [details] diffs broken out by plugin File is a tar ball of diffs.
Created attachment 1052767 [details] diffs by plugin
Created attachment 1054971 [details] error_log from entering an album
Joel: I have now freshly installed Fedora 22, reinstalled the gallery2 database from a mysql backup, and applied your patches from comment 10, gallery2_updated.diff. The volume of /var/log/httpd/error_log is smaller, but is still too much. I will attach a portion produced by entering a new album. The files still producing unwanted messages are: /usr/share/gallery2/modules/core/classes/GalleryCoreApi.class 5 times /usr/share/gallery2/modules/core/classes/GalleryDerivative.class 4 times /usr/share/gallery2/modules/core/classes/helpers/GalleryToolkitHelper_simple.class 1 time Your gallery2_updated.diff includes patches for GalleryCoreApi.class, but not for GalleryDerivative.class or GalleryToolkitHelper_simple.class. Could you take a look at these three, please? On an apparently unrelated topic, the last lines in the attachment say: [Wed Jul 22 13:28:14.150410 2015] [:error] [pid 19206] Misconfiguration of certificate's CN and virtual name. The certificate CN has datium. We expected datium.datix.lan as virtual name. Apparently I set the machine name as datium during the F22 installation, whereas it had been datium.datix.lan previously (or vice versa). Certificates are beyond my comprehension, so any advice how to fix this would be welcome.
I have no advice on the certificate issue. That is something I spelunk into every few years and work through to get resolved. Plenty of information out there on setting up httpd with the virtual. You probably just have to gen a new cert. Regarding the patches, if you look at the diffs, you'll see that it is trivial for you to create them as well --- you don't need to wait for me. 99% of the time it is just adding "public static" to the front of the function name. Sometime in the next week I'll try to dive in and look again. I'll fix the ones you list, plus I'll mine my logs for additional ones. It would be helpful if you wandered around your gallery testing various things including the admin interface and printing and the plugins you use and then uploading the (ssl_)error_log.
Ok, sorry for the wait. I built gallery2 with the patches from the tarball. I had to drop a few sections due to duplication. Please test. If it's good, I'll build for everything. https://fedorapeople.org/~limb/gallery2/
I feel like the proverbial bull in a china shop, but I'll try to help... I used wget to download the 76 new rpms (for F24) of Comment 16 into my F22 system; then did dnf update *.rpm and restarted httpd; entered my gallery2, was surprised NOT to have to reinitialize it. In /var/log/httpd/error_log there are now, I think, more errors than before. I have isolated those induced by entering a single album and will attach that fragment for your reading pleasure. There are 93 lines; the last 3 due to an unrelated certificate misconfiguration problem that remains unresolved. Clearly the static/non-static problems remain. I will try to restore the system as it was - Fresh F22, plus patches from comment 10, gallery2_updated.diff. Hopefully, dnf downgrade will work.
Created attachment 1059185 [details] error_log fragment - entering an album with new F24 gall*.rpms
This message is a reminder that Fedora 21 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 21. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '21'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 21 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
Problem still exists in Fedora 25...please apply previously provided patch?
There are a few additional compatibility issues with PHP7 that prevents Gallery2 from working on Fedora 25+. @Jon, are you still maintaining gallery? Would you like a co-maintainer? I've solved the handful of issues and have it working for my instance and would be happy to build a patched package.
Michael, are you interested in a tester for your .src.rpm?
@Michael I've actually drifted away from PHP in the last several years. If you'd like to take gallery2 (and 3?) I can give them to you. If not, request ACLs and you can co-maintain.
@Joel, once I get patches made I'll provide a link to a SRPM. @Jon, I will offer to take gallery2. I still have a gallery2 instance, and while I should look for other software, it is not my top priority. I'll have to pass on gallery3. I don't have any way to test it. My FAS username: mooninite
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
Ownership changed. Thank you!
Michael, I am so happy to see that you are expressing an interest in gallery2. I have been a (more or less) happy user for many years with over 11,000 pictures. But, after a new Fedora 25 install, I have been completely unable to run either the install or update scripts. Tons of error messages; none of use (to me). I can reprise these events if you're interested. I'm totally ignorant of coding methods used in web applications, and must rely on "instructions for dummies" to use this stuff, until recently with some success. While I can offer no help in fixing it, I might be a "useful idiot" in testing it. Good luck. There are doubtless many of us out here hoping for a fixed gallery[23]. Incidentally, FWIW, I tried to install gallery3 and went to the "install" page, but was told I was not allowed to enter that page. That seemed odd for a new fresh installation. No explanation. So I gave up.
Thanks, Jon. I have created a package to test. I've just noticed that the admin interface is broken so that may not work for you. I'll try to investigate that issue later. https://koji.fedoraproject.org/koji/taskinfo?taskID=17981355
@David @Joel Have either of you tested the new package yet? I want to push a F25 update soon.
I would if I could but I can't. ;-) I clicked on the koji link in C29 which led me to a long list of rpms, gallery2-2.3.2-15.fc26, built for rawhide. (I have gallery2-2.3.2-13.fc24.noarch installed.) So I looked for them in rawhide: # dnf repository-packages "*rawhide*" list available "gallery2*" Last metadata expiration check: 1:09:12 ago on Fri Feb 24 16:09:33 2017. Error: No matching Packages to list Evidently there are no gallery2 packages in rawhide. So how, then, do I test the gallery2-2.3.2-15.fc26 packages? Must I download individually all ~77 of them? Or is there a better way? Sorry to be dense.
Yes, there are a few easy ways to install the update. However, the update won't help much on F24 since it is still using PHP5. My F24 instance was working fine on PHP5, but you should see some of the warnings disappear. dnf --releasever=rawhide update gallery2* or koji download-build 860797
I am still unable to get into "upgrade" phase. I installed your new packages dnf --releasever=rawhide update gallery2* but that failed because the rawhide gpgkey wasn't found. After scrounging a while, I gave up and did dnf --nogpgcheck --releasever=rawhide update gallery2* which installed the full 76 packages - gallery2-2.3.2-15.fc26.noarch, et al, on my Fedora 25 system which includes, BTW, php-7.0.16-1.fc25.x86_64, et al. When I pointed firefox at datix.us/gallery2/upgrade, the welcome page was preceded by a dozen or so error lines. When I clicked on "Continue to Step 1>>" I got a "Not Found" error, and I could go no further. I will attach a file with the full output, cut 'n pasted. I tried again with Google Chrome, but got the same errors.
Created attachment 1257633 [details] Error msgs from upgrade attempt
Michael, I tried the RPMs and it doesn't look like my patches in "Updated diff. Fixes enough of the warnings that it is unlikely to break logs" Have been applied. Other than upgrade the RPMs kind of work, but you can't run with them because it will fill the logs in a few minutes.
Hmmm. I think I'm wrong. These are tons of "PHP Deprecated:" errors whose fix I'm not seeing in my diffs. (although I have a vague memory that I had fixed them a few years ago)
Created attachment 1257763 [details] A sample of the patches needed Somehow I screwed up and lost all of these kind of fixes.
Thanks for the additional changes. I'm going to push a F25 update with the additional patch. On my Gallery2 instance I don't see any warnings or errors in the log. I'll have to address the issue regarding the admin page and upgrade pages with a separate update.
gallery2-2.3.2-16.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d5b689adee
gallery2-2.3.2-16.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-d5b689adee
gallery2-2.3.2-16.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.