Model not found when moving to nginx server

Hi,

I have a project build from the basic-template working on my local MAMP install, but when moving it to the testing server (shared enviorment but with vhosts, mostly hosting Drupal pages at this time) it seems that the paths are not working correctly as the Model base clase is not loadign

“Class ‘yii\base\model’ not found” so I assume this is todo with how the classes are setup, or do I need to rerun composer when I deploy it to the server (via git). Considering the index page loads but not the other pages (it checks for login and if not redirects to login form to login on AD) I am quite sure it is something in the nginx conf file, and I am no guru on nginx.

relevant nginx.conf




server {

  charset utf-8;

  client_max_body_size 128M;

  listen 80;

  server_name correct_server_name.com // Removed for security reasons mostly

  root /var/www/yii_appname/web; // yii_appname is something else but se above 

  index index.php

  location / {

    try_files $uri $uri/ index.php?$args /index.php?$args;

  }

  

  location ~ \.php5 {

    include fastcgi_params; // Full path to file due to reasons

    fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;

    fastcgi_pass php55;

    try_files $uri = 404;

  }

 

 // Listen and access logs are correct.  

}




Model:




<?php

 

namespace app\models;

 

use Yii;

use yii\base\model; 

 

class LoginForm extends Model

{

 

    public $username; 

    public $password;

 

    public function rules() {

        return [

            [['username', 'password'], 'required']

        ];

    }

}



Case sensitive!


use yii\base\Model;