Skip to content

Commit

Permalink
Fix #1066
Browse files Browse the repository at this point in the history
  • Loading branch information
JC5 committed Dec 27, 2017
1 parent a14ae02 commit 5ba03bd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function (Blueprint $table) {
// straight from laravel
$table->string('email')->index();
$table->string('token')->index();
$table->timestamp('created_at');
$table->timestamp('created_at')->nullable();
}
);
}
Expand Down

8 comments on commit 5ba03bd

@wfrezzato
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. Thanks for the quick reply.

I did the procedure. In my case, the change occurred on line 154. After these procedures, the database was successfully installed.

But when entering the system, the following error appears:

Whoops! An error occurred.
Unfortunately, this error was not recoverable. Firefly III broke. The error is:

Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE)

Error

This error occured in file /var/www/html/firefly-iii/app/Support/Twig/General.php on line 158 with code 0.

Stack trace

#0 /var/www/html/firefly-iii/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/var/www/html/f...')
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass('FireflyIII\Supp...')
#2 /var/www/html/firefly-iii/app/Providers/FireflyServiceProvider.php(88): spl_autoload_call('FireflyIII\Supp...')
#3 [internal function]: FireflyIII\Providers\FireflyServiceProvider->boot()
#4 /var/www/html/firefly-iii/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#5 /var/www/html/firefly-iii/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container{closure}()
#6 /var/www/html/firefly-iii/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#7 /var/www/html/firefly-iii/vendor/laravel/framework/src/Illuminate/Container/Container.php(549): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#8 /var/www/html/firefly-iii/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(792): Illuminate\Container\Container->call(Array)
#9 /var/www/html/firefly-iii/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Foundation\Application->bootProvider(Object(FireflyIII\Providers\FireflyServiceProvider))
#10 [internal function]: Illuminate\Foundation\Application->Illuminate\Foundation{closure}(Object(FireflyIII\Providers\FireflyServiceProvider), 28)
#11 /var/www/html/firefly-iii/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(776): array_walk(Array, Object(Closure))
#12 /var/www/html/firefly-iii/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\Foundation\Application->boot()
#13 /var/www/html/firefly-iii/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(213): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(Object(Illuminate\Foundation\Application))
#14 /var/www/html/firefly-iii/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): Illuminate\Foundation\Application->bootstrapWith(Array)
#15 /var/www/html/firefly-iii/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(146): Illuminate\Foundation\Http\Kernel->bootstrap()
#16 /var/www/html/firefly-iii/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#17 /var/www/html/firefly-iii/public/index.php(74): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#18 {main}

@JC5
Copy link
Member Author

@JC5 JC5 commented on 5ba03bd Dec 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thanks for the feedback! It seems you're not running PHP7.1. That error is caused by a piece of code that is only supported in PHP7.1 or higher.

@wfrezzato
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My PHP Version is: PHP 7.1.12-3+ubuntu16.04.1

php-versao

@JC5
Copy link
Member Author

@JC5 JC5 commented on 5ba03bd Dec 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, your web server is probably using a different version.

Create pi.php in firefly-iii/public and put in the following code:

<?php
phpinfo();

I'm fairly sure it'll come back with a different version when you browse to /pi.php.

@wfrezzato
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wfrezzato
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems that in shell the php is 7.1 and in apache 7.0.

@JC5
Copy link
Member Author

@JC5 JC5 commented on 5ba03bd Dec 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This happens sometimes when you install PHP7.1 and forget to remove the packages from PHP7.0. I think you can run this to find them:

apt list --installed | grep php7.0

If you remove them and install PHP7.1 (again) it should work. Be sure to restart apache.

@wfrezzato
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello. Thank you for the info.

I run the following commands, and works:
$ sudo update-alternatives --set php /usr/bin/php7.1
$ sudo a2dismod php7.0
$ sudo a2enmod php7.1
$ sudo service apache2 restart

tnx

Please sign in to comment.