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

file_exists(): File name is longer than the maximum allowed path length on this platform (4096) #41745

Closed
fangmuke opened this issue Mar 30, 2022 · 21 comments

Comments

@fangmuke
Copy link

fangmuke commented Mar 30, 2022

  • Laravel Version: 9.5.1
  • PHP Version: 8.0.11
  • Database Driver & Version: MySQL 8
  • Server Platform & Version: Ubuntu 20.04.3 LTS

Description:

Calling Blade::render($mailTemplateHtml) can't run normally in the PHP-FPM of Ubuntu.

Steps To Reproduce:

It must be under Ubuntu.

$mailTemplateHtml = str_repeat('a', 4097);
Blade::render($mailTemplateHtml .'{{ $name }}', ['name' => 'Taylor']);
@fangmuke
Copy link
Author

src/Illuminate/View/Component.php

    /**
     * Resolve the Blade view or view file that should be used when rendering the component.
     *
     * @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\Support\Htmlable|\Closure|string
     */
    public function resolveView()
    {
        $view = $this->render();

        if ($view instanceof ViewContract) {
            return $view;
        }

        if ($view instanceof Htmlable) {
            return $view;
        }

        $resolver = function ($view) {
            $factory = Container::getInstance()->make('view');

            return $factory->exists($view)
                        ? $view
                        : $this->createBladeViewFromString($factory, $view);
        };

        return $view instanceof Closure ? function (array $data = []) use ($view, $resolver) {
            return $resolver($view($data));
        }
        : $resolver($view);
    }

I think the problem is here.

return $factory->exists($view)
                ? $view
                : $this->createBladeViewFromString($factory, $view);

Using Blade::render() should not be judged whether the view exists, it will generate a view after calling createbladeViewFromString().

@a-bashtannik
Copy link
Contributor

Could you try to run the test, please?

use Illuminate\Support\Facades\Blade;

public function test_rendering_long_blade_string() {
    $longString = str_repeat('a', 4097);
    $this->assertSame($longString . 'Taylor', Blade::render($longString .'{{ $name }}', ['name' => 'Taylor']));
}

Passes for me.
PHP 8.0.16, latest 9.x branch

@fangmuke
Copy link
Author

Could you try to run the test, please?

use Illuminate\Support\Facades\Blade;

public function test_rendering_long_blade_string() {
    $longString = str_repeat('a', 4097);
    $this->assertSame($longString . 'Taylor', Blade::render($longString .'{{ $name }}', ['name' => 'Taylor']));
}

Passes for me. PHP 8.0.16, latest 9.x branch

I tried to run the test and the test passed.
But move the code to the Controller, and an error will occur under FPM.

@AlexWinder
Copy link

Could you try to run the test, please?

use Illuminate\Support\Facades\Blade;

public function test_rendering_long_blade_string() {
    $longString = str_repeat('a', 4097);
    $this->assertSame($longString . 'Taylor', Blade::render($longString .'{{ $name }}', ['name' => 'Taylor']));
}

Passes for me. PHP 8.0.16, latest 9.x branch

I tried to run the test and the test passed. But move the code to the Controller, and an error will occur under FPM.

This sounds like your FPM PHP configuration is different to the one which your PHPUnit tests are configured to run as. Are you running your PHPUnit tests against a locally installed PHP which is different from PHP-FPM?

@fangmuke
Copy link
Author

Could you try to run the test, please?

use Illuminate\Support\Facades\Blade;

public function test_rendering_long_blade_string() {
    $longString = str_repeat('a', 4097);
    $this->assertSame($longString . 'Taylor', Blade::render($longString .'{{ $name }}', ['name' => 'Taylor']));
}

Passes for me. PHP 8.0.16, latest 9.x branch

I tried to run the test and the test passed. But move the code to the Controller, and an error will occur under FPM.

This sounds like your FPM PHP configuration is different to the one which your PHPUnit tests are configured to run as. Are you running your PHPUnit tests against a locally installed PHP which is different from PHP-FPM?

    /**
     * Resolve the Blade view or view file that should be used when rendering the component.
     *
     * @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\Support\Htmlable|\Closure|string
     */
    public function resolveView()
    {
        $view = $this->render();

        if ($view instanceof ViewContract) {
            return $view;
        }

        if ($view instanceof Htmlable) {
            return $view;
        }

        $resolver = function ($view) {
            $factory = Container::getInstance()->make('view');

            return $factory->exists($view)
                        ? $view
                        : $this->createBladeViewFromString($factory, $view);
        };

        return $view instanceof Closure ? function (array $data = []) use ($view, $resolver) {
            return $resolver($view($data));
        }
        : $resolver($view);
    }

I think this piece of code is problematic.
Calling Blade::render($string) $string is already a string or a section of HTML,Why do you want to take $string as a file name, determine if the file exists?

@driesvints
Copy link
Member

Please paste the entire contents of $mailTemplateHtml on https://paste.laravel.io/ and link it here.

@fangmuke
Copy link
Author

Please paste the entire contents of $mailTemplateHtml on https://paste.laravel.io/ and link it here.

$mailTemplateHtml = str_repeat('a', 4097);
Blade::render($mailTemplateHtml .'{{ $name }}', ['name' => 'Taylor']);

@driesvints
Copy link
Member

Works fine for me:

Screenshot 2022-03-31 at 09 48 12

Please try a support channel:

@fangmuke
Copy link
Author

Works fine for me:

Screenshot 2022-03-31 at 09 48 12

Please try a support channel:

image

CLI mode can work normally, please try in PHP-FPM mode, thank you.

@AlexWinder
Copy link

As before, check for differences between the php.ini file you are using for FPM and CLI.

@a-bashtannik
Copy link
Contributor

Me personally consider @fangmuke's claim reasonable, the string variable purpose is not defined explicitly - why it may be content and a path? But at least we need a confirmation this approach breaks somehow, a failed test case.

@fangmuke
Copy link
Author

fangmuke commented Mar 31, 2022

As before, check for differences between the php.ini file you are using for FPM and CLI.

I compared php.ini and php-cli.ini, found they are only different in disable_functions.

@fangmuke
Copy link
Author

Me personally consider @fangmuke's claim reasonable, the string variable purpose is not defined explicitly - why it may be content and a path? But at least we need a confirmation this approach breaks somehow, a failed test case.

I can't give you failed test cases.
Because PHPUnit is running in PHP-CLI, the error only appears in the PHP-FPM of Ubuntu. Neither it apprears in the PHP-FPM of Windows.

@m0n1ker
Copy link

m0n1ker commented Apr 11, 2022

I'm running into this same issue and I'm able to reproduce the problem in Apache(using mod_php) and CLI.

Laravel 9.5.1
PHP Version:

PHP 8.0.11 (cli) (built: Sep 21 2021 17:07:44) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.11, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.12, Copyright (c), by Zend Technologies
    with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans

Could you try to run the test, please?

use Illuminate\Support\Facades\Blade;

public function test_rendering_long_blade_string() {
    $longString = str_repeat('a', 4097);
    $this->assertSame($longString . 'Taylor', Blade::render($longString .'{{ $name }}', ['name' => 'Taylor']));
}

Passes for me. PHP 8.0.16, latest 9.x branch

<?php

namespace Tests\Unit;

use Blade;
use PHPUnit\Framework\TestCase;

class ExampleTest extends TestCase
{
    public function test_rendering_long_blade_string() {
        $longString = str_repeat('a', 4097);
        $this->assertSame($longString . 'Taylor', Blade::render($longString .'{{ $name }}', ['name' => 'Taylor']));
    }
}

It fails for me.

$ php artisan test

   FAIL  Tests\Unit\ExampleTest
  ⨯ rendering long blade string
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaTaylor

If I try putting the following two lines in any controller, it also throws an exception.

$mailTemplateHtml = str_repeat('a', 4097);
echo Blade::render($mailTemplateHtml .'{{ $name }}', ['name' => 'Taylor']);
Here's the stacktrace
local.ERROR: file_exists(): File name is longer than the maximum allowed path length on this platform (4096): /vagrant/resources/views/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa{{ $name }}.blade.php {"userId":1,"exception":"[object] (ErrorException(code: 0): file_exists(): File name is longer than the maximum allowed path length on this platform (4096): /vagrant/resources/views/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa{{ $name }}.blade.php at /vagrant/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:28)
[stacktrace]
#0 /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(231): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError()
#1 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}()
#2 /vagrant/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(28): file_exists()
#3 /vagrant/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php(131): Illuminate\\Filesystem\\Filesystem->exists()
#4 /vagrant/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php(79): Illuminate\\View\\FileViewFinder->findInPaths()
#5 /vagrant/vendor/laravel/framework/src/Illuminate/View/Factory.php(285): Illuminate\\View\\FileViewFinder->find()
#6 /vagrant/vendor/laravel/framework/src/Illuminate/View/Component.php(77): Illuminate\\View\\Factory->exists()
#7 /vagrant/vendor/laravel/framework/src/Illuminate/View/Component.php(85): Illuminate\\View\\Component->Illuminate\\View\\{closure}()
#8 /vagrant/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(302): Illuminate\\View\\Component->resolveView()
#9 /vagrant/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(337): Illuminate\\View\\Compilers\\BladeCompiler::render()
#10 /vagrant/app/Http/Controllers/HomeController.php(27): Illuminate\\Support\\Facades\\Facade::__callStatic()
#11 /vagrant/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\\Http\\Controllers\\HomeController->index()
#12 /vagrant/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction()
#13 /vagrant/vendor/laravel/framework/src/Illuminate/Routing/Route.php(261): Illuminate\\Routing\\ControllerDispatcher->dispatch()
#14 /vagrant/vendor/laravel/framework/src/Illuminate/Routing/Route.php(204): Illuminate\\Routing\\Route->runController()
#15 /vagrant/vendor/laravel/framework/src/Illuminate/Routing/Router.php(725): Illuminate\\Routing\\Route->run()
#16 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()
#17 /vagrant/vendor/spatie/laravel-csp/src/AddCspHeaders.php(13): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#18 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Spatie\\Csp\\AddCspHeaders->handle()
#19 /vagrant/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#20 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle()
#21 /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#22 /vagrant/app/Http/Middleware/VerifyCsrfToken.php(31): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle()
#23 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\\Http\\Middleware\\VerifyCsrfToken->handle()
#24 /vagrant/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#25 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle()
#26 /vagrant/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#27 /vagrant/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest()
#28 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Session\\Middleware\\StartSession->handle()
#29 /vagrant/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#30 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle()
#31 /vagrant/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#32 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle()
#33 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#34 /vagrant/vendor/laravel/framework/src/Illuminate/Routing/Router.php(727): Illuminate\\Pipeline\\Pipeline->then()
#35 /vagrant/vendor/laravel/framework/src/Illuminate/Routing/Router.php(702): Illuminate\\Routing\\Router->runRouteWithinStack()
#36 /vagrant/vendor/laravel/framework/src/Illuminate/Routing/Router.php(666): Illuminate\\Routing\\Router->runRoute()
#37 /vagrant/vendor/laravel/framework/src/Illuminate/Routing/Router.php(655): Illuminate\\Routing\\Router->dispatchToRoute()
#38 /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Illuminate\\Routing\\Router->dispatch()
#39 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#40 /vagrant/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#41 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle()
#42 /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#43 /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#44 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle()
#45 /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#46 /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#47 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle()
#48 /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#49 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle()
#50 /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#51 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle()
#52 /vagrant/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#53 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Http\\Middleware\\HandleCors->handle()
#54 /vagrant/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#55 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Http\\Middleware\\TrustProxies->handle()
#56 /vagrant/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#57 /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\\Pipeline\\Pipeline->then()
#58 /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#59 /vagrant/public/index.php(52): Illuminate\\Foundation\\Http\\Kernel->handle()
#60 {main}

@m0n1ker
Copy link

m0n1ker commented Apr 12, 2022

@driesvints, would you consider re-opening this issue now that there's a failed test case? There does seem to be a problem here, and I haven't been able to identify any reasonable workaround.

My personal feeling is that Blade::render should have an additional optional parameter, or a second function should be defined that allows the user to specify explicitly if the provided string is content or a file path.

@a-bashtannik
Copy link
Contributor

@m0n1ker could you also tell more about your environment? OS and php -i output could be useful.

@m0n1ker
Copy link

m0n1ker commented Apr 12, 2022

Sure, this is a pretty vanilla CentOS 7 machine, running in VirtualBox, and provisioned by Vagrant. It's using the Official CentOS 7 box. It has PHP 8.0 installed from the Remi repository, along with Apache 2.4.53. The web root is /vagrant which contains the Laravel application. I did update PHP to 8.0.17 to verify this bug still happened on the latest version and it does.

Here's the output from php -i. The only PHP settings I've changed from their defaults are date.timezone and a few xdebug settings.
phpinfo.txt

@a-bashtannik
Copy link
Contributor

Duplicate of #32254

@a-bashtannik
Copy link
Contributor

a-bashtannik commented Apr 13, 2022

PHP has a hard limit on path length as defined by the constant PHP_MAXPATHLEN which depends on the operating system (Windows 260 characters, Unix: as specified in the c-runtime - on Linux this is PATH_MAX in limits.h being 4096 on both Lnux kernel 3.10 you are and 5.4 I am, and source MAXPATHLEN equals to PATH_MAX.

PHP also knows you are trying to check plain file existence and calls php_check_open_basedir

https://github.com/php/php-src/blob/master/ext/standard/filestat.c#L757

If you have no open_basedir configuration, then another method virtual_file_ex will be called:

https://github.com/php/php-src/blob/master/main/fopen_wrappers.c#L282
https://github.com/php/php-src/blob/master/ext/standard/filestat.c#L767
https://github.com/php/php-src/blob/PHP-8.0.16/Zend/zend_virtual_cwd.c#L1008

It has no warnings, just returns false, like in my case.

If you set open_basedir a value, you enable php_check_open_basedir_ex checking flow.

I suppose your environment overrides open_basedir.

Although it's OK according to PHP design, I would say we have to add the PHP_MAXLENGTH value check in the Blade string code.

@a-bashtannik
Copy link
Contributor

I will deliver a PR resolving these issues soon.

a-bashtannik added a commit to a-bashtannik/framework that referenced this issue Apr 13, 2022
taylorotwell pushed a commit that referenced this issue Apr 13, 2022
* [9.x] Fix PHP warnings when rendering long blade string (#41745)

* Apply fixes from StyleCI
BrandonSurowiec pushed a commit to BrandonSurowiec/framework that referenced this issue Apr 14, 2022
* [9.x] Fix PHP warnings when rendering long blade string (laravel#41745)

* Apply fixes from StyleCI

(cherry picked from commit bb0da4a)
taylorotwell pushed a commit that referenced this issue Apr 14, 2022
)

* [9.x] Fix PHP warnings when rendering long blade string (#41745)

* Apply fixes from StyleCI

(cherry picked from commit bb0da4a)

Co-authored-by: Andrew Bashtannik <[email protected]>
@bplace
Copy link

bplace commented Mar 25, 2024

Hi there, I have encountered this issue on long Blade content in database.

Laravel 10 running on Debian 12, limit is 4096.

When reaching the View/Component:174, the following code is too lazy:

    if (strlen($contents) <= PHP_MAXPATHLEN && $this->factory()->exists($contents)) {
        return static::$bladeViewCache[$key] = $contents;
    }

This breaks once the code reaches file_exists, as the application path + ".blade.php" is added to the filepath tested, thus getting "File name is longer than the maximum allowed". Adding the app path + ".blade.php" would be the right test for strlen.

I have patched my own code with a call to str_pad when I'm close to PHP_MAXPATHLEN, based on the length of my application path.

Would love to simply force Blade::render to use a Blade string and not test any filepath.

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

No branches or pull requests

6 participants