ImpressCMS / impresscms

A multilingual, extensible, community oriented CMS developed in PHP
https://www.impresscms.org
Other
27 stars 35 forks source link

Unable to install - data type error in database setup #1158

Closed fiammybe closed 2 years ago

fiammybe commented 2 years ago

Describe the bug

I have the following error when configuring the db connection (page_dbconnection.php) : Fatal error: Uncaught TypeError: strtolower() expects parameter 1 to be string, int given in /home/icmsdev/domains/impresscms.dev/vendor/phpexperts/laravel-env-polyfill/src/env-shim.php:47 Stack trace: #0 /home/icmsdev/domains/impresscms.dev/vendor/phpexperts/laravel-env-polyfill/src/env-shim.php(47): strtolower(0) #1 /home/icmsdev/domains/impresscms.dev/vendor/phpexperts/laravel-env-polyfill/src/env-shim.php(90): AAutoloadFirst\PHPExperts\env('DB_PCONNECT', 0) #2 /home/icmsdev/domains/impresscms.dev/core/Providers/DatabaseServiceProvider.php(42): env('DB_PCONNECT', 0) #3 [internal function]: ImpressCMS\Core\Providers\DatabaseServiceProvider->ImpressCMS\Core\Providers\{closure}() #4 /home/icmsdev/domains/impresscms.dev/vendor/league/container/src/Definition/Definition.php(239): call_user_func_array(Object(Closure), Array) #5 /home/icmsdev/domains/impresscms.dev/vendor/league/container/src/Definition/Definition.php(198): League\Container\Definition\Definition->resolveCallable(Object(Closure)) #6 /home/icmsdev/domains/impre in /home/icmsdev/domains/impresscms.dev/vendor/phpexperts/laravel-env-polyfill/src/env-shim.php on line 47

To Reproduce

Steps to reproduce the behavior:

  1. Install your site
  2. When on he page_dbconnection.php, insert your database info
  3. click 'next'
  4. See error

Expected behavior

Going to the next page of the installer

Server

Additional context

latest code as of 8 feb 2022

fiammybe commented 2 years ago

@MekDrop could you have a look at this one please?

MekDrop commented 2 years ago

I will but I can't promise ASAP for right now.

fiammybe commented 2 years ago

sure, no problem!

Nokline commented 2 years ago

still an issue, can't set up the database properly... Was able to fix by removing strtolower in vendor/phpexperts/laravel-env-polyfill/src/env-shim.php line 47. Just a temporary fix to get it working for me... Hopefully I won't run into any more errors in the future...

MekDrop commented 2 years ago

Thanks @Nokline for the idea!

And sorry for the delay. Some real live things prevented me to look faster into.

I created a pull request to this lib repo and I hope everything will soon be ok.