Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

PHP 8 support

131 views
Skip to first unread message

JDT

unread,
May 24, 2024, 3:13:22 PM5/24/24
to Fat-Free Framework
It looks like the most recent version is targeted for PHP 7.3 and up. I've been running my app that was built using F3 3.6 on a Google App Engine environment that was targeted for the PHP 5.5 runtime. I know... ancient. But it ran and it was stable for a long time. Now however, I have to make some required updates to get it running again and Google App Engine requires at least PHP 8.1 and recommends 8.3.  

I have been tearing my hair out the last few weeks trying to update my app to run on PHP 8.3. At this point I'm about to give up hope and just rebuild the entire thing. But even if I do that, as much as I would love to use F3 again, if there's not going to be PHP 8+ support in the future, I'm worried I'll be working with and outdated framework which will cause more issues down the line. 

Does anyone know if there are plans to get the framework up to date on current version of PHP? 

Ramunas Cepaitis

unread,
May 24, 2024, 3:21:14 PM5/24/24
to Fat-Free Framework

Sorry, I am not helping with your question, but I since I am planning to migrate my web app to GCP cloud run expecting it work on PHP 8.x, so I am very curious - is Fat-free core not compatible with PHP 8? I thought I could rewrite my code, although when I checked what's new in that version, there's nothing that could affect my code. 

Christophe Rolland

unread,
May 24, 2024, 3:32:16 PM5/24/24
to Fat-Free Framework
Good evening,

Just to share my humble experience with a hosting provider in France, o2switch. I run applications that I developed with the latest version of F3 under PHP 8.1, which works very well. I do not encounter any difficulties. You need to ensure that allow_url_include is disabled on the server to prevent F3 from going into security mode.

I hope this helps you.

Best,

Christophe

v.

unread,
May 25, 2024, 5:40:13 AM5/25/24
to Fat-Free Framework
All my F3-apps run fine on PHP 8.2
F3 v3.8 is as compatible as it can be.

Janea Taylor

unread,
May 28, 2024, 11:57:10 AM5/28/24
to v. via Fat-Free Framework
It seems I can run a basic application fine on 8.x but it's certain features that my existing application is dependent on that completely break. More specifically, the custom session handler and storing session data in the database. I have been trying to get this to work for weeks to no avail. Even the cache / file based custom session handler has the same issue. But there are a multitude of other issues I've run into, most of which I've been able to fix. I decided to just stop using the custom session handler altogether but now I'm running into other problems. It seems like it never ends and I'm wondering if it's worth it to continue at this point. 


--
-- You've received this message because you are subscribed to the Google Groups group. To post to this group, send an email to f3-fra...@googlegroups.com. To unsubscribe from this group, send an email to f3-framework...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/f3-framework?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Fat-Free Framework" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/f3-framework/HNKdMpLNK2s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to f3-framework...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/f3-framework/0fb5a943-64e0-42ce-9f4c-9fd427fa51ecn%40googlegroups.com.

ved

unread,
May 28, 2024, 2:15:39 PM5/28/24
to Fat-Free Framework
Hi,

Many people are running F3 apps with several versions of PHP 8, including 8.3.

If you have any specific issue, the best way is to post a simple description and ideally a basic reproduction code sample, so that other users or contributors can assist.

You can post an issue on the Github repo or post any other doubts or issues also here on these groups.

All you've said is that "certain features that my existing application is dependent on that completely break" without specifiying what or how it breaks, so there is basically nothing we can do to help.

You've also stated that "there are a multitude of other issues I've run into, most of which I've been able to fix.".
Since F3 is open source,  it would be very useful for the community if you shared your fixes so it can benefit everybody.
What are the multitude of issues?

So, please post detailed info about the issues you're getting and some code reproductions and we'll do our best to assist.

Cheers.

Janea Taylor

unread,
May 28, 2024, 2:43:10 PM5/28/24
to ved via Fat-Free Framework
I've already read through the Github updates and all of the threads I could find regarding my specific issue and upgraded the framework and still have the same problems. It's mostly related to the customer session handler. I'm not asking for support on a specific issue because I already read the posts related to my specific issue and they did not help. My question is not regarding support on the issues I'm having but a general question on whether or not F3 is going to fully support PHP 8+ officially in future versions so I know whether or not to continue using it at all. Does that make sense?  Google App Engine REQUIRES PHP 8.1 and will require 8.3 in the near future so, I need to know if it's worth the investment to continue using a framework that only currently officially supports 7.3+ which is out of support. Thanks for your help! 


Christophe Rolland

unread,
May 28, 2024, 3:03:51 PM5/28/24
to Fat-Free Framework
I have the impression that we are not talking about the same version of F3. For use with PHP8, you need to update the library by getting the latest version. Otherwise, it is clear that previous versions of F3 do not support PHP8 correctly. It's like asking a version 1.7 of Prestashop to work beyond PHP 7.2; there will be issues. For sessions, I have always preferred using Redis, APCu, or Memcache, something that we might find on a GCP configuration.

I would also like to ask if there is a team or a working group for the new versions of F3. PHP 8.4 should have interesting new features for the framework.
It would be interesting to discuss the topic...

Janea Taylor

unread,
May 28, 2024, 3:11:58 PM5/28/24
to Christophe Rolland via Fat-Free Framework
I'm with you all the way. I preferred storing the session data in the database for this specific app because it was helpful for reporting purposes. But any update to the framework, including the most recent version led to the same problem but if I go back to older versions of PHP it works fine again. So, it's something with newer PHP versions. 

One of the issues is that there's an error saying it can't read the session at all, regardless of if it's cache based or database. It's in the way the custom session handler is invoked. I've tried many different variations and it's always one of those two issues regardless of when I start the session. 

session_set_save_handler(): Cannot change save handler when session is active

It's the known issue that was supposedly fixed a while back but even with the latest framework version I get the same error. If I remove the session_start calls from everywhere and move it to just below the session_set_save_handler call, cache or database, then it says it cannot read the session data. I just got tired of dealing with it and decided to use my own session handling outside of the framework. I don't even care about custom session handling anymore. I just want to know if the framework is ever going to fundamentally support PHP 8.3+ or not. 



JDT

unread,
May 28, 2024, 4:40:40 PM5/28/24
to Fat-Free Framework
So, I created a super simple F3 app using 3.8 and PHP 8.3 with a simple front controller and routing to a home page with some simple HTML. Then I called new \DB\SQL\Session($db); in the base page constructor and set a new session var. No errors! Works just fine. I ended up upgrading my F3 to the latest version on my app and updated the pagination plugin to the latest version, and now db sessions are working just fine. I have no idea why. Because I swear I already tried this. But perhaps I had a session_start() left somewhere in the code that was causing problems with setting the custom session handler. No clue. Anyway, happy that all is working now but still curious about ongoing PHP version support. 

v.

unread,
May 28, 2024, 5:12:24 PM5/28/24
to Fat-Free Framework
It seems to me that it is not F3 that is causing the issues, but your code...
As said by me and others before: php 8.3 is supported, I'm not sure why you insist on questioning this.

Janea Taylor

unread,
May 28, 2024, 6:16:18 PM5/28/24
to v. via Fat-Free Framework
I said it was my code, not the framework afterall. Not sure if you caught that or not. And I'm not questioning 8.3 support but future versions. I'm not sure why I'm being given such a hard time for asking about this. Whatever. 


v.

unread,
May 29, 2024, 3:40:19 AM5/29/24
to Fat-Free Framework
Well you did say "still curious about ongoing PHP version support", I'm not sure how to interpret this question....

Glad you got your issues sorted.

ved

unread,
May 29, 2024, 7:24:40 AM5/29/24
to Fat-Free Framework
Hi,

I'm pretty sure F3 will continue having most issues fixed and maintain compatibility with latest PHP versions.

That being said, I'm not sure if it will adopt any new features that are specific to PHP 8.3+

But again, F3 is an open source project so feel free to suggest any new features that you wish to have adopted and I'm sure the team will consider it.

Cheers.


Janea Taylor

unread,
May 29, 2024, 11:52:18 AM5/29/24
to ved via Fat-Free Framework
Thank you ved for that helpful response. I will keep that in mind. Just want to note as well that after I upgraded F3 to 3.8, my app was working fine locally but when I deployed to GAE the post method started redirecting to localhost which was really strange. I reverted the reroute() method in base.php to the previous version and it resolved the issue. Not sure why this occurred but seems like a possible bug. 

Reply all
Reply to author
Forward
0 new messages