Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major problems with PHP 8 on Fedora 35 #23

Closed
mhwarfield opened this issue Nov 18, 2021 · 5 comments · Fixed by #26
Closed

Major problems with PHP 8 on Fedora 35 #23

mhwarfield opened this issue Nov 18, 2021 · 5 comments · Fixed by #26

Comments

@mhwarfield
Copy link

Upgraded to Fedora 35 with PHP 8. Gallery2 would not run. Downloaded latest package. No joy. Set error logging on.

Errors like:
Fatal error: Array and string offset access syntax with curly braces is no longer supported in /usr/share/gallery2/modules/core/classes/GalleryUrlGenerator.class on line 153

Cleaned those with {0} -> [0] in several locations

Parse errors on
and

Fatal error: Uncaught Error: Non-static method GalleryUtilities::isSafeHttpHeader() cannot be called statically in /usr/share/gallery2/modules/core/classes/GalleryPhpVm.class:138 Stack trace: #0 /usr/share/gallery2/index.php(48): GalleryPhpVm->header() #1 {main} thrown in /usr/share/gallery2/modules/core/classes/GalleryPhpVm.class on line 138

@gregstoll
Copy link
Owner

Ugh, that's unfortunate. I can try to get this set up at some point and fix the issues but with the holidays approaching I don't have a lot of spare time. I'd be happy to accept PRs though!

@Filou83
Copy link

Filou83 commented Dec 4, 2021

Would be really nice if you could try to fix the issues with php 8 - I still love gallery2 and your work is highly appreciated.
Thank you and have a happy christmas time.

@gregstoll
Copy link
Owner

HI @mhwarfield - I think this repo has changes that will fix these issues - for example this version of GalleryUrlGenerator.class does use square brackets on line 153. However, this repo is not the officially distributed package.

What I did was to clone or download a copy of this repo and then copy the files to /usr/share/gallery2 over the officially installed package. After you've done that, try restarting apache and seeing if the errors go away. Thanks!

@gregstoll
Copy link
Owner

As I'm pretty sure this problem is fixed, I'm going to close this issue. But feel free to file any other issues y'all see with PHP 8!

@gregstoll
Copy link
Owner

OK, I'm not sure what I was trying, but there are definitely more problems with PHP 8. I have stuff generally working in the php8 branch - hoping to merge that into main soon. Reopening until then.

@gregstoll gregstoll reopened this Sep 18, 2022
@gregstoll gregstoll linked a pull request Sep 19, 2022 that will close this issue
gregstoll added a commit that referenced this issue Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants