The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,'

后端 未结 7 1798
情歌与酒
情歌与酒 2020-11-27 17:12

How to solve :

Warning: session_start() [function.session-start]: The session id is too long or contains illegal characters, valid characters are a-z, A-

7条回答
  •  温柔的废话
    2020-11-27 17:52

    I suggest to use "more correct" version of the function.

    Several notes:

    1. More correct regular expression (allows characters in the range a-z A-Z 0-9 , (comma) and - (minus)) as described here.
      Regular expression depends on the php ini settings, like described here and here.
    2. Use session name method

    So updated version looks like this:

    
    

提交回复
热议问题