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

Installation issue #119

Closed
RonaldvanMeer opened this issue Nov 16, 2015 · 13 comments
Closed

Installation issue #119

RonaldvanMeer opened this issue Nov 16, 2015 · 13 comments

Comments

@RonaldvanMeer
Copy link
Contributor

I've clean installed Firefly-iii on 2 different machines.
1 virtual
1 dedicated

both with the same setup:
Debian (latest version 8.2)
Apache2 (latest version)
MySQL (latest version)
PHP5 (latest version) (including dependant modules)
Composer (latest version)
phpmyadmin (latest version -> runs correctly)
I followed the Installation manual.
All went well until i Try to open FireFly-iii via web on another machine.

I get a 404 as result.
In the apache log files I can pin-point the problem. Lavarel cannot create / open the log file inside the "storage" folder. => Strange due to the fact I followed the 'chmod'-command like provided in the installation manual.
I figured, lets try some else -> 'chmod 777 -R /var/www/firefly-iii/storage' this has no effect.
then 'chmod 777 -R /var/www/firefly-iii' this also has no effect
lastly i tried 'chmod 777 -R /var/www' no effect either.

I'm running low on ideas how to set correct settings chmod & apache2 conf to get the system working... Can you give me some directions where to look / try some other things?

@PeterFour
Copy link

I remember having trouble with the storage folder and to setup Permission I used those command :

HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\  -f1`
sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX storage
sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX storage

@JC5
Copy link
Member

JC5 commented Nov 22, 2015

I know, it's annoying. I haven't set it up correctly myself, I must admit.

If chmod -R 777 has no effect then something else is going on. Make sure that the user that's running Apache (usually www-data, I think) is also the owner of www.

@RonaldvanMeer
Copy link
Contributor Author

Dear all ;)

@PeterFour i've tried your commands, it did not work.
@JC5 if done chown -R www-data on the root folder of firefly-iii

my settings:
/var/www/firefly-iii/

Apache2 => /etc/apache2/conf-enabled/firefly-iii.conf

'
Alias /firefly-iii /var/www/firefly-iii/public
<Directory /var/www/firefly-iii/public>
Options FollowSymLinks
DirectoryIndex index.php

AssignUserId www-data www-data '

i've tried with and without the mpm_itk_module, both no result...
Any other ideas?
can you tell me your setup? (os, www server etc)

@incomer
Copy link

incomer commented Nov 23, 2015

I've got the exact problem too.

This is the error in my log:
[Mon Nov 23 22:09:32.208315 2015] [:error] [pid 6463] [client 192.168.xx.xx:36488] PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/fireflies2/storage/logs/laravel-2015-11-23.log$
[Mon Nov 23 22:13:16.496068 2015] [mpm_prefork:notice] [pid 6458] AH00169: caught SIGTERM, shutting down

@JC5
Copy link
Member

JC5 commented Nov 24, 2015

Could you post the rest of the sentence? After the $, there should be more text.

@incomer
Copy link

incomer commented Nov 24, 2015

There is no extra information stored in the error.log, i have copied the whole error.

I get now a page, but the page says "Whoops, looks like something went wrong."

image

@JC5
Copy link
Member

JC5 commented Nov 24, 2015

It's just that the line should NOT end with a $. There should be more. Do a cat <logfilename>.

Open .env and change debug=false to debug=true.

@RonaldvanMeer
Copy link
Contributor Author

I've done some thing else.
Instead of the default /var/www folder i've now used a USB drive and mapped Apache2 to serve firefly-iii from there.
i got the following lavarel error:

[2015-11-26 17:24:42] production.ERROR: exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'owner' for key 'roles_name_unique'' in /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Connection.php:381
Stack trace:
0 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Connection.php(381): PDOStatement->execute(Array)
1 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Connection.php(629): Illuminate\Database\Connection->Illuminate\Database{closure}(Object(Illuminate\Database\MySqlConnection), 'insert into ro...', Array) 2 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Connection.php(596): Illuminate\Database\Connection->runQueryCallback('insert intoro...', Array, Object(Closure))
3 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Connection.php(382): Illuminate\Database\Connection->run('insert into ro...', Array, Object(Closure)) 4 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Connection.php(338): Illuminate\Database\Connection->statement('insert intoro...', Array)
5 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\Database\Connection->insert('insert into ro...', Array) 6 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(1756): Illuminate\Database\Query\Processors\Processor->processInsertGetId(Object(Illuminate\Database\Query\Builder), 'insert intoro...', Array, 'id')
7 [internal function]: Illuminate\Database\Query\Builder->insertGetId(Array, 'id')
8 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(941): call_user_func_array(Array, Array)
9 /media/usb/wwwroot/bootstrap/cache/compiled.php(10081): Illuminate\Database\Eloquent\Builder->__call('insertGetId', Array)
10 /media/usb/wwwroot/bootstrap/cache/compiled.php(10081): Illuminate\Database\Eloquent\Builder->insertGetId(Array, 'id')
11 /media/usb/wwwroot/bootstrap/cache/compiled.php(10070): Illuminate\Database\Eloquent\Model->insertAndSetId(Object(Illuminate\Database\Eloquent\Builder), Array)
12 /media/usb/wwwroot/bootstrap/cache/compiled.php(10027): Illuminate\Database\Eloquent\Model->performInsert(Object(Illuminate\Database\Eloquent\Builder), Array)
13 /media/usb/wwwroot/database/seeds/PermissionSeeder.php(17): Illuminate\Database\Eloquent\Model->save()
14 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Seeder.php(42): PermissionSeeder->run()
15 /media/usb/wwwroot/database/seeds/DatabaseSeeder.php(23): Illuminate\Database\Seeder->call('PermissionSeede...')
16 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php(61): DatabaseSeeder->run()
17 [internal function]: Illuminate\Database\Console\Seeds\SeedCommand->fire()
18 /media/usb/wwwroot/bootstrap/cache/compiled.php(966): call_user_func_array(Array, Array)
19 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Console/Command.php(150): Illuminate\Container\Container->call(Array)
20 /media/usb/wwwroot/vendor/symfony/console/Command/Command.php(259): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
21 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
22 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Console/Command.php(166): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
23 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(87): Illuminate\Console\Command->call('db:seed', Array)
24 [internal function]: Illuminate\Database\Console\Migrations\MigrateCommand->fire()
25 /media/usb/wwwroot/bootstrap/cache/compiled.php(966): call_user_func_array(Array, Array)
26 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Console/Command.php(150): Illuminate\Container\Container->call(Array)
27 /media/usb/wwwroot/vendor/symfony/console/Command/Command.php(259): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
28 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
29 /media/usb/wwwroot/vendor/symfony/console/Application.php(878): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
30 /media/usb/wwwroot/vendor/symfony/console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Database\Console\Migrations\MigrateCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
31 /media/usb/wwwroot/vendor/symfony/console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
32 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(100): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
33 /media/usb/wwwroot/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
34 {main}

Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'owner' for key 'roles_name_unique' (SQL: insert into roles (name, display_name, description, updated_at, created_at) values (owner, Site Owner, User runs this instance of FF3, 2015-11-26 17:24:42, 2015-11-26 17:24:42))' in /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Connection.php:636
Stack trace:
0 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Connection.php(596): Illuminate\Database\Connection->runQueryCallback('insert into ro...', Array, Object(Closure)) 1 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Connection.php(382): Illuminate\Database\Connection->run('insert intoro...', Array, Object(Closure))
2 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Connection.php(338): Illuminate\Database\Connection->statement('insert into ro...', Array) 3 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\Database\Connection->insert('insert intoro...', Array)
4 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(1756): Illuminate\Database\Query\Processors\Processor->processInsertGetId(Object(Illuminate\Database\Query\Builder), 'insert into `ro...', Array, 'id')
5 [internal function]: Illuminate\Database\Query\Builder->insertGetId(Array, 'id')
6 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(941): call_user_func_array(Array, Array)
7 /media/usb/wwwroot/bootstrap/cache/compiled.php(10081): Illuminate\Database\Eloquent\Builder->__call('insertGetId', Array)
8 /media/usb/wwwroot/bootstrap/cache/compiled.php(10081): Illuminate\Database\Eloquent\Builder->insertGetId(Array, 'id')
9 /media/usb/wwwroot/bootstrap/cache/compiled.php(10070): Illuminate\Database\Eloquent\Model->insertAndSetId(Object(Illuminate\Database\Eloquent\Builder), Array)
10 /media/usb/wwwroot/bootstrap/cache/compiled.php(10027): Illuminate\Database\Eloquent\Model->performInsert(Object(Illuminate\Database\Eloquent\Builder), Array)
11 /media/usb/wwwroot/database/seeds/PermissionSeeder.php(17): Illuminate\Database\Eloquent\Model->save()
12 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Seeder.php(42): PermissionSeeder->run()
13 /media/usb/wwwroot/database/seeds/DatabaseSeeder.php(23): Illuminate\Database\Seeder->call('PermissionSeede...')
14 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php(61): DatabaseSeeder->run()
15 [internal function]: Illuminate\Database\Console\Seeds\SeedCommand->fire()
16 /media/usb/wwwroot/bootstrap/cache/compiled.php(966): call_user_func_array(Array, Array)
17 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Console/Command.php(150): Illuminate\Container\Container->call(Array)
18 /media/usb/wwwroot/vendor/symfony/console/Command/Command.php(259): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
19 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
20 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Console/Command.php(166): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\OutputStyle))
21 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(87): Illuminate\Console\Command->call('db:seed', Array)
22 [internal function]: Illuminate\Database\Console\Migrations\MigrateCommand->fire()
23 /media/usb/wwwroot/bootstrap/cache/compiled.php(966): call_user_func_array(Array, Array)
24 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Console/Command.php(150): Illuminate\Container\Container->call(Array)
25 /media/usb/wwwroot/vendor/symfony/console/Command/Command.php(259): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
27 /media/usb/wwwroot/vendor/symfony/console/Application.php(878): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
28 /media/usb/wwwroot/vendor/symfony/console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Database\Console\Migrations\MigrateCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
29 /media/usb/wwwroot/vendor/symfony/console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
30 /media/usb/wwwroot/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(100): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
31 /media/usb/wwwroot/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
32 {main}

not sure if this helps...
If i look inside the table, no data is present. I'm kind of puzzled now.

my .env:
APP_ENV=production
APP_DEBUG=true
APP_KEY=SomeRandomStringOf32CharsExactly

DB_CONNECTION=mysql
DB_HOST=localhost
DB_DATABASE=firefly-test
DB_USERNAME=root
DB_PASSWORD=MightyPassword

CACHE_DRIVER=file
SESSION_DRIVER=file

EMAIL_SMTP=smtp.gmail.com
EMAIL_DRIVER=smtp
EMAIL_USERNAME=MyGmailAddress@gmail.com
EMAIL_PASSWORD=OtherMightyPasswordForGmailAccount
ANALYTICS_ID=
EMAIL_PRETEND=false
RUNCLEANUP=false
SITE_OWNER=MyGmailAddress@gmail.com

SENDGRID_USERNAME=
SENDGRID_PASSWORD=

**
Access log:
192.168.1.101 - - [26/Nov/2015:18:47:55 +0100] "GET /firefly-iii/auth/login HTTP/1.1" 404 516 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36"
192.168.1.101 - - [26/Nov/2015:18:47:56 +0100] "GET /firefly-iii/auth/login HTTP/1.1" 404 515 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36"
192.168.1.101 - - [26/Nov/2015:18:47:57 +0100] "GET /firefly-iii/auth/login HTTP/1.1" 404 515 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36"
192.168.1.101 - - [26/Nov/2015:18:49:44 +0100] "GET /firefly-iii HTTP/1.1" 301 590 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36"
192.168.1.101 - - [26/Nov/2015:18:49:44 +0100] "GET /firefly-iii/ HTTP/1.1" 302 1444 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36"
192.168.1.101 - - [26/Nov/2015:18:49:44 +0100] "GET /firefly-iii/auth/login HTTP/1.1" 404 515 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36"
192.168.1.101 - - [26/Nov/2015:18:49:45 +0100] "GET /firefly-iii/auth/login HTTP/1.1" 404 515 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36"

@PeterFour
Copy link

I think a database wipe is needed before, but I'm no Laravel expert so I don't know when the first Insert is being made

@JC5
Copy link
Member

JC5 commented Nov 28, 2015

Yes. I suspect that a new migration ran while old data was still there.

Is it working at the moment?

@RonaldvanMeer
Copy link
Contributor Author

I think I have "fixed" this issue.
The problem suspect is that when git is creating the firefly-iii directory on check out the permissions aren't correctly set.

after running the following commands (from within the firefly-iii root):
"chown /var/www/firefly-iii -R www-data ."
"chmod g+w Storage"

firefly worked as a charm.

@JC5
Copy link
Member

JC5 commented Dec 7, 2015

I'll put it in the installation guide!

@ianxzone
Copy link

i try to chmod 775 not working but for this
"chmod g+w Storage" its working

@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
None yet
Projects
None yet
Development

No branches or pull requests

5 participants