开发者

CodeIgniter 2.0.2 syntax error blank page

CodeIgniter 2.0.2 syntax error blank page

i have CodeIgniter 2.0.2 (CI) and its annoing, that when i writ开发者_StackOverflow中文版e lots of code and then just get blank page. Hard to debug without error. i got error reporting E_ALL in php.ini and in config of CI its turned on for every case of enviroment (devel, product) just for sure...

Does anyone knows, where the bug can be? How to turn it on? I think CI is rewriting php.ini error reporting setting somewhere somehow...

Thanks.


The other thing to check in your php.ini are the 'display_errors' and 'display_startup_errors' variables, they should both be set to 1.


In my (little) experience with CI this issue has been the most frustating one. I can understand that no framework is perfect, and any web developer is used to deal with errors (no matter if the framework or the developer is to blame). But that ANY error results in a blank page, with ZERO information in logs, console, whatever, is unacceptable.

If I recall correctly, in my case this was caused by of some combination of CI (ab)using the "silent error" PHP operator (e.g. prepending some db statements with the @ operator, a not very clever way of avoiding leaking potentially private information to the end user), together with some bad use of *error_reporting*. See my post here (and see how many answers I got!).

I reported another related CI's idiocyidiosyncrasy related with logging here (again, zero answers)


please check the index.php which locate in the SAME LEVEL of the application folder inside the index.php the second line

line 2:

ini_set("display_errors", "1");  //ensure it is set to 1

line 23:

define('ENVIRONMENT', 'development'); // development | testing | production 

grep your php.ini for the word "error", turn them to On etc...


Do you have output compression turned on in the config? I find that will cause white pages when you have errors.

$config['compress_output'] = FALSE; // Should be set to this when developing. 


I had the same problem and eventually fixed it when i noticed I had no 'logs' directory in my application folder

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜