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

What classes cannot be loaded? Give us more specific examples. What PHP version are you running?

0

probably your composer needs a composer dump-autoload again.

0

thomastkim said:

What classes cannot be loaded? Give us more specific examples. What PHP version are you running?

I'm running PHP 5.5.6

And Classes are my personal library

the classes do include

namespace App\LibDH;

and there's a

use App\LibDH\D;

where it's being used.

It does run well on my localhost though.

https://www.dropbox.com/s/j4edjnjwptyzu2m/class.not.found.png

Last updated 8 years ago.
0

astroanu said:

probably your composer needs a composer dump-autoload again.

I just tried. And it didn't work.

https://www.dropbox.com/s/j4edjnjwptyzu2m/class.not.found.png?...

0

Try php artisan clear-compiled

0

tkprocat said:

Try php artisan clear-compiled

Sadly, that doesn't work either. :(

0
  1. do you have a class file by the name D in App\LibDH folder?
  2. open vendor\vendor\composer\autoload_classmap.php and see if your class is there. Maybe it's misspelled, or miss-namspaced.
  3. I'm guessing it's a class you added yourself, you need to define the path on your composer.json under autoload.classmap section
0

astroanu said:

  1. do you have a class file by the name D in App\LibDH folder?
  2. open vendor\vendor\composer\autoload_classmap.php and see if your class is there. Maybe it's misspelled, or miss-namspaced.
  3. I'm guessing it's a class you added yourself, you need to define the path on your composer.json under autoload.classmap section
  1. YES

  2. NO

  3. I didn't know that.

Does the PSR-4 setting not cover it? I kept reading that it should.

Why does it work on my localhost then? (I'm checking the localhost version of my code and it's not in there)

And what do I do after I add it to composer.json?

Do I run composer update

Thanks! :)

0

You're running PHP 5.5.6. Laravel 5.1 requires PHP >= 5.5.9.

Check all the requirements here:

http://laravel.com/docs/master

0

Sorry, marked my own post as the solution when I meant to mark @astroanu

But in any case, now I have a routing problem ... the classes are included, but the same route on different servers serve up different views.

On my localhost, it serves the correct view. On the remote host, even tho I @extends('layout.master') it shows my 'test.parser' view somehow along with the 'welcome' view.

I'm ... so confused how this could happen. :P

0

I told you what to look at. You don't need to define the path in composer.json. psr4 does cover it.

The Laravel docs state the requirements, and you stated that your server doesn't meet it. That's step 1 before you do anything else.

Last updated 8 years ago.
0

thomastkim said:

You're running PHP 5.5.6. Laravel 5.1 requires PHP >= 5.5.9.

Check all the requirements here:

http://laravel.com/docs/master

My mistake. I am running 5.5.9

Well I managed to set up my own LAMP environment and WAMP environments fine for years. But it's been a few years since I touched Linux as I was using a Mac.

But on the possibility something changed, I'm also on an Ubuntu 14.04 build on a 4 core arm based VPS. Do I need to do anything in particular via apt-get that I might have missed?

0

I wanted to update this thread, because I found the actual solution at laracasts

Some of you who replied had the right idea and I did spend the past few days digging into how to clear my apache2 cache and even go so far as to cache nothing. Alas, all was in vain. The commands you provided in the thread,

composer update

and

php clear-complied

didn't do the trick when moving servers.

The correct answer is:

php artisan cache:clear

hope this helps others trying to move between servers!

source

Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

chi11ax chi11ax Joined 13 Oct 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.