View Full Version : Baffled - Blank Page on Editpost and Newreply
Lazorbeam
03-21-2012, 04:05 PM
I've run into a very strange issue when editing or posting "long" posts. Whenever a user (any user including admin) tries to post say, a page of text, he or she just gets a blank page. Shorter posts (few lines) are working just fine.
After hitting the post, edit, or go advanced button, the user is directed to editpost.php or newreply.php but the entire page is blank.
I've not installed any new mods lately or updated/modified any software. This issue appeared out of the blue.
I ran a suspect file diagnostic and neither appears to be suspect.
Any idea?
Disasterpiece
03-21-2012, 05:22 PM
First this: https://www.vbulletin.com/docs/html/blank_pages
Then: Maybe your webserver has a too limited restriction for the overall post data size, which may stop script execution if the sent data is over a defined limit. The phpinfo should tell you the value of that setting in your admincp > maintenance > phpinfo
Lazorbeam
03-22-2012, 07:51 PM
First this: https://www.vbulletin.com/docs/html/blank_pages
Then: Maybe your webserver has a too limited restriction for the overall post data size, which may stop script execution if the sent data is over a defined limit. The phpinfo should tell you the value of that setting in your admincp > maintenance > phpinfo
Thing is, I've posted huge threads in the past. Now one page of text won't work.
Could VBSEO be at fault? Can I safely disable it without breaking everything just to check if it solves the problem?
I just upgraded to 4.1.11 as well, but the problem persists.
From the vbulletin manual:
1. You did not upload the vB files correctly. Reupload the vB non-image files and make sure you upload these in ASCII format and that you overwrite the ones on the server. Make sure you upload the Admin CP files to the admincp directory specified in your config.php file. Then, if you can access the Admin CP, run 'Suspect File Versions' in Diagnostics to make sure you have all the original files for your version:
Admin CP -> Maintenance -> Diagnostics -> Suspect File Versions
Do any show as 'File does not contain expected contents', 'version mismatch' or missing? If so, you need to reupload the original vB non-image files. Make sure you upload these in ASCII format and overwrite the ones on the server.
Files are uploaded fine, the rest of the forums work no problem. Ruled out.
2. You have extra space or lines in your config.php file. Make sure there is no whitespace or extra lines in config.php either before the <?php or after the ?>. [Note: Beginning with 3.6.3 the trailing ?> was removed.]
If config.php was messed up then then entire forum wouldn't work. Ruled out.
3. If this is happening on the forum home page only, then you may have an empty index.html or index.htm file in that directory. Delete it.
No forum index... ruled out.
4. You have a bad plugin installed. To disable the plugin system, edit config.php and add this line right under <?php
define('DISABLE_HOOKS', true);
Note: If you are running vBSEO or other add-ons that use .htaccess rewrite, you will need to remove those changes as well.
Disabled all plugins using the config file and still had the issue. My htaccess file was not changed around the time the problem surfaced.
5. The servername setting in config.php is wrong. Doublecheck this setting. 99% of the time, 'localhost' is correct:
$config['MasterServer']['servername'] = 'localhost';
Definitely not the issue, ruled out.
6. Your PHP has magic_quotes_sybase turned on. You have to turn this off. On *nix systems you can do this by creating an .htaccess file with this content and placing it in your main forum directory:
php_flag magic_quotes_sybase 0
That setting is off. Ruled out.
7. [For multiple white pages] You have added code to your header, headinclude or phpinclude templates that is no longer functional.
[For white pages in a select area] You have added code to one of your templates that is causing this problem.
The quickest way to find out if a custom template is at fault is to create a new style with no parent style and try that:
Admin CP -> Styles & Templates -> Style Manager -> Add New Style
Having the issue with a FRESHLY installed default skin. Ruled out.
8. You have a corrupted template. Repairing the template table may help:
REPAIR TABLE template;
This is possible, but the explanation above hardly tells me what to do. How do I REPAIR TABLE template;? Looks like SQL or some kind.
9. You have GZIP enabled. Try turning GZIP off here:
Admin CP -> vBulletin Options -> Cookies and HTTP Header Options -> GZIP HTML Output -> No
Or by running these queries in the SQL tab in phpMyAdmin:
UPDATE setting SET value = '0' WHERE varname = 'gzipoutput';
UPDATE datastore SET data=REPLACE(data,'s:10:"gzipoutput";i:1;','s:10:"gzipoutput";i:0;') WHERE title='options';
You can also edit config.php and add this right under the <?php line to disable GZIP:
DEFINE('NOZIP', 1);
Sometimes this problem is caused when your server is already using GZIP and by turning this on in vB you were double compressing. This causes problems with some pages but not others. It also happens to some people and not others.
My server is gzipping files, but that setting is turned off. Besides, I've been running the site with gzip for ages. Ruled out.
10. Sometimes this can also be caused when PHP has the 'display_errors' function turned off. So instead of displaying the actual error so you can see what is wrong, you get a blank page. Look at your phpinfo page and if 'display_errors' is Off or '0', then add this line to your includes/config.php file right under <?php
ini_set("display_errors", true);
This setting is on. Ruled out.
11. Check your phpinfo page to see if suhosin is installed as a module. If it is, this could be the cause of this problem. To fix this, add or edit an .htaccess file in your root forum directory and add these lines to it:
php_flag suhosin.cookie.encrypt Off
php_value suhosin.request.max_vars 2048
php_value suhosin.post.max_vars 2048
htaccess was not modified (verified this) when the problem surfaced.
13. This can also be caused by a memory_limit setting in php.ini that causes the server to time out before displaying the page. Edit config.php and add this right under the <?php line:
ini_set('memory_limit', -1);
Right now I'm using 160MB which should be PLENTY.
15. Check the file and directory permissions. Although this can differ by server, in general the directories should be chmod'd to 755 (-rwxr-xr-x) and files to 644 (-rw-r--r--). If any are set to 777 (-rwxrwxrwx) then this could result in blank pages.
editpost.php and newpost.php were both 644, I tried 755 to no avail.
Iain M
03-22-2012, 08:28 PM
Do you have Mod Security installed on your server? That could be blocking it... check your apache error_log.
Lazorbeam
03-22-2012, 09:23 PM
Do you have Mod Security installed on your server? That could be blocking it... check your apache error_log.
I do. I checked mod security and nothing is on the list. I tried a search with %php and found nothing.
Where can I find the error log?
Disasterpiece
03-22-2012, 09:47 PM
normally under /var/log/apache2/error_log
or if you have vhosts configured then in their special directories, should be sufficient to search for "error_log" tho
Lynne
03-22-2012, 11:01 PM
Did you recently update PHP to 5.3? And PCRE to 8.21? There is a bug in PCRE 8.21 that causes issues like you are mentioning. You would need to go back to PCRE 8.20.
Lazorbeam
03-22-2012, 11:04 PM
Do you have Mod Security installed on your server? That could be blocking it... check your apache error_log.
normally under /var/log/apache2/error_log
or if you have vhosts configured then in their special directories, should be sufficient to search for "error_log" tho
I actually found the file after a lot of messing around in SSH, there are no reports containing editpost or newreply, however many vbseo errors. The two relevant ones:
18-Mar-2012 02:30:57] PHP Fatal error: Call to undefined function error_reporting() in /home/site/public_html/vbseo.php on line 15
[19-Mar-2012 03:36:20] PHP Fatal error: Allowed memory size of 167772160 bytes exhausted (tried to allocate 27516809 bytes) in /home/site/public_html/vbseo/includes/functions_vbseo_seo.php on line 120
Which corresponds to
error_reporting(0);
and
$text = preg_replace(array_keys($seo_preg_replace), $seo_preg_replace, $text);
--------------- Added 1332458235 at 1332458235 ---------------
Did you recently update PHP to 5.3? And PCRE to 8.21? There is a bug in PCRE 8.21 that causes issues like you are mentioning. You would need to go back to PCRE 8.20.
I'm not even sure what PCRE is, and PHP wouldn't automatically update itself, would it?
According to phpinfo, PCRE is 8.21 and PH is 5.3.8.
--------------- Added 1332470812 at 1332470812 ---------------
Please close this thread, I have narrowed down the problem and my previous posts here are a little misleading. Starting a new thread.
Lynne
03-23-2012, 04:06 PM
Your problem is PCRE 8.21. There is a bug in it and you will need to go back to PCRE 8.20.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.