PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, December 30, 2021

[FIXED] I did user authentication and in the localhost it works fine but on the server I'm getting this error:: Class '\app\models\User' not found

 December 30, 2021     php, yii, yii2     No comments   

Issue

When running the project online,this is the marked area:

$this->_user = User::findByUsername($this->username);

 

Solution

First check if the \models\User.php exist on server

Second Could be you are using windows in localhost and Linux/Unix on server .. in this case check for correct Case charecter in you class .. could be you have

   `user.php` 

instead of

 `User.php'


Answered By - ScaisEdge
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing