Default controller not working |
[eluser]wallern[/eluser]
Hi, I just pulled out an old version of CI (1.7.2) website from ftp, doing some upgrade work. However, after configuration in config, routes, database, .htaccess, I cannot get my default controller running. It looks like the default controller is called but cannot be executed. When I echo out something above the default controller, it appears. Other than that I get a blank white page. As I'm not quite familiar with older version of CI, appreciate if anyone could give me some advise, maybe I missed something. Thanks in advance!
[eluser]InsiteFX[/eluser]
Check for white space in your html file, make sure your pages are not be saved with BOM.
[eluser]wallern[/eluser]
[quote author="InsiteFX" date="1332135963"]Check for white space in your html file, make sure your pages are not be saved with BOM. [/quote] Thanks so much for your reply. However, I don't understand what do you mean by "not be saved with BOM". I checked the page source, it's the same blank, nothing there.
[eluser]wallern[/eluser]
Here is my configuration: my code is in the htdoc root folder, I use xampp. I have a few other websites in subfolders they worked fine, and I just moved them out leave only this website. config.php Code: $config['base_url'] = "http://127.0.0.1/"; .htaccess Code: <IfModule mod_rewrite.c> I use this code to test my DB connection, Code: echo '<pre>'; and it shows: Code: Array So I think the database connection is ok. If need any other info please let me know, I'm really run out of juice on this one. Once again, thanks for help!
[eluser]aquary[/eluser]
Can you check in your error logs? most of the time, if the page got blank, errors should already be logged be the server.
[eluser]wallern[/eluser]
Thanks aquary, I checked error logs in both apache and CI, no error shows when I get the blank page. But the error logs are working, I mean if I deliberately put some wrong code in index.php or config.php or database.php, errors will get booked in the logs. To me it looks like the default controller is not loading. I also have a back end CMS of this site running ok locally, and site itself is working fine on production server, just dosen't show up in my localhost.
[eluser]CroNiX[/eluser]
ini_set('display_errors', 1); error_reporting(E_ALL);
[eluser]wallern[/eluser]
[quote author="CroNiX" date="1332198090"]ini_set('display_errors', 1); error_reporting(E_ALL);[/quote] Thx, I put this code in config.php and then I refresh the page and check error logs, still can't see any updates.
[eluser]InsiteFX[/eluser]
Try changing: Code: // this Also change this .htaccess: Code: // from this
[eluser]wallern[/eluser]
Hi, sorry for my interruption on this topic. The good news is I got it works. After I change the uri protocol to: Code: $config['uri_protocol']="REQUEST_URI"; I finally be able to see one error message: Code: Call to undefined function: curl_init() This two links really helped me: http://www.hotscripts.com/forums/php/261..._init.html http://php.net/manual/en/function.curl-init.php Basically, I enabled curl support in my php.ini file by uncomment this line: Code: extension=php_curl.dll Cheers all! |
Welcome Guest, Not a member yet? Register Sign In |