Pls help me for the initial setup of Cakephp 4.3

Pls help me for the initial setup of Cakephp 4.3.
I have just one table usrs, connected by Postgres, with the fields id, created and modified, that have the structure of timestamp without time zone and the value ‘2021-12-31 00:00:00’.
Which settings i have to make to don’t reveive the error.

2022-01-02 13:08:57 error: [Exception] DateTimeImmutable::__construct(): Failed to parse time string (31/12/2021 00:00:00) at position 0 (3): Unexpected character in /var/www/crm43.hecamga.it/vendor/cakephp/chronos/src/Chronos.php on line 109
Stack Trace:

  • /var/www/crm43.hecamga.it/vendor/cakephp/chronos/src/Chronos.php:109
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/I18n/FrozenTime.php:141
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Database/Type/DateTimeType.php:294
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Database/FieldTypeConverter.php:134
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Database/Statement/CallbackStatement.php:63
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/ORM/ResultSet.php:447
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/ORM/ResultSet.php:261
  • /var/www/crm43.hecamga.it/templates/Usrs/index.php:12
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/View/View.php:1181
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/View/View.php:1138
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/View/View.php:769
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Controller/Controller.php:762
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Controller/Controller.php:548
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php:140
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php:115
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Http/BaseApplication.php:317
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Http/Runner.php:77
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Http/Runner.php:77
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php:174
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Http/Runner.php:73
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Http/Runner.php:58
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php:167
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Http/Runner.php:73
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php:68
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Http/Runner.php:73
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php:126
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Http/Runner.php:73
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Http/Runner.php:58
  • /var/www/crm43.hecamga.it/vendor/cakephp/cakephp/src/Http/Server.php:90
  • /var/www/crm43.hecamga.it/webroot/index.php:40

Thanks in advance for your help

First thing, most important, turn off debugging on your live site!!
https://crm43.hecamga.it/
That has potential security weaknesses.
If you really must, then in your config/app_local.php change the ‘debug’ => value to

return [
...
  'debug' => filter_input(INPUT_SERVER, 'REMOTE_ADDR') === 'your.ip.goes.here'),
...

Next, it’s trying to parse the string 31/12/2021 00:00:00 - are you sure you’ve set the date format to dd/mm/yyyy ?
Again in config/app_local.php check your value for this: -

return [ 
...
    'App' => [
        'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_Aus'),
        'defaultTimezone' => env('APP_DEFAULT_TIMEZONE', 'Australia/Brisbane')
    ], 
...

Which is what I use for d/m/y here in Australia Brisbane.

Not sure if that will fix it, but doesn’t hurt to check those.

thank you for your help.
in `config/app_local.php i set this
‘App’ => [
‘defaultLocale’ => env(‘APP_DEFAULT_LOCALE’, ‘it_IT’),
‘defaultTimezone’ => env(‘APP_DEFAULT_TIMEZONE’, ‘Europe/Rome’),
]

Don’t forget to turn debugging off for everyone else but you - there is the definite risk of losing your whole site to hackers - there are means of remote execution if not just theft of credentials. I just checked and debugging is still on.

yes, debug is on, just to solve the error by somebody. I try this a lot of times, but nobody has a solution on this.

What I am saying is yes have debugging on, but only for you!

ok, now, how we can solve the basic problem with the time if nothing is showed ?

Did you put your actual WAN IP in that quoted string 'your.ip.goes.here'? That is only a placeholder for your external (ISP generated) IP - as displayed here: https://whatismyipaddress.com/

yes, but, i write on the top that this is just a test,
I have just one table usrs, connected by Postgres, with the fields id, created and modified, that have the structure of timestamp without time zone and the value ‘2021-12-31 00:00:00’.
with only 2 records.
So, no production server there, and also debug can be enabled to help someone to solve my problem.

if is possible, do you have a solution for my initial problem, or just for the debug in a test environment?

While debug was public I saw the same error message as you. I don’t know enough Cake to guess what could have raised it, especially without any source code.