Classes do not load! Script runs on xampp but does not run on LAMP/LEMP/VPS

Asked

Viewed 80 times

0

Guys, I made a very light and simple script.

In xampp it runs normal, but when I go up to any server does not go at all.

I’ve tried the Lamp, Lemp (From Digital Ocean), at VPS (Dreamhost), but it really won’t.

The first class to make a mistake was the config, but I copied it right into controller there worked.

In the log, get this error:

[Mon Jan 29 04:21:41.390298 2018] [:error] [pid 15756] [client 76.4.107.182:50472] PHP Fatal error: Uncaught Error: Class 'Pages' not found in /var/www/html/partners/controllers/paginatrolleConr.php:10 nStack trace: n#0 /var/www/html/partners/core/Core.php(46): paginaController->index('home') n#1 /var/www/html/partners/index.php(23): Core->run() n#2 {main} n thrown in /var/www/html/partners/controllers/paginaController.php on line 10

My xampp is php 5.6 I installed a new server with php 5.6 too, and it doesn’t run the same way.

xampp comes with more enabled things?

  • 1

    You programmed in Windows probably, and played in a vps linux, maybe it’s the famous case insensitive

  • 1

    It is difficult to give a better answer without your code, what Guilherme said is quite possible, if not the case check the PHP version. It has certain functions that have been discontinued, __autoload itself does not work in PHP 7.2. Sometimes it’s the other way around, you’ve developed code molded into PHP7 and climbed onto a server with a lower version, which can lead to fatal failures as is the case. Place a file with the function phpinfo(); on the localhost and online and compare the characters of each server, if they are equal post here your class load code.

  • I’ll open the phpinfo of the two and see what the difference and return here !

  • I changed the php version and the problem persists ! =(

  • Using MVC standard? any framework? Post the code that requests the pages.

1 answer

0


I found out, it was the same sensitive !

the classes had the first minute letter, so I didn’t think!

Thank you all !

Browser other questions tagged

You are not signed in. Login or sign up in order to post.