shinsenter / php

📦 Simplified PHP Docker images for effortless customization and extension setup. Our Docker images cover PHP versions from 5.6 to 8.4, available in CLI, ZTS, FPM, FPM/Apache2, FPM/Nginx, RoadRunner, FrankenPHP, and Nginx Unit variants, for both Debian and Alpine versions. Updated everyday.
https://hub.docker.com/r/shinsenter/php
GNU General Public License v3.0
123 stars 27 forks source link

crater deployment can't record a new payment #80

Closed jcollas closed 2 months ago

jcollas commented 2 months ago

When attempting to record a payment, the following errors display:

This is just from going to an invoice and clicking the 'Save Payment' button. This worked correctly less than a month ago.

Screenshot 2024-07-19 at 8 32 55 AM

shinsenter commented 2 months ago

Hi @jcollas

I think this is an issue you need to confirm with the Crater project.

If you have more detailed information, error log or the process to reproduce this error, please let me know. I'm not sure if I can understand Crater, but I will try to figure out the cause.

jcollas commented 2 months ago

I was using the image shinsenter/crater:php8.1-tidy when the error was happening. Do you recommend a different image?

I switched to the shinsenter/crater:php8.1-tidy-deprecated image, which works properly, and is 4 months old. It looks like the crater code hasn't been updated in a year or so (https://github.com/crater-invoice/crater). It appears that there might be some conflict with recent php 8.1 builds and form submissions? Total guess on my part.

To reproduce, just create an invoice in crater, and attempt to record payment. Just click the 'Save Payment' button and you should see the errors shown in the screenshot.

I didn't see anything of note in the logs.

shinsenter commented 2 months ago

@jcollas

I will review and reproduce the issue. In the meantime, please try using the deprecated docker image.

jcollas commented 2 months ago

Will do, and thanks for your quick response.

shinsenter commented 2 months ago

Hello @jcollas

I haven't been able to reproduce the issue you encountered with the Crater container, but I did discover that other containers running phpMyAdmin also had problems writing files to the /tmp directory. I have fixed this issue and updated the new Docker images.

While I haven't been able to replicate your issue, could you please try pulling the new (non-deprecated) Docker images and see if this resolves the issue?

replete commented 2 months ago

Aha, I had a strange issue recently to do with /tmp access that resulted in 500 errors using glide in Statamic. I've been going bananas trying to make sense of it, but it's started working again:

2024-07-19 17:55:07] production.ERROR: tempnam(): file created in the system's temporary directory {"exception":"[object] (ErrorException(code: 0): tempnam(): file created in the system's temporary directory at /var/www/html/vendor/league/glide/src/Server.php:680)
[stacktrace]
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(256): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError()
#1 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}()
#2 /var/www/html/vendor/league/glide/src/Server.php(680): tempnam()
#3 /var/www/html/vendor/statamic/cms/src/Imaging/ImageGenerator.php(259): League\\Glide\\Server->makeImage()
#4 /var/www/html/vendor/statamic/cms/src/Imaging/ImageGenerator.php(167): Statamic\\Imaging\\ImageGenerator->generate()
#5 /var/www/html/vendor/statamic/cms/src/Imaging/ImageGenerator.php(150): Statamic\\Imaging\\ImageGenerator->doGenerateByAsset()
...
jcollas commented 2 months ago

Just checked with the new non-deprecated image, and crater's now working again as expected. Nicely done, thanks,

shinsenter commented 2 months ago

Great! Thank you!