Title: session error messages
Last modified: March 13, 2017

---

# session error messages

 *  Resolved [Stephen S](https://wordpress.org/support/users/ssuess/)
 * (@ssuess)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/session-error-messages-2/)
 * [13-Mar-2017 21:39:06 UTC] PHP Warning: session_start(): The session id is too
   long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and ‘-,’
   in /var/www/example.org/wp-content/plugins/dashboard-contact-form/index.php on
   line 84
    [13-Mar-2017 21:39:06 UTC] PHP Warning: Unknown: The session id is too
   long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and ‘-,’
   in Unknown on line 0
 * any idea how to get rid of these?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Stephen S](https://wordpress.org/support/users/ssuess/)
 * (@ssuess)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/session-error-messages-2/#post-8910837)
 * Ok, I found the problem. I have a new user whose username contains a period, 
   which is allowed by WordPress. This plugin was using that username to set the
   session name, but a period is NOT an allowed character in a session name. So 
   I changed that code to replace a period with “DOT”
 * `$session_id = 'CDW'.str_replace('.','DOT',$current_user->user_login);`
 * and now bingo, no errors. Hope this helps someone else.
 *  Plugin Author [Papik81](https://wordpress.org/support/users/papik81/)
 * (@papik81)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/session-error-messages-2/#post-9112167)
 * OK, I tried to fix this with using cdw + username MD5hash. I don’t know how good
   idea is it..As by the log it seems to be usable solution too. So this should 
   work better in futire releases.
 *  Plugin Author [Papik81](https://wordpress.org/support/users/papik81/)
 * (@papik81)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/session-error-messages-2/#post-9112174)
 * Resolved.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘session error messages’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/dashboard-contact-form.svg)
 * [Custom Dashboard Widget & Dashboard Contact Form](https://wordpress.org/plugins/dashboard-contact-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dashboard-contact-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dashboard-contact-form/)
 * [Active Topics](https://wordpress.org/support/plugin/dashboard-contact-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dashboard-contact-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dashboard-contact-form/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Papik81](https://wordpress.org/support/users/papik81/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/session-error-messages-2/#post-9112174)
 * Status: resolved