Call to undefined function Spatie\\ImageOptimizer\\Optimizers\\escapeshellarg() #223
Unanswered
kazimolmez
asked this question in
Q&A
Replies: 2 comments
-
Can you provide information about the content of the file? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Call to undefined function Spatie\ImageOptimizer\Optimizers\escapeshellarg()
This method is blocked on servers for security reasons.
The error output is as follows;
[2024-09-01 21:58:30] prod.INFO: Start optimizing /tmp/phpEMCFhh [2024-09-01 21:58:30] prod.INFO: Using optimizer:
Spatie\ImageOptimizer\Optimizers\Pngquant[2024-09-01 21:58:30] prod.ERROR: Call to undefined function Spatie\ImageOptimizer\Optimizers\escapeshellarg() {"userId":3,"exception":"[object] (Error(code: 0): Call to undefined function Spatie\\ImageOptimizer\\Optimizers\\escapeshellarg() at /home/username/public_html/site.com/vendor/spatie/image-optimizer/src/Optimizers/Pngquant.php:21) [stacktrace] #0 /home/username/public_html/site.com/vendor/spatie/image-optimizer/src/OptimizerChain.php(94): Spatie\\ImageOptimizer\\Optimizers\\Pngquant->getCommand() #1 /home/username/public_html/site.com/vendor/spatie/image-optimizer/src/OptimizerChain.php(78): Spatie\\ImageOptimizer\\OptimizerChain->applyOptimizer() #2 /home/username/public_html/site.com/vendor/spatie/laravel-image-optimizer/src/Middlewares/OptimizeImages.php(25): Spatie\\ImageOptimizer\\OptimizerChain->optimize() #3 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(257): Spatie\\LaravelImageOptimizer\\Middlewares\\OptimizeImages->Spatie\\LaravelImageOptimizer\\Middlewares\\{closure}() #4 /home/username/public_html/site.com/vendor/spatie/laravel-image-optimizer/src/Middlewares/OptimizeImages.php(24): Illuminate\\Support\\Collection->each() #5 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Spatie\\LaravelImageOptimizer\\Middlewares\\OptimizeImages->handle() #6 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(51): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #7 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle() #8 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(64): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #9 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Auth\\Middleware\\Authenticate->handle() #10 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(88): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #11 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle() #12 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #13 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle() #14 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #15 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest() #16 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Session\\Middleware\\StartSession->handle() #17 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #18 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle() #19 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(75): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #20 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle() #21 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #22 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php(807): Illuminate\\Pipeline\\Pipeline->then() #23 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php(786): Illuminate\\Routing\\Router->runRouteWithinStack() #24 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php(750): Illuminate\\Routing\\Router->runRoute() #25 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php(739): Illuminate\\Routing\\Router->dispatchToRoute() #26 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(201): Illuminate\\Routing\\Router->dispatch() #27 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}() #28 /home/username/public_html/site.com/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #29 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle() #30 /home/username/public_html/site.com/app/Http/Middleware/LanguageMiddleware.php(25): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #31 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\\Http\\Middleware\\LanguageMiddleware->handle() #32 /home/username/public_html/site.com/app/Http/Middleware/DynamicRouteMiddleware.php(23): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #33 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\\Http\\Middleware\\DynamicRouteMiddleware->handle() #34 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #35 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle() #36 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle() #37 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #38 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle() #39 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle() #40 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #41 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\ValidatePostSize->handle() #42 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(110): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #43 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle() #44 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #45 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\HandleCors->handle() #46 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #47 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\TrustProxies->handle() #48 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #49 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Pipeline\\Pipeline->then() #50 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter() #51 /home/username/public_html/site.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1188): Illuminate\\Foundation\\Http\\Kernel->handle() #52 /home/username/public_html/site.com/public/index.php(17): Illuminate\\Foundation\\Application->handleRequest()
Beta Was this translation helpful? Give feedback.
All reactions