fatal logger emergency |
a clean install of 4.5.1 runs perfectly on my local system but when i copy it to the remote it crashes immediately. both systems are using php8.1
a similar application running on the same host but using 4.3.3 runs perfectly PHP Code: Fatal error: Declaration of CodeIgniter\Log\Logger::emergency(Stringable|string $message, array $context = []): void must be compatible with PsrExt\Log\LoggerInterface::emergency($message, array $context = []) in /var/www/vhosts/53/149679/webspace/siteapps/vendor/codeigniter4/framework/system/Log/Logger.php on line 162 many thnaks for any help, Bill
so i just came across this thread which is the same problem https://forum.codeigniter.com/showthread.php?tid=90682
Kenjis wrote "remove the extension, it is outdated" and gave a link to github but the link is for installing. there was no answer to the final question "how do i remove it?" can somebody PLEASE tell me how to cure the fault? I'm completely stuck thanks Bill
Remove the line in your php.ini:
extension=psr.so
It's ok, sometimes (all too often) my mind goes into a spin and I can't see the wood for the trees. I finally realised what you meant was not removing something from the cig installation but changing the server setup. It's working fine on my local computer but not on the remote and that is not under my control. They've told me if I move the hosting to one of their newer computers the problem will go away so I'll do today.
Thanks for the help Bill
I spent hours trying to solve this issue. its was a pain.
please remove the PSR extension you installed , even if you didn't install it manually, just remove it sudo apt remove php8.2-psr sudo systemctl reload apache2.service just remove the extension for the version of php you are running, then reload apache or your webserver
06-13-2024, 02:15 AM
(This post was last modified: 06-13-2024, 02:18 AM by JustJohnQ. Edit Reason: Additional info )
I have the same problem when upgrading 4.4.8 to 4.5.0 on Windows ssytem running WAMP. PHP version is 8.3.8.
I replaced the SYSTEM folder and replaced both public\index.php and spark. There is no sign of a psr extesion in php.ini. What else could be wrong? A fresh installation of CI 4.5.1 runs without problems on the same system. (06-13-2024, 02:15 AM)JustJohnQ Wrote: A fresh installation of CI 4.5.1 runs without problems on the same system. If v4.5.1 works, you never have installed the PSR extension. So the error message would be a bit different. If you have installed "psr/log" v1 with Composer, you would probably get similar error.
Thanks kenjis. I (manually) updated the vendor\psr\log\ to the latest version and the error messages are gone now.
|
Welcome Guest, Not a member yet? Register Sign In |