CodeIgniter Forums
Setup error with Psr\\Log package - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forum-30.html)
+--- Thread: Setup error with Psr\\Log package (/thread-68125.html)



Setup error with Psr\\Log package - Kaosweaver - 05-29-2017

Downloaded the latest this morning, copied it over to the server and ran it, got the Whoops page, checked the logs, found this:
Code:
[Mon May 29 14:31:46.307201 2017] AH01215: PHP Fatal error:  Interface 'Psr\\Log\\LoggerInterface' not found in /***mypath***/system/Log/Logger.php on line 55: /usr/local/cpanel/cgi-sys/ea-php70

Best I can figure out searching online is that I don't have the Psr\Log package installed, which I believe is a PHP package (and not an Apache one). My "easyApache4" setup doesn't give me options to select anything remotely connected to the package name.

Pointers in the right direction to resolve this?


RE: Setup error with Psr\\Log package - kilishan - 05-29-2017

That was my fault. I commented out too many lines in system/Config/AutloadConfig.php, which removed the classmap items letting it know about the location of the Logger classes. Should work now.


RE: Setup error with Psr\\Log package - WitekS - 05-29-2017

I have the same error on 3 different configurations
Code:
[Mon May 29 19:06:50.732166 2017] [php7:error] [pid 11572:tid 1292] [client 127.0.0.1:50241] PHP Fatal error:  
Interface 'Psr\\Log\\LoggerInterface' not found in C:\\**my_path**\\ci4app\\system\\Log\\Logger.php on line 55
I have a virtualhost but it probably does not matter ...
Code:
<VirtualHost ci4app:80>
 ServerName ci4app
# SetEnv CI_ENV development
  DocumentRoot "C:/**my_path**/ci4app/public"
<Directory "C:/**my_path**/ci4app/public">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
   ErrorLog "C:/**my_path**/ci4app/writable/logs/error.log"
   CustomLog "C:/**my_path**/ci4app/writable/logs/access.log" common
</VirtualHost>
You may need to set something in /Config/Logger.php