Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Installing #1606

Closed
Kyle9982 opened this issue Aug 12, 2018 · 18 comments
Closed

Not Installing #1606

Kyle9982 opened this issue Aug 12, 2018 · 18 comments
Labels
stale No replies or comments. Will be auto-closed in 14 days.

Comments

@Kyle9982
Copy link

Kyle9982 commented Aug 12, 2018

I am trying to install you program

I keep getting a "Error 500" on my browser

This is what I grabbed from my logs

[2018-08-12 23:36:54] local.ERROR: Class hash does not exist {"exception":"[object] (ReflectionException(code: -1): Class hash does not exist at /var/www/firefly-iii/vendor/laravel/framework/src/Illuminate/Container/Container.php:767)
[stacktrace]
#0 /var/www/firefly-iii/vendor/laravel/framework/src/Illuminate/Container/Container.php(767): ReflectionClass->__construct('hash')
#1 /var/www/firefly-iii/vendor/laravel/framework/src/Illuminate/Container/Container.php(646): Illuminate\Container\Container->build('hash')
#2 /var/www/firefly-iii/vendor/laravel/framework/src/Illuminate/Container/Container.php(601): Illuminate\Container\Container->resolve('hash', Array)
#3 /var/www/firefly-iii/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(734): Illuminate\Container\Container->make('hash', Array)
#4 /var/www/firefly-iii/vendor/laravel/framework/src/Illuminate/Container/Container.php(1210): Illuminate\Foundation\Application->make('hash')
#5 /var/www/firefly-iii/vendor/laravel/framework/src/Illuminate/Auth/CreatesUserProviders.php(82): Illuminate\Container\Container->offsetGet('hash')
#6 /var/www/firefly-iii/vendor/laravel/framework/src/Illuminate/Auth/CreatesUserProviders.php(40): Illuminate\Auth\AuthManager->createEloquentProvider(Array)
#7 /var/www/firefly-iii/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php(121): Illuminate\Auth\AuthManager->createUserProvider('users')
#8 /var/www/firefly-iii/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php(94): Illuminate\Auth\AuthManager->createSessionDriver('web', Array)
#9 /var/www/firefly-iii/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php(68): Illuminate\Auth\AuthManager->resolve('web')
#10 /var/www/firefly-iii/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php(292): Illuminate\Auth\AuthManager->guard()
#11 /var/www/firefly-iii/app/Exceptions/Handler.php(127): Illuminate\Auth\AuthManager->__call('check', Array)
#12 /var/www/firefly-iii/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(314): FireflyIII\Exceptions\Handler->report(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#13 /var/www/firefly-iii/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(122): Illuminate\Foundation\Http\Kernel->reportException(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#14 /var/www/firefly-iii/public/index.php(76): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#15 {main}
"}
What am I doing wrong??

@JC5
Copy link
Member

JC5 commented Aug 13, 2018

I need more info. What system are you installing on? Which step in the guide are you getting this error?

@JC5 JC5 added the question label Aug 13, 2018
@Kyle9982
Copy link
Author

I am running Ubuntu Server 16.04.5 LTS. I have followed every step on your doc website.
I have gotten all the way up to building the database and still no luck on getting anything to load. The root index.php page loads, but when redirected to /public/, that is when I get the Error 500

@Kyle9982
Copy link
Author

Kyle9982 commented Aug 13, 2018

Also, this is my .env file. Is there anything else I am supposed to edit??

APP_ENV=local

APP_DEBUG=false
SITE_OWNER=mail@example.com
APP_KEY=********************************************************************
TZ=UTC
APP_URL=https://www.customcloud.ca/firefly Changed This
TRUSTED_PROXIES=
LOG_CHANNEL=daily
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=firefly-iii Changed This
DB_USERNAME=root Changed This
DB_PASSWORD= ******************* Changed This
APP_LOG=daily
APP_LOG_LEVEL=notice
CACHE_DRIVER=file
SESSION_DRIVER=file
COOKIE_PATH="/"
COOKIE_DOMAIN=
COOKIE_SECURE=false
MAIL_DRIVER=log
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_FROM=changeme@example.com
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAILGUN_DOMAIN=
MAILGUN_SECRET=
MANDRILL_SECRET=
SPARKPOST_SECRET=
SEND_REGISTRATION_MAIL=true
SEND_ERROR_MESSAGE=true
MAPBOX_API_KEY=
FIXER_API_KEY=
ANALYTICS_ID=
USE_ENCRYPTION=true
APP_NAME=FireflyIII
BROADCAST_DRIVER=log
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
CACHE_PREFIX=firefly
SEARCH_RESULT_LIMIT=50
PUSHER_KEY=
PUSHER_SECRET=
PUSHER_ID=
DEMO_USERNAME=
DEMO_PASSWORD=
IS_DOCKER=false
IS_SANDSTORM=false
BUNQ_USE_SANDBOX=false
IS_HEROKU=false
MAILGUN_DOMAIN=
MAILGUN_SECRET=`

@Kyle9982
Copy link
Author

Kyle9982 commented Aug 13, 2018

Sorry to bother, but one more thing.
Here is your code from /public/index.php

$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
!!!!!!!Note: When I add die(); here I get a white page
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
!!!!!!!Note: When I add die(); here I get the error 500
$response->send();

$kernel->terminate($request, $response);

@JC5
Copy link
Member

JC5 commented Aug 14, 2018

Alright, so if it works until the database:

  • You have installed composer
  • You were able to run this command: composer create-project grumpydictator/firefly-iii --no-dev --prefer-dist firefly-iii 4.7.5.3
    -This command breaks: php artisan migrate:refresh --seed.

What is the output of php -v?

@Kyle9982
Copy link
Author

kyle@CUSTOMCLOUD:~$ php -v
PHP 7.2.8-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jul 25 2018 10:51:50) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.8-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

kyle@CUSTOMCLOUD:~$ composer
Composer version 1.7.1 2018-08-07 09:39:23

Here is my command console output from start to finish

kyle@CUSTOMCLOUD:/var/www$ composer create-project grumpydictator/firefly-iii -- no-dev --prefer-dist firefly-iii 4.7.5.3
Cannot create cache directory /home/kyle/.composer/cache/repo/https---repo.packa gist.org/, or directory is not writable. Proceeding without cache
Installing grumpydictator/firefly-iii (4.7.5.3)
Cannot create cache directory /home/kyle/.composer/cache/files/, or directory is not writable. Proceeding without cache

  • Installing grumpydictator/firefly-iii (4.7.5.3): Downloading (100%)
    Created project in firefly-iii
    Cannot create cache directory /home/kyle/.composer/cache/repo/https---repo.packa gist.org/, or directory is not writable. Proceeding without cache
    Cannot create cache directory /home/kyle/.composer/cache/files/, or directory is not writable. Proceeding without cache

@php -r "file_exists('.env') || copy('.env.example', '.env');"
@php -r "if (!(getenv('DYNO'))===false){file_exists('.env') || copy('.env.hero ku', '.env');}"
Loading composer repositories with package information
Installing dependencies from lock file
Package operations: 62 installs, 0 updates, 0 removals

  • Installing bacon/bacon-qr-code (1.0.3): Downloading (100%)
  • Installing psr/http-message (1.0.1): Downloading (100%)
  • Installing guzzlehttp/psr7 (1.4.2): Downloading (100%)
  • Installing guzzlehttp/promises (v1.3.1): Downloading (100%)
  • Installing guzzlehttp/guzzle (6.3.3): Downloading (100%)
  • Installing bunq/sdk_php (dev-master 8c1faef): Downloading (100%)
  • Installing vlucas/phpdotenv (v2.5.0): Downloading (100%)
  • Installing symfony/css-selector (v4.1.2): Downloading (100%)
  • Installing tijsverkoyen/css-to-inline-styles (2.2.1): Downloading (100%)
  • Installing symfony/polyfill-php72 (v1.8.0): Downloading (100%)
  • Installing symfony/polyfill-mbstring (v1.8.0): Downloading (100%)
  • Installing symfony/var-dumper (v4.1.2): Downloading (100%)
  • Installing symfony/routing (v4.1.2): Downloading (100%)
  • Installing symfony/process (v4.1.2): Downloading (100%)
  • Installing symfony/polyfill-ctype (v1.8.0): Downloading (100%)
  • Installing symfony/http-foundation (v4.1.2): Downloading (100%)
  • Installing symfony/event-dispatcher (v4.1.2): Downloading (100%)
  • Installing psr/log (1.0.2): Downloading (100%)
  • Installing symfony/debug (v4.1.2): Downloading (100%)
  • Installing symfony/http-kernel (v4.1.2): Downloading (100%)
  • Installing symfony/finder (v4.1.2): Downloading (100%)
  • Installing symfony/console (v4.1.2): Downloading (100%)
  • Installing doctrine/lexer (v1.0.1): Downloading (100%)
  • Installing egulias/email-validator (2.1.4): Downloading (100%)
  • Installing swiftmailer/swiftmailer (v6.1.2): Downloading (100%)
  • Installing paragonie/random_compat (v2.0.17): Downloading (100%)
  • Installing ramsey/uuid (3.8.0): Downloading (100%)
  • Installing psr/simple-cache (1.0.1): Downloading (100%)
  • Installing psr/container (1.0.0): Downloading (100%)
  • Installing symfony/translation (v4.1.2): Downloading (100%)
  • Installing nesbot/carbon (1.25.0): Downloading (100%)
  • Installing monolog/monolog (1.23.0): Downloading (100%)
  • Installing league/flysystem (1.0.45): Downloading (100%)
  • Installing erusev/parsedown (1.7.1): Downloading (100%)
  • Installing dragonmantank/cron-expression (v2.2.0): Downloading (100%)
  • Installing doctrine/inflector (v1.3.0): Downloading (100%)
  • Installing laravel/framework (v5.6.29): Downloading (100%)
  • Installing davejamesmiller/laravel-breadcrumbs (5.1.0): Downloading (100%)
  • Installing doctrine/event-manager (v1.0.0): Downloading (100%)
  • Installing doctrine/cache (v1.7.1): Downloading (100%)
  • Installing doctrine/dbal (v2.8.0): Downloading (100%)
  • Installing fideloper/proxy (4.0.0): Downloading (100%)
  • Installing zendframework/zend-diactoros (1.8.3): Downloading (100%)
  • Installing symfony/psr-http-message-bridge (v1.0.2): Downloading (100%)
  • Installing phpseclib/phpseclib (2.0.11): Downloading (100%)
  • Installing league/event (2.1.2): Downloading (100%)
  • Installing lcobucci/jwt (3.2.2): Downloading (100%)
  • Installing defuse/php-encryption (v2.2.1): Downloading (100%)
  • Installing league/oauth2-server (6.1.1): Downloading (100%)
  • Installing firebase/php-jwt (v5.0.0): Downloading (100%)
  • Installing laravel/passport (v5.0.3): Downloading (100%)
  • Installing laravelcollective/html (v5.6.10): Downloading (100%)
  • Installing league/commonmark (0.17.5): Downloading (100%)
  • Installing league/csv (9.1.4): Downloading (100%)
  • Installing league/fractal (0.17.0): Downloading (100%)
  • Installing paragonie/constant_time_encoding (v2.2.2): Downloading (100%)
  • Installing symfony/polyfill-util (v1.8.0): Downloading (100%)
  • Installing symfony/polyfill-php56 (v1.8.0): Downloading (100%)
  • Installing pragmarx/google2fa (v3.0.1): Downloading (100%)
  • Installing pragmarx/google2fa-laravel (v0.2.0): Downloading (100%)
  • Installing twig/twig (v1.35.4): Downloading (100%)
  • Installing rcrowe/twigbridge (v0.9.6): Downloading (100%)
    Generating optimized autoload files

Illuminate\Foundation\ComposerScripts::postAutoloadDump
php artisan firefly:instructions install
+------------------------------------------------------------------------------+
| |
| Thank you for installing Firefly III, v4.7.5.3! |
| |
| |
+------------------------------------------------------------------------------+
@php artisan key:generate
Application key ******************************************************************** set successfully.
kyle@CUSTOMCLOUD:/var/www$ vi firefly-iii/.env
kyle@CUSTOMCLOUD:/var/www$ php artisan migrate:refresh --seed
Could not open input file: artisan
kyle@CUSTOMCLOUD:/var/www$ cd firefly-iii
kyle@CUSTOMCLOUD:/var/www/firefly-iii$ php artisan migrate:refresh --seed
Migration table not found.
Migration table created successfully.
Migrating: 2016_06_16_000000_create_support_tables
Migrated: 2016_06_16_000000_create_support_tables
Migrating: 2016_06_16_000001_create_users_table
Migrated: 2016_06_16_000001_create_users_table
Migrating: 2016_06_16_000002_create_main_tables
Migrated: 2016_06_16_000002_create_main_tables
Migrating: 2016_08_25_091522_changes_for_3101
Migrated: 2016_08_25_091522_changes_for_3101
Migrating: 2016_09_12_121359_fix_nullables
Migrated: 2016_09_12_121359_fix_nullables
Migrating: 2016_10_09_150037_expand_transactions_table
Migrated: 2016_10_09_150037_expand_transactions_table
Migrating: 2016_10_22_075804_changes_for_v410
Migrated: 2016_10_22_075804_changes_for_v410
Migrating: 2016_11_24_210552_changes_for_v420
Migrated: 2016_11_24_210552_changes_for_v420
Migrating: 2016_12_22_150431_changes_for_v430
Migrated: 2016_12_22_150431_changes_for_v430
Migrating: 2016_12_28_203205_changes_for_v431
Migrated: 2016_12_28_203205_changes_for_v431
Migrating: 2017_04_13_163623_changes_for_v440
Migrated: 2017_04_13_163623_changes_for_v440
Migrating: 2017_06_02_105232_changes_for_v450
Migrated: 2017_06_02_105232_changes_for_v450
Migrating: 2017_08_20_062014_changes_for_v470
Migrated: 2017_08_20_062014_changes_for_v470
Migrating: 2017_11_04_170844_changes_for_v470a
Migrated: 2017_11_04_170844_changes_for_v470a
Migrating: 2018_01_01_000001_create_oauth_auth_codes_table
Migrated: 2018_01_01_000001_create_oauth_auth_codes_table
Migrating: 2018_01_01_000002_create_oauth_access_tokens_table
Migrated: 2018_01_01_000002_create_oauth_access_tokens_table
Migrating: 2018_01_01_000003_create_oauth_refresh_tokens_table
Migrated: 2018_01_01_000003_create_oauth_refresh_tokens_table
Migrating: 2018_01_01_000004_create_oauth_clients_table
Migrated: 2018_01_01_000004_create_oauth_clients_table
Migrating: 2018_01_01_000005_create_oauth_personal_access_clients_table
Migrated: 2018_01_01_000005_create_oauth_personal_access_clients_table
Migrating: 2018_03_19_141348_changes_for_v472
Migrated: 2018_03_19_141348_changes_for_v472
Migrating: 2018_04_07_210913_changes_for_v473
Migrated: 2018_04_07_210913_changes_for_v473
Migrating: 2018_04_29_174524_changes_for_v474
Migrated: 2018_04_29_174524_changes_for_v474
Migrating: 2018_06_08_200526_changes_for_v475
Migrated: 2018_06_08_200526_changes_for_v475
Seeding: AccountTypeSeeder
Seeding: TransactionCurrencySeeder
Seeding: TransactionTypeSeeder
Seeding: PermissionSeeder
Seeding: LinkTypeSeeder
Seeding: ConfigSeeder
kyle@CUSTOMCLOUD:/var/www/firefly-iii$ php artisan firefly:upgrade-database
Updating currency information..
Done updating currency information..
Firefly III database is up to date.
kyle@CUSTOMCLOUD:/var/www/firefly-iii$ php artisan firefly:verify
No orphaned transactions!
No orphaned journals!
All link types OK!
All access tokens OK!
Amount integrity OK!
kyle@CUSTOMCLOUD:/var/www/firefly-iii$ php artisan passport:install
Encryption keys generated successfully.
Personal access client created successfully.
Client ID: 1
Client Secret: ***************************************************
Password grant client created successfully.
Client ID: 2
Client Secret: ******************************************************
kyle@CUSTOMCLOUD:/var/www/firefly-iii$

@JC5
Copy link
Member

JC5 commented Aug 14, 2018

Alright that's very strange. Everything seems to work OK, up to the passport clients and everything.

And the web page still gives a 500 error with the error related to "hash"?

Could you verify that Apache is also using PHP7.2, by putting the following content in /public/pi.php?

<?php
phpinfo();

Then browse to /pi.php.

It's rare, but it happens that these two versions are different.

@Kyle9982
Copy link
Author

https://www.customcloud.ca/firefly/pi.php

Go ahead and check it out

@JC5
Copy link
Member

JC5 commented Aug 14, 2018

Found the problem. Apache is configured to use PHP7.0, while your command line is using PHP7.2.

I think you (still) have an installation of PHP7.0 linked to Apache. Checkout the configuration files for Apache on how to change this.

I guess there's a reference to /etc/php/7.0 somewhere.

@Kyle9982
Copy link
Author

Still running across the issue here. Any other suggestions

@JC5
Copy link
Member

JC5 commented Aug 14, 2018

Nope, sorry. If this is still giving you problems, I'm pretty much out of ideas ☹️

@Kyle9982
Copy link
Author

I got a new error

[2018-08-14 15:14:08] local.WARNING: No database version entry is present. Database is assumed to be OLD (version 1).

@Kyle9982
Copy link
Author

Now when I load the page it redirects me too /login. And says that the page can not be found

@JC5
Copy link
Member

JC5 commented Aug 14, 2018

That's a good sign! Try sudo a2enmod rewrite and then sudo service apache2 restart.

@Kyle9982
Copy link
Author

THANK YOU!!!!!

In addition I realised the permissions were set to my user "kyle", so I changed them to "www-data"

And added the following to my apache2 configuration

<Directory "/var/www/html/firefly-iii">
Allowoverride ALL

@Kyle9982
Copy link
Author

One last thing. Where can I donate :)

@JC5
Copy link
Member

JC5 commented Aug 14, 2018

😁 I'm glad to see it works!

You can donate through PayPal 👍 😁

@stale
Copy link

stale bot commented Aug 28, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No replies or comments. Will be auto-closed in 14 days. label Aug 28, 2018
@JC5 JC5 closed this as completed Sep 1, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale No replies or comments. Will be auto-closed in 14 days.
Projects
None yet
Development

No branches or pull requests

2 participants