We received this issue from a few users. So, We did a workaround and made a way to fix it.
Some servers add spaces to uploaded files somehow, for encoding type I think but not totally sure. However, due to extra spaces, there’s a warning message displays on top of Viewer.
Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at /home/xxxxx/public_html/wp-content/plugins/pdf-viewer-for-wordpress/web/viewer-shortcode.php:3)
And here’s how you can fix it:
1. Login to your wp-admin with admin user & password.
1. Install & activate Wpide plugin from Plugins->Add New
3. open plugins/pdf-viewer-for-wordpress/web/viewer-shortcode.php
4. replace first few lines with the following code:
ob_start();
session_start();
$scriptPath = dirname(__FILE__);
$path = realpath($scriptPath . '/./');
$filepath = explode("wp-content",$path);
define('WP_USE_THEMES', false);
require(''.$filepath[fusion_builder_container hundred_percent="yes" overflow="visible"][fusion_builder_row][fusion_builder_column type="1_1" background_position="left top" background_color="" border_size="" border_color="" border_style="solid" spacing="yes" background_image="" background_repeat="no-repeat" padding="" margin_top="0px" margin_bottom="0px" class="" id="" animation_type="" animation_speed="0.3" animation_direction="left" hide_on_mobile="no" center_content="no" min_height="none"][0].'/wp-blog-header.php');
***** For some cases, if you still having the issue after replacing lines, please try removing first two lines. that are :
ob_start();
session_start();

First few lines should look like this.
5. Do the same for plugins/pdf-viewer-for-wordpress/web/viewer.php
6. make sure there is no extra space on the first line before or after
7. Save the Files.
The error should be gone now…
Please Contact Support if you still having the issue or need our help to get it done.
Thank You[/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]
0 Comments