Tuesday, June 22, 2010

Why my xoops redirect to blank page?

Why do I have a blank white page on my site?

All so-called "blank pages" in Xoops are caused by an error which terminates the script early. The goal of this page is to help you turn some debugging features on so you can get a more meaningful picture of what is going wrong, preferably some error messages. Please keep in mind, there is always an error which is causing the "blank page -- it may just be hard to get at.

You will not get a response in the forums if you just type "Help me, I get a blank page" because there is no way for anyone to tell what is wrong. If you can also give a list of the error messages you see, your chances for solving the problem are much better. (Also don't forget to specify which version of xoops you are running, whether it was an upgrade from a previous version, also your versions of mysql, apache/other webserver, PHP, and which theme and template set you are using. If you are using a lot of non-standard modules, it would be a good idea to list those too.)

A: To turn on debugging try the following things:
=
1. If you can get to admininstration menu, go to Preferences, select 'Main', and find the section on debugging options. Choose "PHP Debugging"

2. If you can't get to the administration page, but have access to mysql, try the query "UPDATE xoops_config SET conf_value=1 WHERE conf_name = 'debug_mode'". Be sure to make sure "xoops_config" matches the name of the config table in your installation. (NOTE: This does not work with XOOPS 2.2, see 2a)

2a. In XOOPS 2.2, go to your site's root file "recovery.php" and set the debug settings through the interface here

3. If you can't get to the administration page, and don't want to mess with mysql, but don't mind messing with PHP, then edit the file "include/common.php". Near line 83, change "error_reporting(0);" to "error_reporting(E_ALL);".

4. If this still doesn't work, your server or hoster may have turned off debugging in "/etc/php.ini" (linux) or "WIN_DIRECTORY/php.ini" (windows). Make sure there is a line in there "display_errors On".

5. If you don't have access to change this file (e.g. on shared hosting), then if the server uses the "apache" webserver, you can create a file called ".htaccess" to override the settings locally. This file should contain the line: "php_flag display_errors on". The tricky part is WHERE to put this file. Look at the URL you are having problems with. Put the file in the corresponding directory. e.g. If it is "someplace.com/xoops/" or "someplace.com/xoops/index.php" then you need to put the file in the main xoops directory. If it is something like "someplace.com/xoops/modules/system/admin.php" then put it in "modules/system" subdirectory of your xoops installation. etc.

credit to: http://www.xoops.org/modules/smartfaq/faq.php?faqid=80

No comments: