Fixing 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)

by | Last updated Feb 6, 2023 | Releases & Updates | 0 comments

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.

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]

Share:

0 Comments

Related Posts

Check out our Plugins

TNC FlipBook - PDF viewer for WordPress is the best-selling premium PDF Reader plugin for WordPress on CodeCanyon (7500+ Sales) since 2014.

Shopify App that can transform images and PDF files to FlipBook on your Shopify store with just a few clicks.

Upload files for specific visitors and restrict them from others by controlling the access with this plugin.

Ready to use Webflow Templates by ThemeNcode with latest and trendy design. Check this out on Webflow Marketplace

Divi Modules, Child Themes, Layouts and many more. All built just for Divi. Make your website creation process easier with Divi.

Easily embed interactive FlipBooks by hosting your PDFs on our cloud platform. Enhance your website with engaging content today!.

Popular Post