Support the ongoing development of Laravel.io →
Installation Configuration
Last updated 2 years ago.
0

Did you run any update that could have caused this issue ?

The Illuminate\Contracts\ namespace only exists in L5, so I hightly doubt you have this error message on a L4 application.

0

RemiCollin said:

Did you run any update that could have caused this issue ?

The Illuminate\Contracts\ namespace only exists in L5, so I hightly doubt you have this error message on a L4 application.

The last update I did was 2+ days ago. The Laravel websites stopped working about 24 hours ago.

I did notice that specific namespace is a L5 namespace, but I get this error message on 3 L4 applications. One L5 application works fine.

I also find it weird that there's about 10% chance it works when reloading on one of the websites.

0

I suggest you hunt down any 3rd party package you use in your applications, they may have updated some of their dependencies to L5, which may be causing this mess, which is unlikely as composer should prevent this... Still that's the only logical explanation I can think off.

When it works, it's probably that it's rendering from the cache.

What happens when you run 'php artisan' on the broken apps ?

0

I cannot find any 3rd part package that should have any issues. Only one of the websites are using such, and I can't find any problems with it.

php artisan works just fine on the applications. The cronjobs have kept running in the background.

0

Well, maybe you can paste the full error log that leads to that Class not exists exception. Without it we can't go as far as guessing..

0

Sure. I changed the actual domain name to website.com in the path.

[2015-04-06 15:12:03] production.ERROR: exception 'ReflectionException' with message 'Class Illuminate\Contracts\Debug\ExceptionHandler does not exist' in /var/www/website.com/bootstrap/compiled.php:235
Stack trace:
#0 /var/www/website.com/bootstrap/compiled.php(235): ReflectionClass->__construct('Illuminate\Cont...')
#1 /var/www/website.com/bootstrap/compiled.php(205): Illuminate\Container\Container->build('Illuminate\Cont...', Array)
#2 /var/www/website.com/bootstrap/compiled.php(583): Illuminate\Container\Container->make('Illuminate\Cont...', Array)
#3 /var/www/website.com/bootstrap/compiled.php(353): Illuminate\Foundation\Application->make('Illuminate\Cont...')
#4 /var/www/website.com/bootstrap/compiled.php(695): Illuminate\Container\Container->offsetGet('Illuminate\Cont...')
#5 /var/www/website.com/bootstrap/compiled.php(695): Illuminate\Foundation\Application->boot()
#6 /var/www/website.com/bootstrap/compiled.php(7825): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#7 /var/www/website.com/bootstrap/compiled.php(8432): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#8 /var/www/website.com/bootstrap/compiled.php(8379): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#9 /var/www/website.com/bootstrap/compiled.php(11045): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#10 /var/www/website.com/bootstrap/compiled.php(657): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#11 /var/www/website.com/public/index.php(49): Illuminate\Foundation\Application->run()
#12 {main} [] []
0

It really looks like the version of the Laravel framework in your vendor directory is the 5.0.x.

What have you got in the require section of this app's composer.json ?

0
"require": {
		"laravel/framework": "4.2.*"
	},
0

Try to run composer update and then artisan clear-compiled.

0

Done that. Same problem.

0

Did you try to search for the 'Illuminate\Contracts\Debug\ExceptionHandler' string in your project ? That might help you find out which part of the app is breaking things down.

0

RemiCollin said:

Did you try to search for the 'Illuminate\Contracts\Debug\ExceptionHandler' string in your project ? That might help you find out which part of the app is breaking things down.

There are literally no mention of it anywhere at all in any of the projects, except in the log.

Do you think there's been some sort of cache on the server that have somehow used the one L5 project and affected all the L4?

0

Maybe try to clear the composer cache (usually located in /home/user/.composer)

Then remove the vendor folder on the broken app, and run composer update for a clean install.

Also, just thinking about this, what is your stability requirement on the app's composer.json ? Just make sure it's set on 'stable'

0

Minimum is set to "stable", composer cache has been cleared.

Removed compiled.php, removed the vendor folder, did composer update and installed all that, still same issue.

It only happens on the production server, not locally...

0

I suggest you ask your server admin, sounds like something weird is happening, might be apache/nginx issue or something else. If it works locally, no reason it should't work on production, so I suspect some exterior factor causing this issue.

0

I'd restore my backup and troubleshoot from there. Test all on your dev server. If working on dev but not production, RemiCollin is right, check production server for something weird / changed.

0

I have the same error, something weird is that sometimes works, sometimes not, we are hosted at liquid web, any idea?

0

I suggest you post an issue to Laravel's github.

0

I too am facing the same issue. I have 2 Laravel 4.2 apps and 3 Laravel 5.0 apps on DigitalOcean droplet. Everything was going quite good since the last one year. After a recent server upgrade, both the Laravel 4.2 apps started throwing the above mentioned error while all the three Laravel 5 apps continue to work as usual.

I have just posted this issue on Github. Here's the link

https://github.com/laravel/framework/issues/8303

0

Thanks a lot. Happy I'm not the only one with this issue. I'm on DigitalOcean as well.

0

Do you have any OpCache enabled for that server instance (PHP OpCache for example since you're using PHP 5.5+)? There could a bug where OpCache is loading the wrong compiled.php from memory (L4 app loading L5 compiled.php) etc.

0

Could be worth checking indeed!

Still the strange thing is that it happens at the same time with 3 users so far, after a composer update, so my instinct move toward a composer/autoload issue.

Any news on it guys ?

0

i get this too - seems related to having laravel4 and laravel5 sites on the same apache. goto laravel4 site - works fine - goto laravel5 site, then back to any one of several laravel4 sites and bang 'Class Illuminate\Contracts\Debug\ExceptionHandler does not exist ' restart apache then fixes the problem

0

U says restarting apache fixed it ?

0

RemiCollin said:

U says restarting apache fixed it ?

yep seems to for me, until someone visits the laravel5 site again. i've now deactived my laravel5 site and the laravel4 sites seem to be stable

0

Do you use OpCache as crynobone suggested ?

PS : https://github.com/laravel/framework/issues/8303 .... no comment. I think someday I'll just stop contributing or helping people. Enough said, this guy pisses me off!!

0

I can confirm apache restart works, but since the L5 app is pretty popular, it doesn't take long until the L4 apps are no longer functional.

As for OpCache, I did the command php -r "opcache_reset();", but it had no effect.

Last updated 9 years ago.
0

What is your environment (server, php version, etc), do you use any tool as forge or envoyer ?

0
  • Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-32-generic x86_64)
  • PHP 5.5.9-1ubuntu4.7
  • Apache/2.4.7 (Ubuntu)

Not using forge or envoyer.

Last updated 9 years ago.
0

I have the same stack (on my developpment server), with both L4 & L5 applications but couldn't replicate the issue (tried last L5 update and run few request on both l4 and l5 apps).

0

It must be able to replicate somehow, considering I'm not the only one with this exact issue.

Right now I'm not sure if I should create a new droplet at DO and try and set it up again (hopefully without the issue), or wait for an actual fix for this.

0

CentOS 6.6 32bit PHP 5.4.39 Apache/2.2.15

0

Well, if having your application running is time critical, I guess I would go for the first option.

0

jjrdev said:

CentOS 6.6 32bit PHP 5.4.39 Apache/2.2.15

We have nothing in common on that part, must be something else.

I'll try setting up a new droplet tomorrow. The L5 app (which is working) is really the one that needs to be working.

0

I saw in recent laravel5 commits that there were some changes involving the 'compiled.php' file location. Not sure if it's related but maybe that's worth a check.

Still, the fact that it works briefly after a apache restart makes it more likely to be a system issue I guess.

Tell us how it goes.

Last updated 9 years ago.
0

As for OpCache, I did the command php -r "opcache_reset();", but it had no effect.

OpCache doesn't run by default on commandline (CLI) unless you enabled it. It might be worth disabling the whole extension temporarily just to check if it is the cause of this error.

0

I saw in recent laravel5 commits that there were some changes involving the 'compiled.php' file location.

Shouldn't be the case, since L4 use bootstrap/compiled.php while L5 is either storage/framework/compiled.php or vendor/compiled.php (in separate folders).

0

Indeed, then opcache mixing up the files would be weird. But +1 on deactivating extension just to be sure.

I wonder if it could be some bug at the autoloading (composer) level ?

0

Disabled opcache (wasn't enabled in first place), but no change.

I did a sudo apt-get update and sudo apt-get upgrade, and I'm not sure if I just feel like there's a change, or if there actually is a difference.

Here's what I found out; right now there's no need to restart apache, but as long as I refresh the L4 app, it works. But once the L5 app is loaded, it breaks the L4. But right now, I don't have to restart apache each time.

I'm going to wait on creating a new droplet, as I really have better things to do with my time and money.

Last updated 9 years ago.
0

So jedkirby on GitHub said disabling 'New Relic PHP Agent' would help, and it actually did. https://github.com/laravel/framework/issues/8303#issuecomment-91663907

I'm marking this as the solution here, in cause some of the other people want to try this.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

boxhock boxhock Joined 6 Apr 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.