Mar 24, 2009

Blank (empty) page in TYPO3

There is a question that I see several times monthly in TYPO3 mailing lists: "I see an empty (blank) page after XXX. How do I fix it?". Here is the step by step answer:

  • Go to the Install tool
  • Select "All configuration"
  • Set displayErrors to 2
  • Add your IP address to devIPmask

Now you will see PHP errors that happen. By default these errors are hidden by TYPO3 for security reasons and it causes blank pages. Changing settings above allows to see these errors on your IP address only.

So fix these PHP errors and your site will be back.

[Update: Feb 18, 2014] Alternatively you can check the web server error log for such errors. You can see something like:

[Fri Feb 14 15:16:14 2014] [error] [client 127.0.0.1] PHP Fatal error:  require_once(): Failed opening required '/Users/.../typo3master/typo3/sysext/cms/tslib/class.tslib_fe.php' (include_path='/Users/.../typo3master/typo3conf/ext/phpunit/Composer/vendor/phpunit/php-text-template:/Users/.../typo3master/typo3conf/ext/phpunit/Composer/vendor/phpunit/phpunit-mock-objects:/Users/.../typo3master/typo3conf/ext/phpunit/Composer/vendor/phpunit/php-timer:/Users/.../typo3master/typo3conf/ext/phpunit/Composer/vendor/phpunit/php-token-stream:/Users/.../typo3master/typo3conf/ext/phpunit/Composer/vendor/phpunit/php-file-iterator:/Users/.../typo3master/typo3conf/ext/phpunit/Composer/vendor/phpunit/php-code-coverage:/Users/.../typo3master/typo3conf/ext/phpunit/Composer/vendor/phpunit/phpunit:/Users/.../typo3master/typo3conf/ext/phpunit/Composer/vendor/symfony/yaml:/Users/.../typo3master/typo3conf/ext/phpunit/Composer/vendor/phpunit/phpunit-selenium:/Users/dima/Project in /Users/.../TYPO3/Extensions/pagepath/class.tx_pagepath_resolver.php on line 95
[Fri Feb 14 15:16:14 2014] [error] [client 127.0.0.1] PHP Stack trace:
[Fri Feb 14 15:16:14 2014] [error] [client 127.0.0.1] PHP   1. {main}() /Users/.../TYPO3/TYPO3-master/index.php:0
[Fri Feb 14 15:16:14 2014] [error] [client 127.0.0.1] PHP   2. require() /Users/.../TYPO3/TYPO3-master/index.php:41
[Fri Feb 14 15:16:14 2014] [error] [client 127.0.0.1] PHP   3. require() /Users/.../TYPO3/TYPO3-master/typo3/sysext/cms/tslib/index_ts.php:68
[Fri Feb 14 15:16:14 2014] [error] [client 127.0.0.1] PHP   4. tx_pagepath_resolver->main() /Users/.../TYPO3/Extensions/pagepath/class.tx_pagepath_resolver.php:130
[Fri Feb 14 15:16:14 2014] [error] [client 127.0.0.1] PHP   5. tx_pagepath_resolver->createTSFE() /Users/.../TYPO3/Extensions/pagepath/class.tx_pagepath_resolver.php:64

19 comments:

  1. If 'log_errors' is switched on (PHP config) have a look at the error.log file of your web server.

    ReplyDelete
  2. Be careful if you don't have a public IP of your own.

    Just go and see the logs. Even for shared hosting they should allow you to view your log in cPanel.

    ReplyDelete
  3. Many thanks to you MAN.

    ReplyDelete
  4. This post saved my life tonight. Thank you!

    ReplyDelete
  5. I can't even go to the install tool. I'm trying to install it for the first time and I have a blank page.

    ReplyDelete
  6. For me it depends on the very error that's occuring:

    A simple PHP error (a.e. a syntax error) can be fixed and afterwards all is fine. Counts for MySQL errors as well.



    But if I get a PHP error regarding function calls (a.e. "Call to a member function..." or "Call to undefined function..."), the page won't come back after fixing the error.



    It drives my nuts, because nobody seems to have this error... and while extension developing such an error happens due to typos.



    The only "fix" I could come up with: Copy the page (you don't need to change anything else) and _then_ the page will be back (under a different ID tho).



    Any ideas on that?

    ReplyDelete
  7. Hello,



    I have just upgraded from typo3 4.2.9 and right after uploading the files and comparing the DB in the install tool, i was able to use the backend, because my session was still active.



    However, after my BE session expired, I tried to login again. Unfortunately, the login page just displayes a blank screen. I cannot even see the username/password box. I did set the setting to Set displayErrors to 2 and added my IP, but the page is still blank. Yes, I deleted all files with temp_ and deleted the temp folders via the install tool as well. The FE works just fine.



    Any ideas?



    Thank you in advance!

    ReplyDelete
  8. Hello,



    I finally got in. How? I replaced the typo3/index.php file of v 4.3 with the typo3/index.php file of v 4.2.9



    This is absolutely not ideal, but at least I can get into my typo3 BE and have now time to see why the typo3/index.php of v 4.3 doesn't work for me.



    Has anybody had similar experiences with the BE login of v 4.3?

    ReplyDelete
  9. Hi,



    Same problem here, I tried the error logs but they show nothing.



    Same blank page in the backend too :( I'll have to go back to the previous version..

    ReplyDelete
  10. Hi,



    I had the same problem after upgrading from 4.2.6 to 4.3.2 . To resolve it I had to :

    1. "uninstall" non system extension modifying directly in localconf.php

    2. login

    3. update and re-install extensions



    Regards.

    ReplyDelete
  11. Simon StrandgaardJune 24, 2010 at 11:24 AM

    Thank you Dmitry for this excellent hint.

    ReplyDelete
  12. Hi Alam,



    > I have a typo3 website vr 4.0beta3

    Why are you running such an old version of TYPO3 (which has open security holes and so on..)?



    > and it was working fine but when i upgrade my hosting space

    upgrade your TYPO3 first, then upgrade your environment/move to new server.



    > i have problem in backend like if i wanna to clear the cash memory it's disappear all right column and also when i wanna to add new news it's not save and disappear.

    ReplyDelete
  13. Thank you for your help. it's great to have expertise available to equip us to return that expertise to others as we grow better.

    ReplyDelete
  14. Thanks Dmitry!



    I just love seeing all the references to this page. It's like debug 101 explained.



    Michael

    ReplyDelete
  15. hi, i'm having the same error :
    after the last step of installing the introduction package, i have a blank page
    the link above on this blank page is : http://127.0.0.1/typo3_5/typo3/install/index.php?TYPO3_INSTALL[type]=database&mode=123&step=5&subpackage=Introduction

    i checked the logs (all the ones of easyphp) but found nothing

    please please be kind and help me, i already spent a day on this :-(

    ReplyDelete
  16. If your php does not have mysql enabled, typo3 dies without error messages. Why? I don't know.

    Enable mysql in php.ini by adding lines:
    extension = php_mysql.dll
    extension_dir = /path_to_php/ext

    restart Apache

    ReplyDelete
  17. Tp the last commenter: have a look to TYPO3 system requirements. They clearly say that MySQL or other compatible database is mandatory.

    When you run a car, it will not work without gazoline. Same for TYPO3: it will not work without a database.

    ReplyDelete
  18. Dmitri you genius! helped get some debug information. But now I dont know how to fix the following:

    Fatal error: Call to a member function getCache() on a non-object in ...\typo3\sysext\lang\hooks\clearcache\class.tx_lang_clearcache.php on line 54

    ReplyDelete