简体   繁体   English

由于PHPSESSID,PHP网站无法通过W3C进行验证

[英]PHP site doesn't validate with W3C, due to PHPSESSID

My site isn't validating due to PHPSESSID being seen in the source code, however, this wasn't happening just a few days ago and I've not done anything to cause this, as far as I am aware. 由于在源代码中显示了PHPSESSID,因此我的网站无法进行验证,但是,就在几天前还没有发生这种情况,据我所知,我没有做任何导致这种情况的事情。 My host also denies any knowledge of changing anything. 我的房东也拒绝更改任何知识。

The PHPSESSID isn't visible when I view the source of the pages myself, so it seems to be something to do with the interaction between my site and the validator. 当我自己查看页面源时,PHPSESSID不可见,因此这似乎与网站和验证器之间的交互有关。 Any ideas how I can resolve it, I have trawled the internet and tried various settings on the server but to no avail. 关于如何解决该问题的任何想法,我都拖曳了互联网并尝试了服务器上的各种设置,但无济于事。

I know that PHPSESSID is used when cookies are blocked, has the validator changed somehow? 我知道在阻止cookie时会使用PHPSESSID,验证器是否有所更改?

I realise there are other validation issues on there as well but I know how to fix those and will be doing so over the coming days. 我知道那里也存在其他验证问题,但我知道如何解决这些问题,并将在未来几天内解决。

Thanks for any advice. 感谢您的任何建议。

The site is http://www.fantasy-f1-league.com/info.php (that's a PHP info page, the site is without the file name at the end) 该站点为http://www.fantasy-f1-league.com/info.php (这是一个PHP信息页面,该站点末尾没有文件名)

It's the session.use_trans_sid option, which tells PHP to persist the session ID via non-cookie means. 这是session.use_trans_sid选项,它告诉PHP通过非cookie方式保留会话ID。 That means PHP will be parseing your page, looking for ANY links and forms, and adding the session ID as a query parameter and/or hidden form field. 这意味着PHP将解析您的页面,查找任何链接和表单,并添加会话ID作为查询参数和/或隐藏的表单字段。

trans_sid is a nasty security risk if you're doing anything "important",b ecause it DOES transmit the session ID around in URLs, means it's utterly trivial to hijack someone's session, and the session ID will also leak out to other sites in HTTP REFERERS and whatnot. 如果您正在做“重要”的事情,trans_sid就是一个讨厌的安全隐患,因为它确实会在URL中传输会话ID,这意味着劫持某人的会话绝对是微不足道的,并且该会话ID还会泄漏到HTTP中的其他站点推荐人等等。

It does not validate because in the links & should be replaced with & 由于链接中的&应替换为&因此无法验证& .

Also .. 还有..

  • who the hell uses HTML4.01 transitional in this day an age ?! 谁在这个时代使用HTML4.01过渡版?
  • move your JS code to an external file(s), which you include before </body> 将您的JS代码移至一个外部文件,该文件应包含在</body>之前
  • LANGUAGE="JavaScript" has not place in <script> LANGUAGE="JavaScript"不在<script>
  • class names should describe what the tag contains , and not where it is and how it looks like 类名称说明标签包含,而不是它在哪里,它的样子
  • <center> tag is deprecated <center>标签已弃用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM