0

I have an application running in my localhost developed in codeigniter. I uploaded to server but the application doesn't run. All credentials have been changed to match the server settings. I have viewed this answers but seem irrelevant to my situation as it is running in localhost: Error message Strict standards: Non-static method should not be called statically in php and Codeigniter Model Fatal error: Using $this when not in object context

The error I'm getting is here:

A PHP Error was encountered

Severity: 8192

Message: Non-static method login::index() should not be called statically

Filename: MX/Controller.php

Line Number: 169

Fatal error: Uncaught Error: Using $this when not in object context in

/var/www/html/stallion/application/modules/admin/controllers/login.php:13 

Stack trace: #0 

/var/www/html/stallion/application/third_party/MX/Controller.php(169): login::index() #1 

/var/www/html/stallion/system/core/CodeIgniter.php(326): 
 MX_Controller->_remap('index', Array) 
 #2 /var/www/html/stallion/index.php(203): 

 require_once('/var/www/html/s...') #3 {main} thrown in 

 /var/www/html/stallion/application/modules/admin/controllers/login.php on line 13

Thanks.

I'm running this on Ubuntu 14.0 php version 7.0 so I can't understand why it's working in my localhost and on the server I get this error!

Pradeep
  • 9,667
  • 13
  • 27
  • 34
  • there's a lot of answers here: https://www.google.pt/search?q=Non-static+method+login%3A%3Aindex%28%29+should+not+be+called+statically&ie=utf-8&oe=utf-8&client=firefox-b-ab&gfe_rd=cr&dcr=0&ei=h-AvWtbcLeaJ8QfA9IqgBQ – Vickel Dec 12 '17 at 14:02
  • None of these are relevant to my question – vigillantwarrior Dec 12 '17 at 14:14
  • how do you want to get some help, if you only post an error message...and what's the OS of localhost? do you use `static` somewhere? – Vickel Dec 12 '17 at 14:27
  • hi thanks for your reply. My localhost OS is Ubuntu and so is the server. I reckon it's a php issue because I just uploaded to a different server and it works fine. Same OS but different php versions. – vigillantwarrior Dec 14 '17 at 10:09
  • CI 3.0 needs php 5.6 or later – Vickel Dec 14 '17 at 14:49

1 Answers1

0

I reckon it's a php issue because I just uploaded to a different server and it works fine. Same OS but different php versions