Open PiwanSama opened 3 years ago
Same problem here, but status code 403
Same issue here:
Configuration cache cleared!
Configuration cached successfully!
Illuminate\Http\Client\RequestException
HTTP request returned status code 404.
at vendor/laravel/framework/src/Illuminate/Http/Client/Response.php:207
203| */
204| public function throw()
205| {
206| if ($this->serverError() || $this->clientError()) {
> 207| throw new RequestException($this);
208| }
209|
210| return $this;
211| }
[2m+14 vendor frames [22m
15 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
I solved the 403 (It was cloudflare issue) but I still with 404, I just gave up at this point
Same issue here (404) Works for localhost tho, but in production, with the APP_URL correct, it doesn't.
ME TOO.Ver:3.2.1
The requested URL returned error: 404 Not Found Url: https://domain/opcache-api/clear?key=eyJpdiI6ImtaV3FMbys0TmZjYjNLM0RwUG9vaFE9PSIsInZhbHVlIjoiK3RyNGFRbk8zZWZ6dXJRcWdRTHFKZz09IiwibWFjIjoiNzUwZjVhZDg2MTA5NDVhMGY5YTcyYWZiZmRhZGJiMTVhOThiM2E1NTE5MGJlM2FhZGZiZWU5OWY3YjE4MWIzYSJ9
I had no issues with opcache:clear
, but did get a a 500 on opcache:compile
with the following error:
ParseError: syntax error, unexpected '|', expecting '{' in file /var/www /var/www (truncated...)
In case someone has a similar problem, I traced it down to symfony/polyfill-intl-idn
and other polyfills. Seems like it was loading it's bootstrap80.php
files instead of bootstrap.php
despite PHP_VERSION_ID being under 80000. For now I'm just using local forks which don't have the bootstrap80.php files but should probably investigate further.
$ php artisan vendor:publish --provider="Appstract\Opcache\OpcacheServiceProvider" --tag="config" Copied File [\vendor\appstract\laravel-opcache\config\opcache.php] To [\config\opcache.php] Publishing complete.
and set
'verify_ssl' => false, 'verify_host' => 0, // 0 for disabled
It's working well.
@anyforever I tried to apply these settings to my project and it had no effect. I am running PHP 7.4.13 on Ubuntu 18.04
@miraries check my answer here: https://github.com/appstract/laravel-opcache/issues/122#issuecomment-759400723 It may be an easier solution than keeping forks up to date.
@lorenzocattaneo much better, thanks!
In my case it was cached routes, so just run:
php artisan route:clear
or
php artisan optimize:clear
503 in here
Illuminate\Http\Client\RequestException
HTTP request returned status code 503:
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/ht (truncated...)
at vendor/laravel/framework/src/Illuminate/Http/Client/Response.php:241
237▕ {
238▕ $callback = func_get_args()[0] ?? null;
239▕
240▕ if ($this->failed()) {
➜ 241▕ throw tap(new RequestException($this), function ($exception) use ($callback) {
242▕ if ($callback && is_callable($callback)) {
243▕ $callback($this, $exception);
244▕ }
245▕ });
+14 vendor frames
15 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
Same here, any updates?
Same here. 404
same issue here, any updates?
$ php artisan vendor:publish --provider="Appstract\Opcache\OpcacheServiceProvider" --tag="config" Copied File [\vendor\appstract\laravel-opcache\config\opcache.php] To [\config\opcache.php] Publishing complete.
and set'verify_ssl' => false, 'verify_host' => 0, // 0 for disabled
It's working well.
As mentioned add this to the config, then clear any cached config with php artisan optimize
and then try to recompile the opcache
php artisan config:cache
php artisan rotue:cache
Same issue here:
In Response.php line 260:
HTTP request returned status code 404:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width (truncated...)
Tried below still doesn't work
$ php artisan vendor:publish --provider="Appstract\Opcache\OpcacheServiceProvider" --tag="config" Copied File [\vendor\appstract\laravel-opcache\config\opcache.php] To [\config\opcache.php] Publishing complete.
and set
'verify_ssl' => false, 'verify_host' => 0, // 0 for disabled
Laravel Framework 8.55.0 PHP 7.4.3 nginx version: nginx/1.18.0 (Ubuntu)
I'm also having this issue...
In my local machine everything works fine. In production server I get 404.
My server is behind a load balancer so I'm using http://localhost
as OPCACHE_URL
. If I try to get any other url, using wget, I get the correct status. But if I try to access /opcache-api/*
I get 404.
I've tried clearing cache, routes, config, etc... No luck...
I've tried setting 'verify_ssl' => false
in config/opcache.php
. Still no luck...
I'm stuck... Anyone has any ideas?
did you try clear cache and config? Are you getting 404 or 500? Look at error logs when you try to compile
Same issue here. Anyone found the solution?
I'm using Laravel 8 and PHP 8.1.
Hi For 404 - Make sure your APP_URL is set correctly in .env. For 503 - use anyforever solution
Please clear your php code opcache use other methods, or restart your php-fpm. Because your php code opcache data is created. So the new router ( opcache-api/clear ) can't find. @bmstanley @darkguy2008 @s4m4n @theonly27 @gjm @muhdfaiz @vlados @delejt
I solved this problem by upgrading my laravel installer to version 4, I did it by simply running the following command line :
composer global require "laravel/installer:^4.0"
Thanks for master Elias MISSAOUI who suggested to me this solution.
Illuminate\Http\Client\RequestException
HTTP request returned status code 404:
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, (truncated...)
at vendor/laravel/framework/src/Illuminate/Http/Client/Response.php:272
268▕ */
269▕ public function toException()
270▕ {
271▕ if ($this->failed()) {
➜ 272▕ return new RequestException($this);
273▕ }
274▕ }
275▕
276▕ /**
+14 vendor frames
This is my error, and I updated ``APP_URL=http://localhostto correct url ->
APP_URL=http://localhost:8000```
I just installed opcache and get the following error when I to run:
php artisan opcache:clear
php artisan opcache:config
php artisan opcache:status
I'm using: