debugging on the server |
I am using phpStorm and have developed my entire app with it. I have uploaded the code to AWS. I can get it to start up fine by typing in the ipaddressofserver/sub_crud. However when I try to login to my app I get:
A PHP Error was encountered Severity: Notice Message: Undefined property: Users::$user Filename: controllers/Users.php Line Number: 84 Backtrace: File: /opt/bitnami/apache2/htdocs/sub_crud/application/controllers/Users.php Line: 84 Function: _error_handler File: /opt/bitnami/apache2/htdocs/sub_crud/index.php Line: 316 Function: require_once This makes no sense to me since there is no mention of $user anywhere in that module! The code on line 84 is: $checkLogin = $this->user->getRows($con); Regardless, I think that for me to move ahead I will need to debug the code on the remote server, just so I can see what is going on. So I am trying to set up remote debugging. I have phpStorm on my PC and Putty with an ssh tunnel. I set the xdebug port in phpStorm to 8888 since that is the port for the tunnel (that Bitnami suggests). I am not getting any connection back to my debugger when I start up my app. Anyone have any idea what I am doing wrong?
proof that an old dog can learn new tricks
Oh yeah, below the error above, on the same screen I get:
( ! ) Fatal error: Call to a member function getRows() on null in /opt/bitnami/apache2/htdocs/sub_crud/application/controllers/Users.php on line 84 Call Stack # Time Memory Function Location 1 0.0001 247864 {main}( ) .../index.php:0 2 0.0002 250744 require_once( '/opt/bitnami/apache2/htdocs/sub_crud/system/core/CodeIgniter.php' ) .../index.php:316 3 0.0034 877320 call_user_func_array:{/opt/bitnami/apache2/htdocs/sub_crud/system/core/CodeIgniter.php:532} ( ) .../CodeIgniter.php:532 4 0.0034 878112 Users->login( ) .../CodeIgniter.php:532 A PHP Error was encountered Severity: Error Message: Call to a member function getRows() on null Filename: controllers/Users.php Line Number: 84 Backtrace:
proof that an old dog can learn new tricks
It sounds like your User model is not being properly loaded, which could stem from a database configuration problem.
Interesting. That makes more sense. I do have a model called User.php which is involved in the login. But how would I go about tracking that down? Perhaps I need to take a look at database.php?
This is my $db $db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => 'root', 'password' => 'xxxxxxxxxx', 'database' => 'substantiator', 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, 'db_debug' => (ENVIRONMENT !== 'production'), 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE );
proof that an old dog can learn new tricks
I am getting this error on the server version of my code. Anyone know what this is?
PHP Error was encountered Severity: Core Warning Message: Cannot open 'C:\xampp\php\extras\browscap.ini' for reading Filename: Unknown Line Number: 0 Backtrace:
proof that an old dog can learn new tricks
Well I decided to go back to the Windows version (that runs on my local Apache) and I am having the same problem. This is the line that is failing:
$checkLogin = $this->user->getRows($con); The value of $con in my debugger is: $con = {array}[2] returnType="single" conditions= {array}[3] email="[email protected]" password="y...." status="1" The call to getRows() is failing with an error of severity 8. It says "Undefined property: Users::$user" Does anyone know why this would be failing or what severity 8 means? This code has been working for a while. Perhaps it was an accidental change to the php.ini?
proof that an old dog can learn new tricks
I think the problem has been found. The call should have been
$checkLogin = $this->User->getRows($con); I guess this is the Windows vs Linux capitalization "thing".
proof that an old dog can learn new tricks
|
Welcome Guest, Not a member yet? Register Sign In |