Blank page with no errors problem |
[eluser]Tom Vogt[/eluser]
I'm installing an existing and tested CI application on a new server, and I can't get it to work for the life of me. There are no error messages in the apache log, no error messages displayed (even with E_ALL on and the app set to development) and no error messages anywhere else. With some manual fiddling, I've tracked down the point where it stops to here in core/CodeIgniter.php: Code: /* specifically, the $CI = new $class() line. Execution simply stops there. An echo statement right above still gets displayed, one afterwards not. $class is correctly set to my controller class name. If I call the index.php directly in the URL, I do get an error message: Quote: Fatal error: Class 'CI_Controller' not found in /home/brtool/htdocs/system/core/CodeIgniter.php on line 233 Which makes even less sense to me. (line 233 is this ![]() Code: 231 function &get;_instance() WTF is going on here ? I'm using CI 2.1 and PHP 5.4.4 - the same version the server where everything works just fine is using. Totally lost here and thankful for any and all hints. Just figuring out what the fuck is going on would be a great help to me.
[eluser]AlexandrosG[/eluser]
Hi! I have posted an almost same problem a few hour ago and i have just solved it (partially). Please tell me first what are O.Ses of the old and new server. In my case the problem was the controller file naming. You should use a capital letter for the first letter of the controller's class file.
[eluser]Tom Vogt[/eluser]
That could be it, as I'm developing on OS X and my server is Linux. Except... that the server where everything works perfectly fine is also Linux.
[eluser]AlexandrosG[/eluser]
Are your paths ok? I am refering to the (BASEPATH, ROOTPATH, APPPATH). Especially APPPATH, which is used a lot in routing.
[eluser]ivantcholakov[/eluser]
Copy the file system/core/CodeIgniter.php as a new file application/core/MY_CodeIgniter.php. Make the following change within your front controller index.php: Code: /* In MY_CodeIgniter.php find the fragment: Code: // Load the base controller class , modify it as follows: Code: // Load the base controller class and at the beginning of the file add the commented "require" statement, here is the place: Code: /* Tests locally these modifications, the application should run, after that upload them on the production server. See what would happen. This is not a solution of your problem yet, you have a chance to see a more informative error message. My guess is that the class CI_Lang (it uses get_instance() internally) tries to translate an error message before a controller is instantiated. Most probably the database driver is trying to complain. I think, you should check your database connection eventually. ------------------ How it is possible to happen? If you have a routing system based on slugs (and they are within database tables), then you force connection to the database early, before the controller has been instantiated. This is a case when get_instance() calls fail, if something is wrong with the database connection.
[eluser]CroNiX[/eluser]
Do you have php set to display errors to the screen?
[eluser]Tom Vogt[/eluser]
Quick update: Alexandros was right on the case issue. The silent fail is now gone and I'm stuck with the error message I posted. Digging into that now.
[eluser]Tom Vogt[/eluser]
Ok, checked a bunch of things to fix the remaining error. My database connection should work, I can connect from the commandline using the credentials from the config file. I don't use the database in routing, here's my routes.php: Code: $route['default_controller'] = "info"; That second part might look weird, but it's due to some rewrite stuff I do for sub-sites. Think http://example.com/en/controller/method.
[eluser]Tom Vogt[/eluser]
[quote author="CroNiX" date="1375805601"]Do you have php set to display errors to the screen?[/quote] Yes, and I log them as well, and the "fatal error" line is the only thing that shows up.
[eluser]Tom Vogt[/eluser]
Ok, I'm back to lowercase filenames, because according to the CI documentations, that is how it should be and the capitalized ones lead to 404 errors. I tried the MY_CodeIgniter change and it does nothing. So I'm still at silent fail. Here's the application logfile: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?> |
Welcome Guest, Not a member yet? Register Sign In |