#1 WordPress forum plugin created by gVectors Team

wpForo – WordPress Forum Plugin
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation

Forum

Home | Forum

wpDiscuz - WordPress Comment Plugin
  • Forums
  • Members
  • Recent Posts
Forums
Main Support Forums
How-to and Troubles...
Конфликт темы с пла...
 
Share:
Share
Tweet
Share
Notifications
Clear all

Конфликт темы с плагином

Page 1 / 2 Next
    Last Post
RSS

JEKA3000klx
Posts: 6
 JEKA3000klx
Topic starter
October 29, 2018 5:49 am
(@jeka3000klx)
Active Member
Joined: 4 years ago

Здравствуйте. Начал пользоваться плагином wpForo, очень понравился в работе. Хотел было уже приобретать дополнительные функции к нему, как он начал конфликтовать с темой сайта. Два дня работал нормально, а сейчас возникает следующая ошибка, которая отображается в шапке и подвале сайта:

Warning: session_start(): open(/var/www/u0505985/data/bin-tmp//sess_avm0vr7ko6sbipnfs69u1g21b2, O_RDWR) failed: No such file or directory (2) in /var/www/u0505985/data/www/sprosiservis.ru/wp-content/plugins/wpforo/wpf-includes/class-notices.php on line 16

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/u0505985/data/www/sprosiservis.ru/wp-content/plugins/wpforo/wpf-includes/class-notices.php:16) in /var/www/u0505985/data/www/sprosiservis.ru/wp-content/plugins/wpforo/wpf-includes/class-notices.php on line 16

Warning: Cannot modify header information - headers already sent by (output started at /var/www/u0505985/data/www/sprosiservis.ru/wp-content/plugins/wpforo/wpf-includes/class-notices.php:16) in /var/www/u0505985/data/www/sprosiservis.ru/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1197

Warning: Unknown: open(/var/www/u0505985/data/bin-tmp//sess_avm0vr7ko6sbipnfs69u1g21b2, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/www/u0505985/data/bin-tmp/) in Unknown on line 0

Откат сайта до момента использования плагина не помогает, все равно при установке возникает ошибка. Хотелось бы у вас попросить совета, возможно ли эту проблему устранить своими силами, если да, то какие действия необходимо сделать? Спасибо.

.jpg
Topic Tags
header error warning: session_start()
8 Replies
1 Reply
JEKA3000klx
 JEKA3000klx
(@jeka3000klx)
Joined: 4 years ago

Active Member
Posts: 6
October 29, 2018 5:55 am
Reply toJEKA3000klxJEKA3000klx

Проблема решилась сама собой. Необходимо было почистить куки в браузерах.

Reply
Sofy
Posts: 4057
Sofy - Facebook Sofy - Twitter
 Sofy
Admin
October 29, 2018 7:45 am
(@sofy)
Support Team
Joined: 4 years ago

Hi JEKA3000klx,

Thank you for letting us know. 

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Reply
1 Reply
JEKA3000klx
 JEKA3000klx
(@jeka3000klx)
Joined: 4 years ago

Active Member
Posts: 6
October 29, 2018 7:53 pm
Reply toSofySofy

Здравствуйте. Проблема так и не разрешилась. В теме сайта  https://sprosiservis.ru до сих пор отображаются эти ошибки. Откат сайта и дальнейшая установка плагина никчему не приводит. Даже если восстановлю сайт и базу данных за месяц до того, как устанавливал этот плагин, приводит к этим ошибкам. Могли бы вы что то посоветовать? Очень хочется установить ваш форум. Спасибо.

Reply
JEKA3000klx
Posts: 6
 JEKA3000klx
Topic starter
October 30, 2018 8:31 am
(@jeka3000klx)
Active Member
Joined: 4 years ago

Ссылает от на эту строку - if( !wpforo_is_session_started() && !is_admin() ) session_start();

/**
* @return void
*/
private function init(){
if( !wpforo_is_session_started() && !is_admin() ) session_start();
}

Reply
Robert
Posts: 9090
Robert - Twitter
 Robert
Admin
October 30, 2018 10:32 am
(@robert)
Support Team
Joined: 6 years ago

Hi @jeka3000klx

This error doesn't have direct relation to wpForo. You'll see errors from all your plugins which have a session function, but this doesn't mean all those plugins have problems. there is another problem which outputs some data in header and affects all other plugins session function. The one of affected plugin is wpForo and the wp-super-cache plugin. You may have other errors if you don't find the real problem maker.

1. Deactivate all plugins, only leave the wpForo. If you see the error is not fixed then this is a theme issue. somewhere in theme files you have error generation or line-breaks in the current active WordPress theme functions.php file after ?> PHP closer.

2. If you don't see any error, start activate back all plugins one by one and check. This will help find the real problem maker.

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Reply
1 Reply
JEKA3000klx
 JEKA3000klx
(@jeka3000klx)
Joined: 4 years ago

Active Member
Posts: 6
October 30, 2018 11:03 am
Reply toRobertRobert

Плагины все отключал. Ошибка остается. На счет лишнего пробела не знаю, даже если он и есть, я не смогу определить где он.

<?php

add_action('wp_enqueue_scripts', 'sprosiservis_css');
function sprosiservis_css () {
wp_enqueue_style('style', get_template_directory_uri() . '/css/style.css', array(), '1.0.0');
wp_enqueue_style('page-doc', get_template_directory_uri() . '/css/page-doc.css', array(), '1.0.0');
wp_enqueue_style('single', get_template_directory_uri() . '/css/single.css', array(), '1.0.0');
wp_enqueue_style('google-fonts', '//fonts.googleapis.com/css?family=PT+Serif:400,400i,700|Ubuntu:300', array(), '1.0.0');
}

add_action('admin_head', 'custom_styles');
function custom_styles() { echo '<style type="text/css">#menu-posts,#menu-comments,#toplevel_page_cptui_main_menu,#toplevel_page_edit-post_type-acf,#toplevel_page_acf-options{display:none !important}</style>'; }

add_image_size('consultations', 90, 90, false);
add_image_size('services', 243, 243, true);
add_image_size('news', 248, 150, true);
add_image_size('maintop', 534, 300, false);
add_image_size('main', 329, 400, false);
add_image_size('dost', 125, 88, false);
add_image_size('avatar', 97, 97, true);

add_theme_support('menus');
register_nav_menus(array(
'main-menu' => 'Главное меню',
'bottom-menu' => 'Нижнее меню'
));

remove_action( 'add_option_new_admin_email', 'update_option_new_admin_email' );
remove_action( 'update_option_new_admin_email', 'update_option_new_admin_email' );

function wpdocs_update_option_new_admin_email( $old_value, $value ) {
update_option( 'admin_email', $value );
}

include("js/acf-options-page/acf-options-page.php");

add_action( 'add_option_new_admin_email', 'wpdocs_update_option_new_admin_email', 10, 2 );
add_action( 'update_option_new_admin_email', 'wpdocs_update_option_new_admin_email', 10, 2 );

function cut_string($string, $length = 95){
if ($length && strlen($string) > $length){
$str = strip_tags($string);
$str = substr($str, 0, $length);
$pos = strrpos($str, ' ');
return (substr($str, 0, $pos)).'…';
}
return $string;
}

include("js/acf-repeater/acf-repeater.php");

class multipartmail{
var $header;
var $parts;
var $message;
var $subject;
var $to_address;
var $boundary;
function multipartmail($dest, $src, $sub){
$this->to_address = $dest;
$this->subject = $sub;
$this->parts = array("");
$this->boundary = "--" . md5(uniqid(time()));
$this->header = "From: $src\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: multipart/mixed; " .
" boundary=\"" . $this->boundary . "\"\r\n" .
"X-Mailer: PHP/" . phpversion();
}
function addmessage($msg = "", $ctype = "text/plain"){
$this->parts[0] = "Content-Type: $ctype; charset=UTF-8\r\n" .
"Content-Transfer-Encoding: 7bit\r\n" .
"\n" .$msg."\r\n";
}
function addattachment($file, $ctype){
$fname = substr(strrchr($file, "\\"), 1);
$data = file_get_contents($file);
$i = count($this->parts);
$content_id = "part$i." . sprintf("%09d", crc32($fname)) . strrchr($this->to_address, "@");
$this->parts[$i] = "Content-Type: $ctype; name=\"$fname\"\r\n" .
"Content-Transfer-Encoding: base64\r\n" .
"Content-ID: <$content_id>\r\n" .
"Content-Disposition: attachment; " .
" filename=\"$fname\"\r\n" .
"\n" .
chunk_split( base64_encode($data), 68, "\n");
return $content_id;
}
function buildmessage(){
$this->message = "This is a multipart message in mime format.\n";
$cnt = count($this->parts);
for($i=0; $i<$cnt; $i++){
$this->message .= "--" . $this->boundary . "\n" .
$this->parts[$i];
}
}
function getmessage(){
$this->buildmessage();
return $this->message;
}
function sendmail(){
$this->buildmessage();
mail($this->to_address, $this->subject, $this->message, $this->header);
}
}

if( function_exists('acf_add_options_page') ) {
acf_add_options_page(array('page_title' => __("Дополнительно"),'menu_title' => __("Дополнительно"),'menu_slug' => 'params','post_id' => 'params','update_button' => 'Обновить','updated_message' => 'Обновлено'));
}

add_action( 'show_user_profile', 'add_extra_social_links' );
add_action( 'edit_user_profile', 'add_extra_social_links' );

function add_extra_social_links($user) { ?>
<h3>Дополнительные данные</h3>
<table class="form-table">
<tr>
<th><label for="user_patronymic">Отчество</label></th>
<td><input type="text" name="user_patronymic" value="<?php echo esc_attr(get_the_author_meta( 'user_patronymic', $user->ID )); ?>" class="regular-text" /></td>
</tr>
<tr>
<th><label for="user_sex">Пол</label></th>
<td><select name="user_sex" class="regular-text">
<option value="" disabled<?php if(esc_attr(get_the_author_meta( 'user_sex', $user->ID ))=="") { echo ' selected'; } ?>>Ваш пол</option>
<option value="m"<?php if(esc_attr(get_the_author_meta( 'user_sex', $user->ID ))=="m") { echo ' selected'; } ?>>Мужской</option>
<option value="w"<?php if(esc_attr(get_the_author_meta( 'user_sex', $user->ID ))=="w") { echo ' selected'; } ?>>Женский</option>
</select></td>
</tr>
<tr>
<th><label for="user_birthday">День рождения</label></th>
<td><input type="text" name="user_birthday" value="<?php echo esc_attr(get_the_author_meta( 'user_birthday', $user->ID )); ?>" class="regular-text" /></td>
</tr>
<tr>
<th><label for="user_city">Ваш город</label></th>
<td><input type="text" name="user_city" value="<?php echo esc_attr(get_the_author_meta( 'user_city', $user->ID )); ?>" class="regular-text" /></td>
</tr>
<tr>
<th><label for="user_phone">Ваш телефон</label></th>
<td><input type="text" name="user_phone" value="<?php echo esc_attr(get_the_author_meta( 'user_phone', $user->ID )); ?>" class="regular-text" /></td>
</tr>
</table>
<?php }

add_action( 'personal_options_update', 'save_extra_social_links' );
add_action( 'edit_user_profile_update', 'save_extra_social_links' );

function save_extra_social_links( $user_id )
{
update_user_meta( $user_id,'user_patronymic', sanitize_text_field( $_POST['user_patronymic'] ) );
update_user_meta( $user_id,'user_sex', sanitize_text_field( $_POST['user_sex'] ) );
update_user_meta( $user_id,'user_birthday', sanitize_text_field( $_POST['user_birthday'] ) );
update_user_meta( $user_id,'user_city', sanitize_text_field( $_POST['user_city'] ) );
update_user_meta( $user_id,'user_phone', sanitize_text_field( $_POST['user_phone'] ) );
}

function post_published_notification( $ID, $post ) {
$blogusers = get_users();
foreach ($blogusers as $user) { if (get_the_author_meta( 'subscribe', $user->ID ) != "no") {
$mulmail = new multipartmail($user->user_email, "feedback@sprosiservis.pdnx.ru", "Новости сайта ".get_bloginfo("name"));
$mulmail->addmessage("Новое на сайте\nНазвание: ".get_the_title($ID)."\nСсылка: ".get_permalink($ID));
$mulmail->sendmail();
unset($mulmail);
} }
}
add_action( 'publish_consultations', 'post_published_notification', 10, 2 );
add_action( 'publish_news', 'post_published_notification', 10, 2 );

add_filter( 'deprecated_function_trigger_error', '__return_false' );
Reply
Anonymous20
Posts: 1602
 Anonymous20
October 30, 2018 10:51 am
(@anonymous20)
Noble Member
Joined: 6 years ago

Or just the hosting tmp path is wrong/not permited, because sessions are stored in there ?

 

Reply
Robert liked
Page 1 / 2 Next
  All forum topics
  Previous Topic
Next Topic  
Related Topics
  • PHP Warning: session_start(): Cannot start session when headers already sent
    2 years ago
  • Cannot start session
    3 years ago
Topic Tags:  header error (3), warning: session_start() (3),

Forum Search

Join Us!

Download wpForo plugin
on WordPress.org

wpForo Addons

wpforo-private-messages wpforo-advanced-attachments-128x128 wpforo-embeds-128x128 wpForo User Custom Fields addon wpForo – Blog Cross Posting addon wpForo Ads Manager wpForo – WooCommerce Memberships Integration wpForo Emoticons wpForo – Tenor GIFs Integration
View all Addons »

Recent Topics

  • Attachments not showing on forums posts after migration

    By Formicid, 2 hours ago

  • New Feature About Plugin Customization and Integration

    By z14165899, 14 hours ago

  • WordPress Email sending function wp_mail() doesn't work!

    By feassistant, 21 hours ago

  • Import users from IPBoard

    By jesusdlg, 1 day ago

  • Intruder signing in to wpforo without approval

    By plaurits, 2 days ago

  • How to make new user to get approve manually before creating post and profile.

    By Adhyansh21, 3 days ago

Topic Tags

  • css52
  • translation50
  • plugin conflict48
  • seo47
  • new features45
  • buddypress43
  • avatar41
  • moderation40
  • ultimate member40
  • login40
  • forum40
  • registration37
  • threaded layout35
  • cache34
  • spam33
  • editor33
  • menu33
  • shortcode32
  • forum accesses30
  • widget29
View all tags (2195)

Recent Posts

  • RE: replacing create_function() with something else for PHP8 [duplicate]

    Hi @douglajonson, what is the plugin name?

    By Chris, 56 mins ago

  • RE: Description for each topic?

    @christine, wpForo does not have a topic description ...

    By Chris, 1 hour ago

  • RE: About Plugin Customization and Integration

    Hi @z14165899, Please send your request to sales[at]g...

    By Chris, 2 hours ago

  • Attachments not showing on forums posts after migration

    Hello I just did a manual migration and the older forum...

    By Formicid, 2 hours ago

  • RE: WordPress Email sending function wp_mail() doesn't work!

    @dimalifragis thanks for the enlightenment there. It...

    By feassistant, 16 hours ago

  • RE: Intruder signing in to wpforo without approval

    Maybe at Wordpress.org ?

    By dimalifragis, 24 hours ago

  • Import users from IPBoard

    Hello, Is it possible to import users from ipboard? (...

    By jesusdlg, 1 day ago

Share:
Share
Tweet
Share
  Forum Statistics
21 Forums
9,940 Topics
50.3 K Posts
11 Online
48.4 K Members

Latest Post: replacing create_function() with something else for PHP8 [duplicate] Our newest member: Lucky Wholesale Recent Posts Unread Posts Tags

Forum Icons: Forum contains no unread posts Forum contains unread posts

Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Powered by wpForo | Copyright © 2016-2022 gVectors Team
Copyright Registration Service - Click here for more information or to register work
wpForo is Registered with the IP Rights Office
Copyright Registration Service

Ref: 4477265538
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation