-
Notifications
You must be signed in to change notification settings - Fork 57
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
Internal Server Error codes 500 and 503 returned on a fresh Flatpress 1.3.1 installation on php versions 8.0 through 8.2 #471
Comments
…e.date.php - Check whether timestamp is always a valid DateTime value
Hello @justrudra, thank you for the bug report. I have passed the output from your FP_errors.txt file and the affected core.date.php file through a few hands. Over a coffee break, I was told: the If you can, replace the file core.date.php in the directory /fp-includes/core with this one and test whether the problem still occurs. In issue #386 there was unfortunately not enough information available, e.g. an error log. The same applies to the Imunify 360 protected system. We do not use Imunify 360 protected systems. This makes traceability and reproducibility impossible. If you are able to access such error logs that are directly related to FlatPress, please create a separate issue. Possibly, not excluded, there is a solution here: https://docs.imunify360.com/faq_and_known_issues/ Let us know if you still get the Fatal error “Can only throw objects” or if the problem is solved. With best regards |
@azett Maybe if the problem with Imunify 360 and Modsecurity with Prettyurls rules is not tangible, we should disable the PrettyURLs plugin by default. |
@Fraenkiman Thank you so much for the detailed explanation and a fix for core.date.php. I ran a fresh installation of FP using your fix. As usual the installation runs fine. But once it is complete and I try to go to the homepage, a new error message is displayed.
`
If we can get through this. I will be doing some more testing with pretturls plugin and see if we can figure out a fix for its issues with Imunify 360 and Modsecurity rules. Thanks Once Again. :) |
Hello @justrudra, The setup does not use the Smarty template engine. Therefore the setup is displayed as expected. Strangely, I can't provoke such error output on my test system nor live. Perhaps @azett sees something else that I/my colleagues may have overlooked. Both files are included in this archive. Update: 17.10.2024: Which time zone and region is included in your PHP configuration by default? Best regards |
Hello Again @Fraenkiman, Sorry I was a bit late to respond. The default timezone of the server is 'America/Detroit'. I have tested both the set of files that you have provided.
Not sure if this can be sorted out. But thank you so much Frank for sparing your time and trying to help me out. :) Best regards |
Hello @justrudra, the difference between FlatPress 1.2.1 and 1.3.1 is that the intl extensions are no longer optional, but mandatory. And the Smarty template engine has changed from 2.6 to 4.X. This was necessary to ensure compatibility with PHP 8.3. You may have a problem with installing the intl / PECL package. Is this the only test system available to you or can you switch to another test system? If you have activated modsecurity, deactivate it as a test. Your error log says: _The error occurs because the function DateTimeZone::_construct() expects a string, but an invalid or unknown value is passed. https://github.com/Fraenkiman/FP-1.3.1-Issue-471-3/archive/refs/heads/main.zip
I also have another suspect. The archive plugin. You would have to deactivate it before installing FlatPress. Open the file In your PHP configuration, comment out the time zone and the region as a test. I'm looking forward to your feedback. With best regards |
Hi @Fraenkiman, I hate to say this. But I guess, I am quitting now. Just a plain 503 server side error this time. It feels like hitting a dead end. Thank you once again Frank for all the help that you have provided. |
Notes on server error 503: How to deactivate the PHP immunity of Imunify360Introduction Procedure
References: |
I have tried that. Does not work in my case. The web hosting service provider has sort of hard coded certain things, which the end users cannot change. And they are not very helpful either in sorting this out. And just respond saying use other blog/cms tool like wordpress. Also, there are no issues with Flatpress version 1.2.1. It works fine. So its very difficult for me to conclude if it indeed is Imunify 360 that is creating this trouble. However, this possibility cannot be denied either, since I have no way to access Immunify 360 control panel and make the necessary changes. Just for the sake of information to anyone who is reading is trying to use Flatpress in a shared hosting environment, the service provider in my case is 'simplesonic dot com'. This issue prevails in both of their Cpanel as well as DirectAdmin based hosting services. So I would, as on this date, suggest not to consider them as far as Flatpress hosting is concerned. |
Hello @justrudra, Thank you for your feedback. It's a pity that your shared hosting provider is restricting you so much. I'll attach further documentation for similar cases: After hours of reading, I have the feeling that only the shared web host provider can solve the problem. Perhaps they don't want to solve the problem, but rather encourage you to buy a more expensive product. You can try to downgrade to PHP7.4. Or, if possible, switch to an Apache server. I would consider switching to an Apache server. If you feel you are very close to a solution and need support, please let us know. With best regards |
Thank you @Fraenkiman . |
Hello,
I would like to draw your attention @Fraenkiman and @azett. Its been quite sometime that I have been trying to raise this strange issue that I have been facing in "some" shared hosting environments. I am able to run the setup and the installation happens successfully. After that when I try to go the blog home page, I greeted with a "WHITE SCREEN OF DEATH" on the browser. Now, from a command line terminal, if i use 'curl' to check the code returned, it is always 500 and 503. I mean at times 500 and sometime 503.
The server logs aren't helping much either. Just the generic 500 errors are logged.
To overcome this, I tried to enable the display of php errors on the browser via .htaccess rules. And then there is a plethora of information displayed. Please have a look below :
FP_errors.txt
What is interesting though is, I never find that happening with FP 1.2.1. Everything just runs fine.
By the way, I am not sure if this issue
#386 is the same as the one that I mentioned above.
Also there is a big bloodbath happening between Imunify 360 and Modsecurity rules with prettyurls rules inserted by the prettyurls plugins.. Always triggers the 403 rules. That needs to be looked at as well.
The usage of Apache webserver might have reduced as @Fraenkiman had mentioned in a different thread on prettyurl issues. But what needs to be kept in mind though is that modern shared hosting rig consists of Litepeed server, which is reads the .htaccess file and loads rules form there. And Modsecurity and imunify 360 plugins are active by default on most if not all shared hosting servers. And if this issue is not addressed, it will have a negative impression on people choosing Flatpress are a medium of blog/website, in the long run.
I wish I could help you folks in troubleshooting these issues, but my skills aren't that great beside linux/unix server administration.
The text was updated successfully, but these errors were encountered: