-2

Codeigniter code is working great on my local. I uploaded pages to live server I can see the login page, once I enter username and password I see a blank page. I made necessary base_url changes:

$config['base_url'] = 'http://myurl.com/incidents/';
$config['index_page'] = 'backend.php';

Any suggestions?

Andrea
  • 11,801
  • 17
  • 65
  • 72
CyberFla
  • 71
  • 12
  • 1
    `$config['index_page'] = 'backend.php';` should be `$config['index_page'] = 'index.php';` to configure routes look in to http://www.codeigniter.com/user_guide/general/routing.html –  Sep 13 '15 at 11:01
  • what setup does your life server have ? is it nginx + php-fpm or apache with php fcgi etc .. what is your local stack ? there migth be some other differences why things are not working – DarkMukke Sep 15 '15 at 10:12
  • #DarkMukke I have godaddy linux, PHP environment. On my local I am running Xammp – CyberFla Sep 16 '15 at 13:55

2 Answers2

0

PHP version was causing the problem. On my local I have 5.6.8 and on Godaddy and bluehost were using 5.4.x. For testing purposes I've uploaded my files to two different hosting environments and got the same error. As a result I just wanted to upgrade the bluehost php version and the application works fine now. Thanks for your time.

CyberFla
  • 71
  • 12
-1

There may be errors on your page. You can display them by setting ENVIRONMENT to development in your index.php

Also, make sure your target page link (when you click login) is properly routed.

Edit:

Try adding the following lines to the top of your .htaccess file

Options +FollowSymLinks -MultiViews 
aravindanve
  • 979
  • 7
  • 14
  • Did you make sure your `.htaccess` file got uploaded properly? – aravindanve Sep 16 '15 at 15:52
  • And, have you tried this? [http://stackoverflow.com/a/19197074/4274918](http://stackoverflow.com/a/19197074/4274918) – aravindanve Sep 16 '15 at 15:55
  • .htaccess as follows. I am not sure if this is what you mean. 'RewriteEngine on RewriteCond $1 !^(index\.php|backend\.php|assets|robots\.txt) RewriteRule ^(.*)$ ./index.php/$1 [L]' – CyberFla Sep 16 '15 at 16:04
  • It's CodeIgniter... simply set `ENVIRONMENT` to `development` and all errors will be shown. – Sparky Sep 16 '15 at 16:52
  • switch (ENVIRONMENT) { case 'development': error_reporting(-1); ini_set('display_errors', 1); break; case 'testing': case 'production': ini_set('display_errors', 0); if (version_compare(PHP_VERSION, '5.3', '>=')) { error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); } else { error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); } break; default: header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); echo 'The application environment is not set correctly.'; exit(1); // EXIT_ERROR } NO ERROR msg – CyberFla Sep 16 '15 at 17:17
  • It could be a database issue. Look at this thread. And try the checklist. [http://stackoverflow.com/a/1262394/4274918](http://stackoverflow.com/a/1262394/4274918) – aravindanve Sep 16 '15 at 19:32
  • Try this first. Then the checklist from the link above. Set `$db['default']['db_debug']` to `TRUE` – aravindanve Sep 16 '15 at 19:34
  • try to execute this code on the suspecting file(s): error_reporting(E_ALL); ini_set('display_errors', 1); see if it helps. – Jeremy Sep 17 '15 at 09:20