Blank-Page problem with CodeIgniter framework

{lang: 'de'}

Code Igniter is a very fast and leightweight PHP-Framework.
Since I transferred my website to a other webhoster my previous installation of CI and my website does not work. I only get a blank page instead of my website content. I searched for days but I found nothing.

Now after a few month (the last month I had not very much time to work on this problem) I begun again to pay the problem my attention. At the first time I workedout the problem I was also searching at CI Forum but I found no solution – only one or two others with the same complications.
Today I took a look at the log files from my webhoster but I found nothing interesting. Afterwards I took a look at the CI log files but the last one were from July. This was weird and I checked out the config-file and see that logging was on (4 = log all).

And now the solution for my problem is:
if you have logging on, you also have to make sure, that the access rights for the log-directory are correct for CI (set it to 777 = all can read, write and execute).

After changing this my website works again properly! :)

Some blank page problem threads at CI forum

Update 20.08.2009

There are also some other reasons which can result in a blank page when calling a CI controller. I use at the moment the actual CodeIgniter Version 1.7.1 at a project and every time I have a syntax error (maybe I forgot a parenthesis or bracket) I got a white blank page instead of a result.
I don´t know till now why CI don´t view a PHP error. Maybe one reason is the environment in which I develope. But I don´t really know …

Update 12.05.2010

I have another solution for the blank-page-problem. If you write a PHP-Script an have a syntax error, CI maybe show a blank page. The problem is the configuration in the php.ini which prevent the system from showing the syntax error. So you have to set display_errors to “on”.

Than maybe another error can occur. If you use PHP 5.2.5 with dompdf as an CI-Plugin and have logging enabled this error message can occur:

Strict Standards: date(): It is not safe to rely on the system's timezone settings. Please use the
date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In
case you used any of those methods and you are still getting this warning, you most likely
misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in
/system/libraries/Log.php on line 102

The error can also occur on line 89. To prevent the system from display this error you have to put a “@” in front of the date()-Function at Line 102 and 89 in the Log.php.
I only found this problem because my automatically generated PDF with the dompdf-Plugin can´t be view in the PDF-Reader. If you open the PDF-Document in a text editor you can see the message.

To get more information about using dompdf as an Plugin in CI see the CI-Wiki article “PDF generation using dompdf“.

Teile diese Seite:
  • Add to favorites
  • MisterWong
  • Yigg
  • Wikio
  • Netvibes
  • Google Bookmarks
  • Google Buzz
  • Digg
  • del.icio.us
  • Technorati
  • Facebook
  • Twitter
  • Slashdot
  • StumbleUpon
  • Reddit
  • LinkedIn
  • NewsVine
  • Print
  • email

Verwandte Beiträge:

  1. Problem with Comodo Firewall Update under Vista
  2. Problem with Comodo Update under Windows XP
  3. How to validate forms with jQuery and CodeIgniter
  4. Problems with Add-ons and Firefox 3.0 portable
  5. Installation of the WordPress Plugin MyCaptcha
  6. Comodo Firewall Update Problems

7 Responses to “Blank-Page problem with CodeIgniter framework”


  • Thank you so much. You have saved my sanity ! I have developed a codeigniter site for the last 6 months on my windows laptop and all was working fine. I have transfered it to my linux host and all I got was a blank page !

    After finding your post I am now able to see my website again.

    Thank you, thank you :)

  • Hi,
    Sicherlich für dich interessant: http://codeigniter.ch Die Deutschsprachige CodeIgniter Community.

    Grüsse,
    Ben.

  • Jo, danke für den Hinweis. Da werde ich auf jeden Fall mal reinschauen!

  • Hi,

    I was faced a blank page after first install CI on a fresh linux redhat box with PHP 5.1.6. I fixed it myself and want to share here.

    I used FileZilla 3.3.1 to upload CI code to the server. At the first page loaded, the browser displayed none. I used die command to investigate error starting at index.php. What I found is in the constructor of Controller class it’s looked like this

    $this->_ci_initia3ze();

    I searched through the class itself and also its parent classes for function named _ci_initia3ze, no such item found, and after I changed it to

    $this->_ci_initialize();

    and

    disable autoload database

    then it worked!! don’t know why it calls to a wrong function name.

    Hope this help,
    Noon

  • Hi Noon.

    Thanks for this information.
    I have also updated my article with a new information about CodeIgniter blank page problem.

  • After working on this problem for 2 days I’ve finally solved it for myself. My solution was unique from what I found online, so here it is.

    I am using CodeIgniter and VirtualMin (latest versions of both as of May 2011).

    SOLUTION:
    sudo apt-get install php5-mysql

    That’s it. mysql_connect wasn’t a recognized function so CI was dieing. For some reason though it wasn’t logging this error. Thus, a white screen of death.

    GL

Leave a Reply

*

 

Oktober 2008
M D M D F S S
« Jul   Nov »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Beste Bewertung

QR Code

qr code

QR code created by QR code Widget


Wikio - Top Blog
Blogverzeichnis - Blog Verzeichnis bloggerei.de
blogoscoop
BlogPingR.de - Blog Ping-Dienst, Blogmonitor
Creative Commons Lizenzvertrag