Codeigniter shows blank page with no error

2020-03-25 00:55发布

I have one codeigniter app which was working fine on localhost. When I uploaded the same on server, it shows blank page & returning no error. I have also used approx. all method mentioned on Stackoverflow or other sites. Kindly guide me.

UPDATES

I found that there is

$this->load->database();    

When i remove this, it works, but when I add again, it doesn't work. My site is on shared hosting server

4条回答
家丑人穷心不美
2楼-- · 2020-03-25 01:24

First you need to go on root directrory of ci and open index.php file where you get enviornment which by default set to production, so first if you are a developer so change the environment to developer. Then save it and refresh your page. You must show the errors else blank page then if its your database mysql problem then you must firt try this it may help your problem. go to config->database.php and open this file. Where you get

$db['default']['dbdriver'] = 'mysql';

this line you must change this to -

$db['default']['dbdriver'] = 'mysqli';

Hope it will help if not then there must be any other problem. Good luck

查看更多
我只想做你的唯一
3楼-- · 2020-03-25 01:25

@guys solved this issue, there is issue with Server PHP version. Now My website is running successfully. Thanks to all participants

查看更多
神经病院院长
4楼-- · 2020-03-25 01:36

I had the same issue Apparently firefox doesn't show any errors (blank page) but chrome shows error 500.

To fix it you need to install php's fileinto extention (extension=php_fileinfo.dll)

Search based on your OS to see how to do it.

I am using XAMPP in windows 7 - I did it as follows :

1-go to xampp/php/php.ini

2-change  
     ;php_fileinfo.dll
to 
      php_fileinfo.dll

3-save the file
4-restart apache from xampp control
查看更多
ら.Afraid
5楼-- · 2020-03-25 01:45

in index.php file located in your base check

define('ENVIRONMENT', 'development');

if it's not then define it same.

Or you can write

error_reporting(E_ALL);

At end of this file, definitely it should work.

查看更多
登录 后发表回答