Hi,

I'm having a problem whenever I submit anything either updating or making an edit to an entry it goes to a blank white screen. What could the cause of this be?

Thanks,
pat

Comments

ChrisBryant’s picture

Hi Pat,
The first thing I would check is the memory limit for PHP. Your host usually sets this and you may need to ask them to increase the memory limit for your domain/account. Sometimes you can change it by adding a setting in your .htaccess file. You can check what the limit is yourself by creating and uploading a file named something like "phpinfo.php with the following code in there:

<?php
phpinfo();
?>

Then point your browser to that file like: http://yourdomain.com/phpinfo.php

Then look for a line that says:

memory_limit	32M	8M

If the number is very low then that is likely the problem.

Check your Drupal .htaccess file in your root folder for the following lines:

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

# PHP 4, Apache 1
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
</IfModule>

# PHP 4, Apache 2
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
</IfModule>

# PHP 5, Apache 1 and 2
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
</IfModule>

And change it to something like this: (the memory_limit is the important one and the others are in cause you are uploading large files. Feel free to change the number higher if needed)

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

# PHP 4, Apache 1
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value memory_limit                    64M
  php_value post_max_size                   20M
  php_value upload_max_filesize             10M
</IfModule>

# PHP 4, Apache 2
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value memory_limit                    64M
  php_value post_max_size                   20M
  php_value upload_max_filesize             10M
</IfModule>

# PHP 5, Apache 1 and 2
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value memory_limit                    64M
  php_value post_max_size                   20M
  php_value upload_max_filesize           10M
</IfModule>

I hope that helps,
Chris


ALIAN DESIGN

patoshi’s picture

Thanks Alian... I adjusted those 2 things and it still doesnt work. I changed mem limit to 32M and adjusted the htaccess file, but I still get a blank white screen after I submit any kind of form... what else can i do to diagnose this problem so i can show u all?

nevets’s picture

All (most) core files and theme files are saved in UTF-8 format (2 bytes per character). If you edit on of these files with an editor that does not handle UTF-8 and especally if the file starts with <?php the odds are it now has "unexpected" characters that cause problems.

WeRockYourWeb.com’s picture

Good point duckxtales,

For me the problem was a blank space in my template.php file after the last ?>

Alex
----------
Contract Web Development

patoshi’s picture

THANKS ALOT!!!!!... this worked... it was the stupid Blank lines after the ?>

This would drive people nuts cuz of blank lines.... its hard to debug such a thing like this.... i hope this helps someone.. more keywords people might search for:

blank white screen submit submission

hammoco’s picture

I had exactly the same blank screen problem which was essentially down to the blank lines at the end of my template.php file. So thanks for posting this thread, I was getting worried for a minute

zirafa’s picture

This will also happen if you have a blank line above your beginning <?php line.

jrefano’s picture

Thanks for posting this. Seems like some extra spaces in the template file shouldn't break form submissions on your whole site, but it sure does.

patbranch’s picture

After trying all that stuff it was a damn ` before the php tag on a module...

gbataille’s picture

This is ridiculous to search for a blank space....

Is there a working version somewhere?

casey_2000’s picture

I found out that if there are files in different encodings on the site, then it gives blank screen. In my case it was utf8 files with ANSI in module VIEWS (because I edited them, without looking at the encoding).

So check that ALL FILES are in the same encoding (For example using notepad++). Hope this will help.

Sorry for my English, I hadn't practice for a long time.

Gogowitsch’s picture

None of the above helped me. Instead, I had to delete the content of a search index table. My actual problem source was a node with the PHP input format that contained a die() call, and I assume a PHP sytax error would cause the same problem.