We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Model could not be loaded when upload it to my remote server

Hello everyone, I'm quite lost now, i have an app fully working on localhost on differente computers. I was uploading the updates time to time to the remote server, but since last upload i just get -Model could not be loaded- all the time that tries to access to some database table. I've checked everything and all seems ok, even the nginx error log is empty, the pages were you dont need to be login works perfect and the database service is running and i can query perfectly...any help? I've been hours and I don't know were to look.

PD:Off course i tried restarting and the result is the same.

Check if the names of the files and directories are written in the same case as the ones in the PHP files. Also, you can try to check which files are being loaded by the autoloader: https://docs.phalcon.io/en/latest/reference/loader.html#autoloading-events

They must be, I copied every single folder(except config, but i checkt that is right configured) from local to the remote server. In local works absolutly fine. The only thing that fails in the server are models. I keep checking btw.

Check if the names of the files and directories are written in the same case as the ones in the PHP files. Also, you can try to check which files are being loaded by the autoloader: https://docs.phalcon.io/en/latest/reference/loader.html#autoloading-events

Ok u right, Phalcon model name creates Name model on windows but that in Debian isnt ok, but just when u reference other model. Lets say, (new User)->create() is ok on both even if the db table is 'user'. This works on both "Select from user", but not in debian this: "Select from user join location on location.id = user.idlocation" if model is Location.

Check if the names of the files and directories are written in the same case as the ones in the PHP files. Also, you can try to check which files are being loaded by the autoloader: https://docs.phalcon.io/en/latest/reference/loader.html#autoloading-events