Problems, need help? Have a tip or advice? Post it here.
7 posts Page 1 of 1
Hi,

I switch on the error reporting from php.
Because we had a lot of problems with PHP8.
The customer can't upload images if the server is switched to PHPH8. Is Couch PHP8 comform?
It looks like if I take a sneek in the github commits.

But also if I switch back to PHP 7.3 I got theese warnings:
Warning: A non-numeric value encountered in /homepages/19/d369792635/htdocs/website/couch/functions.php on line 3022
Warning: A non-numeric value encountered in /homepages/19/d369792635/htdocs/website/couch/functions.php on line 3023
Warning: A non-numeric value encountered in /homepages/19/d369792635/htdocs/website/couch/functions.php on line 3024
Warning: Division by zero in /homepages/19/d369792635/htdocs/website/couch/functions.php on line 3024


Is there a possibility to get it proper work on PHP8?
I use Couch 2.3.

Cheers
Update your Couch codebase → the line 3024 is actually an empty line (Division by zero cannot happen there obviously):

Screenshot-2022-07-14-142247.805.png
Screenshot-2022-07-14-142247.805.png (9.08 KiB) Viewed 1482 times

btw, we are running PHP 7.3, 7.4 without a single Notice, Warning or Error.

Do you have any custom PHP code in kfunctions.php files or inside <cms:php> blocks?

EDIT: Line 53 in header.php says about your current build (there are a few builds within the major version). Current is 20220611 ← check that as well and update Couch if not matched.

Screenshot-2022-07-14-143419.371.png
Screenshot-2022-07-14-143419.371.png (5.91 KiB) Viewed 1479 times
Hi,
oh yes it was under Couch 2.2.1. Sorry my mistake.
I have updatet Couch after I saved the warnings.

But on PHP8 there are a lot of Warnings:
https://pastebin.com/7r9f4Hzs

And in kfunctions we have disabled the commend in the line
Code: Select all
require_once( K_COUCH_DIR.'addons/inline/inline.php' );


Cheers
No problem :)

Warnings of PHP8 will take time to resolve, but it shouldn't be a problem for a website or admin-panel right now. Disabling warnings and notices is common practice for production (and even dev.) servers.

I am sure @KK is grateful for your report ;)

KDJFS wrote: Hi,
oh yes it was under Couch 2.2.1. Sorry my mistake.
I have updatet Couch after I saved the warnings.

But on PHP8 there are a lot of Warnings:
https://pastebin.com/7r9f4Hzs

And in kfunctions we have disabled the commend in the line
Code: Select all
require_once( K_COUCH_DIR.'addons/inline/inline.php' );


Cheers
Hi,

The latest version of Couch on GitHub suppresses all warnings - couch/header.php begins with doing so -
Code: Select all
    if( defined('E_STRICT') ){
        error_reporting(E_ALL & ~(E_NOTICE | E_STRICT | E_WARNING | E_DEPRECATED)); // Report all errors except notices and strict standard warnings
    }

Please check if the couch/header.php on your installation matches this; if not, please update.
Let us know. Thanks.
Hi,
Yes normally I would also say its not really relevant.
But my customer says it can't upload images after my switch. So it thewarnings are all I can think of.

Cheers
So with PHP8 on your dev. setup you could not recreate the 'uploading' problem the customer experiences?

I am downloading a new environment with PHP8, but even that would be not helpful without knowing where to look exactly (and which steps generate a failure to upload).

KDJFS wrote: Hi,
Yes normally I would also say its not really relevant.
But my customer says it can't upload images after my switch. So it thewarnings are all I can think of.

Cheers
7 posts Page 1 of 1