Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

cpanel install stuck at database setup

Rs   ( User )

Commented 1 year ago

Hi all

I am trying to deploy new install via cpanel and installed all dependencies required. I am at second screen to install database information but the setup never moves to next screen. The green button is forever loading.
There are no errors otherwise shown.

Any help is much appreciated.

Talha Mujahid   ( User )

Commented 1 year ago

This is not actually a bug as I figured it out this problem.
I want to just go through the problem before giving workaround. (if you are not interested in getting complete problem, just go last line)
The problem is:
the route of database installation file is
Route::post('database', 'Install\Database@store');
it calls the method store form Install\Database controller. which contains following line of code for creating and population some of the tables using seeder.
!Installer::createDbTables($host, $port, $database, $username, $password)
In Installer facade, createDbTables method contain this line of code for seeding of permission table.
Artisan::call('db:seed', ['--class' => 'Database\Seeds\Permissions', '--force' => true]);
if you comment it out this line of code in Installer facade, your problem will be resolved but seeding of permission tables is also important.
So now we look at the problem which causes this line of code erroneous.
Actually, according to default configuration of akaunting, application is in production mood. So production mood does not allow you to run seeding command inside code (you may run it from artisan console therefore when you install using console, installation phase works fine) and in production envrionment, laravel does not expose information which causes bug. So in result, your application stuck at this route (/install/database).
So simple solution is that change APP_ENV=production this to APP_ENV=development in .env.example file at parent directory if this file is not present make changes in .env file.

Please login or register to leave a response.

Showing 1 to 2 of 2 discussions