Controller wont "run" - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Controller wont "run" (/showthread.php?tid=50796) |
Controller wont "run" - El Forum - 04-09-2012 [eluser]RAH[/eluser] Hi, I have a project/controller that runs perfect on my local environment, but when I run it online it breaks. I don't get anything in my logs, I don't get any errors even with error_reporting(E_ALL) and display_errors: 1. I can echo stuff before and after the class, but the class dosn't run. What can it be? It works locally so I guess it has to be something with the host. This project is on a subdomain, and I have another project on the main domain that uses mod_rewrite and works. Here is my default controller: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); base url is correct, and url_protocol is set to AUTO. I have tried every option in the url_protocol. Thanks Controller wont "run" - El Forum - 04-09-2012 [eluser]Samus[/eluser] [quote author="RAH" date="1333990073"]Hi, I have a project/controller that runs perfect on my local environment, but when I run it online it breaks. I don't get anything in my logs, I don't get any errors even with error_reporting(E_ALL) and display_errors: 1. I can echo stuff before and after the class, but the class dosn't run. What can it be? It works locally so I guess it has to be something with the host. This project is on a subdomain, and I have another project on the main domain that uses mod_rewrite and works. Here is my default controller: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); base url is correct, and url_protocol is set to AUTO. I have tried every option in the url_protocol. Thanks[/quote] this might sound obvious, but check the uploaded version? could possibly be truncated. it happened to me before and I noticed all my code was on one line rather than in multiple lines as i uploaded it. which caused all my code to break Controller wont "run" - El Forum - 04-09-2012 [eluser]craig.hoog[/eluser] Whenever I have this issue, it usually has nothing to do with the Controller (oddly enough). If I am getting no error messages at all, it tends to be a sign that the issue is in one of my Helper files. I would make sure your Autoload is the same locally as it is online and double check your authentication plugin is working. Controller wont "run" - El Forum - 04-24-2012 [eluser]RAH[/eluser] Hi, Thanks for the suggestions, and sorry for the late reply. I contacted the host, and the said the forced this error: A PHP Error was encountered Severity: Notice Message: Undefined variable: class Filename: core/CodeIgniter.php Line Number: 307 A PHP Error was encountered Severity: Notice Message: Undefined variable: method Filename: core/CodeIgniter.php Line Number: 307 A PHP Error was encountered Severity: Notice Message: Undefined variable: class Filename: core/CodeIgniter.php Line Number: 309 Fatal error: Class name must be a valid object or a string in /hsphere/local/home/ungdo918/cp.ungdomsfabrikken.no/system/core/CodeIgniter.php on line 309 line 309 is blank, 308 is: $CI = new $class(); It doesn't look like it's the autoloader/helper Controller wont "run" - El Forum - 04-24-2012 [eluser]InsiteFX[/eluser] Some servers require that all your file names be lowercase! Controller wont "run" - El Forum - 04-24-2012 [eluser]RAH[/eluser] hmmm... I try to run this on a subdomain, wouldn't it require all lowercase names on the main domain too if this was the case? I successfully run a codeigniter system on the top domain. Controller wont "run" - El Forum - 04-24-2012 [eluser]InsiteFX[/eluser] Try renaming your main .htaccess to something else and see if the sub-domain works! It could be stoping the sub-domain because sub-domains are directories off of the main domain. If that is the case you will need to create an .htaccess file for the sub-domain also. I have a main domain with 2 sub-domains and have no problems running them. Controller wont "run" - El Forum - 04-24-2012 [eluser]CroNiX[/eluser] That's not necessarily true that subdomains are in a subdirectory of the main domain. Not all hosting control panels set things up that way. Controller wont "run" - El Forum - 04-24-2012 [eluser]phpfresher[/eluser] May be , this error is due to .htaccess file . I got similar type of error due to .htaccess file. Not sure but this problem may work if you fix the .htaccess file |