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

Dashboard problems with a wrong absolute path #1431

Closed
sergiq opened this issue Apr 27, 2024 · 2 comments
Closed

Dashboard problems with a wrong absolute path #1431

sergiq opened this issue Apr 27, 2024 · 2 comments
Labels

Comments

@sergiq
Copy link

sergiq commented Apr 27, 2024

Horizon Version

5.24.3

Laravel Version

11.5.0

PHP Version

8.2.14

Redis Driver

PhpRedis

Redis Version

6.0.2

Database Driver & Version

No response

Description

I'm having issues with the Dashboard. Every time I load it, it shows a problem related to the open_base dir.

Upon investigating, I noticed that the file vendor/laravel/horizon/resources/views/layout.blade.php assigns the absolute path /vendor/horizon/nonExistentFile to the variable $nonExistentFileName (line 5). This path is used by Vite in vendor/laravel/framework/src/Illuminate/Foundation/Vite.php:792 to detect the mode in which to run.

The issue is that when it tries to do is_file, as the absolute directory /vendor/horizon/nonExistentFile is not usually included in the open_base_dir (and I don't think it should be), it fails and displays a 5XX error.

If line 5 $nonExistentFileName = '/vendor/horizon/nonExistentFile'; is changed to a relative path or to the correct absolute path, the Dashboard panel works correctly $nonExistentFileName = 'vendor/horizon/nonExistentFile';

I have migrated to Laravel 11 from Laravel 10.

Steps To Reproduce

Deploy any laravel 11 project that use Horizon

@mmachatschek
Copy link
Contributor

Fixed by #1427

@driesvints driesvints added the bug label Apr 29, 2024
@driesvints
Copy link
Member

Gonna close this one as a duplicate for now. Thanks

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

No branches or pull requests

3 participants