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

Issues with PHP 7.4 #1834

Closed
jacobsmith opened this issue Jan 10, 2020 · 8 comments
Closed

Issues with PHP 7.4 #1834

jacobsmith opened this issue Jan 10, 2020 · 8 comments

Comments

@jacobsmith
Copy link

Describe the bug
I am unable to send email when running on php 7.4

Steps To Reproduce

  1. Have a user account
  2. Click on 'forgot password'
  3. Enter email and click submit
  4. Receive error message Trying to access array offset on value of type null from vendor/egulias/email-validator/EmailValidator/Parser/Parser.php

Expected behavior
Email sends successfully.

Screenshots
image

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): BookStack v0.27.5
  • PHP Version: 7.4
  • Hosting Method (Nginx/Apache/Docker): Nginx, I think (hosted on Laravel Forge)

Additional context

My searches lead me to the following issues, in order:

egulias/EmailValidator#212
egulias/EmailValidator#203
laravel/framework#29482

The current requirements list >=7.0.5, but perhaps there is an upper bound currently?

@ssddanbrown
Copy link
Member

Hi @jacobsmith,
Sorry for my late reply. This is a known issue, Just where our packages are a little outdated. Running composer update should help solve this for now otherwise this will be solved in our next release.

@ssddanbrown
Copy link
Member

The new release is out now, with updated dependencies that would be compatible with 7.4, So I'll close this off. If you still face issues on the latest BookStack release please open a new issue.

@amo13
Copy link

amo13 commented Mar 19, 2020

Hey, I just spent a lot of time to find out that bookstack does not work on my archlinux with php 7.4. When I switch to php 7.3, everything works just fine.

When trying to run bookstack on php 7.4, I get a blank page on http://localhost an following errors in my nginx log:

Mär 19 12:52:02 amaury-pc nginx[5191]: 2020/03/19 12:52:02 [error] 5191#5191: *14 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught ErrorException: file_put_contents(/usr/share/webapps/bookstack/storage/framework/views/91645b6b6196080a0a63b4cbf9174ea58199722f.php): failed to open stream: Read-only file system in /usr/share/webapps/bookstack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:133
Mär 19 12:52:02 amaury-pc nginx[5191]: Stack trace:
Mär 19 12:52:02 amaury-pc nginx[5191]: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
Mär 19 12:52:02 amaury-pc nginx[5191]: #1 /usr/share/webapps/bookstack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(133): file_put_contents()
Mär 19 12:52:02 amaury-pc nginx[5191]: #2 /usr/share/webapps/bookstack/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(129): Illuminate\Filesystem\Filesystem->put()
Mär 19 12:52:02 amaury-pc nginx[5191]: #3 /usr/share/webapps/bookstack/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(51): Illuminate\View\Compilers\BladeCompiler->compile()
Mär 19 12:52:02 amaury-pc nginx[5191]: #4 /usr/share/webapps/bookstack/vendor/facade/ignition/src/Views/Engines/CompilerEngine.php(36): Illuminate\View\Engines\CompilerEngine->get()
Mär 19 12:52:02 amaury-pc nginx[5191]: #5 /usr/shar...PHP message: PHP Fatal error:  Uncaught ErrorException: file_put_contents(/usr/share/webapps/bookstack/storage/framework/views/91645b6b6196080a0a63b4cbf9174ea58199722f.php): failed to open stream: Read-only file system in /usr/share/webapps/bookstack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:133
Mär 19 12:52:02 amaury-pc nginx[5191]: Stack trace:
Mär 19 12:52:02 amaury-pc nginx[5191]: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
Mär 19 12:52:02 amaury-pc nginx[5191]: #1 /usr/share/webapps/bookstack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(133): file_put_contents()
Mär 19 12:52:02 amaury-pc nginx[5191]: #2 /usr/share/webapps/bookstack/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(129): Illuminate\Filesystem\Filesystem->put()
Mär 19 12:52:02 amaury-pc nginx[5191]: #3 /usr/share/webapps/bookstack/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(51): Illuminate\View\Compilers\BladeCompiler->compile()
Mär 19 12:52:02 amaury-pc nginx[5191]: #4 /usr/share/webapps/bookstack/vendor/facade/ignition/src/Views/Engines/CompilerEngine.php(36): Illuminate

I have been wondering why it is looking for an inexistent file in the views folder, until I noticed that switching to php 7.3 solves the issue.

@homotechsual
Copy link
Contributor

homotechsual commented Mar 19, 2020

It's failing to write to that folder because it's seeing it as read only. BookStack is definitely 7.4 compatible.

Edit This assumes v0.28.*

@amo13
Copy link

amo13 commented Mar 19, 2020

But I can assure you that the folder is writable (and empty)

@homotechsual
Copy link
Contributor

Well I'm running on 7.4 currently with no issues - so what you're seeing is a configuration issue rather than 7.4 issue - either way - open a new issue or join discord to troubleshoot - this issue is closed and the issue it relates to is fixed :-)

@ssddanbrown
Copy link
Member

But I can assure you that the folder is writable (and empty)

@amo13 Writable by whom? Definitely by the PHP process?

@amo13
Copy link

amo13 commented Mar 19, 2020

yes, on archlinux it's the http user. I have no problem with other php applications.
I am currently creating a new issue and including more information to try to narrow down the issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants