Issues with PHP 7.4 #1486

Closed
opened 2026-02-05 01:02:10 +03:00 by OVERLORD · 8 comments
Owner

Originally created by @jacobsmith on GitHub (Jan 11, 2020).

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:

https://github.com/egulias/EmailValidator/issues/212
https://github.com/egulias/EmailValidator/pull/203
https://github.com/laravel/framework/pull/29482

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

Originally created by @jacobsmith on GitHub (Jan 11, 2020). **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](https://user-images.githubusercontent.com/3843162/72188672-e19f2300-33c8-11ea-9364-aa92f31424d8.png) **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: https://github.com/egulias/EmailValidator/issues/212 https://github.com/egulias/EmailValidator/pull/203 https://github.com/laravel/framework/pull/29482 The current requirements list >=7.0.5, but perhaps there is an upper bound currently?
OVERLORD added the 🐕 Support🏭 Back-End labels 2026-02-05 01:02:10 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jan 19, 2020):

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 commented on GitHub (Jan 19, 2020): 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.
Author
Owner

@ssddanbrown commented on GitHub (Feb 5, 2020):

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.

@ssddanbrown commented on GitHub (Feb 5, 2020): 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.
Author
Owner

@amo13 commented on GitHub (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.

@amo13 commented on GitHub (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.
Author
Owner

@homotechsual commented on GitHub (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.*

@homotechsual commented on GitHub (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.*
Author
Owner

@amo13 commented on GitHub (Mar 19, 2020):

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

@amo13 commented on GitHub (Mar 19, 2020): But I can assure you that the folder is writable (and empty)
Author
Owner

@homotechsual commented on GitHub (Mar 19, 2020):

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 :-)

@homotechsual commented on GitHub (Mar 19, 2020): 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 :-)
Author
Owner

@ssddanbrown commented on GitHub (Mar 19, 2020):

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

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

@ssddanbrown commented on GitHub (Mar 19, 2020): > But I can assure you that the folder is writable (and empty) @amo13 Writable by whom? Definitely by the PHP process?
Author
Owner

@amo13 commented on GitHub (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...

@amo13 commented on GitHub (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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1486