1
votes

I'm uploading my laravel 4 app to a testing server which is shared hosting.

I'm uploading to a password protected directory which has a .htaccess file within it. My subdomain points to the public folder.

For the most part they app is working as expected I can log in, view most of the pages however every class that I have created such as a helper class and additional controllers are not being found on the live server yet all works on my local environment.

I've redone a composer dump-autoload and uploaded the composer.json file

I'm not sure where to start with this.

In my upload I've included all the files and folders to the live server (twice now). I read somewhere else I should namespace my classes but why would this help if the main laravel controllers do not namespace?

Confused - all help appreciated

2
What is the exact error message? Does this concern only and all the classes you added yourself? Are you using abolute paths in the composer classmap? Do you have multiple environments set up in laravel with different config-files? Which PHP-version is the server running? - Quasdunk
Check your spelling. Some servers are case sensitive so they can't find a class. - JackPoint
What is the name of the class that cannot be found? Also double-check spelling for case sensitivity. Typically Windows environment is not case sensitive about file naming, whily Unix-based environments are. - Glad To Help
In the end a simple case sensitivity per JackPoint comment. Frustrating. Thank you all - Ray

2 Answers

2
votes

When you do a composer update, if Composer finds anything new it will update some files in the folder

vendor/composer 

Like the file autoload_classmap.php.

So, you have to reupload at least this folder too.

0
votes

Maybe it's about git, you are pushing changings with some certain case sensitive Folders and Files, but git is changing this therefore it will work on Mac and Windows OSs but not on the server.

just use this command:

git config core.ignorecase false

above command for the current repository and you may add --global just after config keyword.

please note that ignorecase option available since version 1.5.6 and I assume you are running 2.0.x but just mentioning!