Welcome Guest, Not a member yet? Register   Sign In
CLI Error
#1

Hi,

I just installed a fresh copy of CI4 using the Composer App Starter package.

I then attempted to install CI Shield via composer which works fine up to running the command

Code:
php spark shield:setup

I then get the following error:

Code:
CodeIgniter v4.5.1 Command Line Tool - Server Time: 2024-05-17 17:15:38 UTC+01:00

PHP 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 /home/development/vendor/codeigniter4/framework/system/Log/Logger.php on line 162

I tried deleting the vendor folder and composer.lock file and installing again but the problem persists.

Not had this issue before and I have installed the App Starter and Shield lots of time.

Luke
Reply
#2

https://forum.codeigniter.com/showthread...ght=Psrext
Simple CI 4 project for beginners codeigniter-expenses
Reply
#3

(This post was last modified: 05-20-2024, 07:18 AM by ltarrant.)

Hi,

Thanks for the quick response. I got the server admin to remove the PSR extension which has solved that error. However, I am now getting a 500 Internal Server Error message.

Code:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.


Nothing in server error log or CI log folder to help me track down the issue.

Tried a fresh Composer App Starter install and same issue. I have instances of CI 4.4.8 running on the same server without any issues so I assume there is some other incompatibility with the server environment with 3.5.1
However, without any error messages its difficult to know where to start.
Reply
#4

If you don't see the error, how can we help you? 

Check other configuration methods from the documentation. There may be problems with chmod, mod_rewrite, env, ...  Try to check other intl, rewrite extensions, composer dependecies..
Simple CI 4 project for beginners codeigniter-expenses
Reply
#5

(05-20-2024, 07:17 AM)ltarrant Wrote: Hi,

Thanks for the quick response. I got the server admin to remove the PSR extension which has solved that error. However, I am now getting a 500 Internal Server Error message.

Code:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.


Nothing in server error log or CI log folder to help me track down the issue.

Tried a fresh Composer App Starter install and same issue. I have instances of CI 4.4.8 running on the same server without any issues so I assume there is some other incompatibility with the server environment with 3.5.1
However, without any error messages it’s difficult to know where to start.

When you say you tried a fresh appstarter, did you modify it at all fore trying? The 500 Error usually indicates a problem in the php code. If you added or changed anything, the issue probably lies in that code.
Reply
#6

(This post was last modified: 05-22-2024, 03:35 AM by ltarrant.)

It was a fresh untouched App Starter.

Turns out this was some kind of server config issue. I deleted the domain and recreated in cPanel and everything worked fine.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB