last edit 2008-06-19 10:31:52 by Operator Minor edits (quick review to catch and update PN references of all sorts. This article is surely obs

Additions:
By blank pages we're referring to an empty page received by the browser. In some browsers, viewing the source will show

Deletions:
By blank pages we're referring to an empty page received by the browser. In some browsers viewing the source will show


edited 2008-06-19 10:31:19 by Operator Minor edits (quick review to catch and update PN references of all sorts. This article is surely obs

Additions:

Blank pages generated by Zikula and other PHP applications

Blank 'pages' in Zikula

By blank pages we're referring to an empty page received by the browser. In some browsers viewing the source will show
There is no one single cause and this is where the problem in diagnosis lies. The root cause is most commonly an error in one of the PHP files. We see a Blank Page because PHP has been configued to not display any errors generated by PHP scripts.
When you download PHP you find that two configuration files (php.ini files) are provided: one with default settings and one with recommended settings. The recommended configuration has display of errors turned off. So as we see having a Blank Page is not the root problem. We need to dig deeper in order to determine the actual error before any fix can be determined.

Re-configuring PHP to display errors

To identify the root cause, we need to get at the error being generated by PHP. How we do this depends on the level of access available to the server.
If you have access to update the server configuration then you can either alter your PHP configuration to turn on the displaying of errors to the browser or log errors to a file. To display errors in the browser set display_errors = On in php.ini. To log errors to a file set log_errors = On and provide a valid log file in error_log = filename (note 1)
If you don't have access to update the server configuration, the server you use is running Apache and the server allows .htaccess files, then the PHP configuration can be altered this way.
Create a .htaccess file in your Zikula site root (with index.php, admin.php, user.php etc.). Turn on displaying of errors to the browser with


Deletions:

Blank pages generated by Zikula and other PHP applications

Blank 'pages' in PN

By blank pages we're referring to an empty page recieved by the browser. In some browsers viewing the source will show
There is no one single cause and this is where the problem in diagnosis lies. The root cause is most commonly an error in one of the PHP files. We see a Blank Page because PHP has been configued to not display any errors generated by PHP scripts.
When you download PHP you find that two configuration files (php.ini files) are provided a default and a recommended. The recommended configuration has display of errors turned off. So as we see having a Blank Page is not the root problem. We need to dig deeper in order to determine the actual error before any fix can be determined.

Re-configuring PHP to display errors

To identify the root cause we need to get at the error being generated by PHP. How we do this depends on the level of access available to the server.
If you have access to update the server configuration then you can either alter your PHP configuration to turn on the displaying of errors to the browser or log errors to a file. To display errors in the browser set display_errors = On in php.ini. To log errors to a file set log_errors = On and provide a valid log file in error_log = filename (note 1)
If you don't have access to update the server configuration, the server you use is running apache and the server allows .htaccess files then the PHP configuration can be altered this way.
Create a .htaccess file in your PN root (with index.php, admin.php, user.php etc.). Turn on displaying of errors to the browser with



edited 2007-09-14 14:07:49 by pheski added info to show errors if cannot use htaccess

Additions:
If your server does not allow .htaccess files, you can add this to your config.php file to see errors (but be sure to turn it off when through debugging - leaving it on may expose information useful to hackers and will SURELY confuse ordinary users):
%%(PHP)
error_reporting(e_all);



edited 2006-05-31 12:16:52 by markwest fixed minor copy and paste typo

Additions:

Blank 'pages' in PN



Deletions:

]Blank 'pages' in PN[




edited 2006-05-31 12:02:56 by markwest formatted html, added category navigation

Additions:
  1. If on a windows server you can log errors to the server event log using error_log = syslog

Back to the Knowledge Base

CategoryKnowledgeBase


Deletions:
1. If on a windows server you can log errors to the server event log using error_log = syslog


Oldest known version of this page was edited on 2006-05-31 12:01:09 by markwest [ added blank page tutorial ]

Blank pages generated by Zikula and other PHP applications


]Blank 'pages' in PN[


By blank pages we're referring to an empty page recieved by the browser. In some browsers viewing the source will show

<HTML><body></body></html>

What's the cause of these blank pages?


There is no one single cause and this is where the problem in diagnosis lies. The root cause is most commonly an error in one of the PHP files. We see a Blank Page because PHP has been configued to not display any errors generated by PHP scripts.

When you download PHP you find that two configuration files (php.ini files) are provided a default and a recommended. The recommended configuration has display of errors turned off. So as we see having a Blank Page is not the root problem. We need to dig deeper in order to determine the actual error before any fix can be determined.

Re-configuring PHP to display errors


To identify the root cause we need to get at the error being generated by PHP. How we do this depends on the level of access available to the server.

If you have access to update the server configuration then you can either alter your PHP configuration to turn on the displaying of errors to the browser or log errors to a file. To display errors in the browser set display_errors = On in php.ini. To log errors to a file set log_errors = On and provide a valid log file in error_log = filename (note 1)

If you don't have access to update the server configuration, the server you use is running apache and the server allows .htaccess files then the PHP configuration can be altered this way.

Create a .htaccess file in your PN root (with index.php, admin.php, user.php etc.). Turn on displaying of errors to the browser with

php_flag display_errors on

For other server configurations or problems with these directives seek help from either the server administrator, host, generic PHP support or operating system vendor.

What now?


You should now have access to the actual error generated either via the browser window or via the error log. At this point how you procede depends on the error message itself but it will have narrowed the places to look and avenues to seek further help on identifying the problem.

Notes

  1. If on a windows server you can log errors to the server event log using error_log = syslog
last edit:
latest author:
Owner: