1

As soon as I move my files to my host (at namecheap through Filezilla), only the navbar loads - I use the "codecourse" (previously phpacademy) OOP login/registration system, and the problem seems to be in the classes "../class/xxx.php" being called in "../core/init.php" - I haven't touched any of those files other than changing datebase, but no code has been touched.

The error log (error_log); http://pastebin.com/eZsKrftm

My 'classes' folder; enter image description here

../core/init.php line 21;

require_once($_SERVER['DOCUMENT_ROOT'] . '/classes/' . $class . '.php');

I have no idea how to fix this, I did everything the error_log says is wrong really, I tried renaming all the classes to have a capital front-letter, but that doesn't seem to be it...

The weirdest part about this, is that it works just fine locally (xampp).

6
  • In your log, PHP Warning: require_once(classes/Cookie.php) has an uppercase C when your file cookie.php has not. Commented Dec 4, 2015 at 10:05
  • Your own dev environment was Windows obviously, and now that you have moved your site to Unix Bases systems they are suddenly case sensitive with file names :) Commented Dec 4, 2015 at 10:09
  • I tried that as well. As I said in the post... made the first letter capital, but it didn't do a difference Commented Dec 4, 2015 at 10:11
  • @Hanky웃Panky Don't be sure OS X is case insensitive by default.. Commented Dec 4, 2015 at 10:12
  • @Svetlio I am ;) All unix based systems, including OSX are case-sensitive. AFAIK you cannot change this (and why would you?) Commented Dec 4, 2015 at 10:21

1 Answer 1

2

you are using upper case while using the files but your files are in lower case,

Use strtolower(), for this

require_once($_SERVER['DOCUMENT_ROOT'] . '/classes/' . strtolower($class) . '.php');
                                                       ^                 ^
Sign up to request clarification or add additional context in comments.

1 Comment

Jesus christ, okay, now it doesn't work on my localhost, xampp. Is there like, a "fix" for BOTH platforms?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.