session_start() 挂起服务器 [英] session_start() Hangs The Server

查看:55
本文介绍了session_start() 挂起服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

完全被这个弄糊涂了...

Totally confused by this one...

我们设置了 WAMPServer 安装,运行多个来自不同文档根目录的虚拟主机.

We have a WAMPServer installation set up, running a number of virtual hosts from various document roots.

就在最近,一个特定的域开始挂起服务器.我们将其追溯到 session_start().如果我们把它注释掉,就没有问题(当然,除了我们不能对会话做任何事情的事实).如果取消注释,它将挂起页面加载,并在重新加载足够多的情况下挂起整个服务器.

Just recently, one particular domain has started hanging the server. We traced it down to session_start(). If we comment it out, there are no problems (except, of course, for the fact that we can't do anything with the session). With it uncommented, it will hang the page load and, with enough reloads, will hang the entire server.

所有其他网站仍然可以与他们的会话完美配合.据我所知,会话的处理方式没有什么不同.我正在进一步研究它(以防有人更改某些内容)但现在我希望有一些方向:)

All of the other sites still work perfectly with their sessions. As far as I know, there is nothing different with the way sessions are being worked with. I am looking further into it (in case someone changed something) but right now I'm hoping for some direction :)

所以,有什么想法吗?

推荐答案

所以,我猜这是一个应用层问题,因为其他站点的会话工作正常.但是,这假设他们的会话配置方式相同 - 通过仔细检查您的站点与其他站点相比在其配置中没有做一些独特"的事情来节省一些时间.

So, I'm guessing that it's an application layer problem because the other sites' sessions are working properly. However, this assumes that they have their sessions configured the same way - save yourself some time by double checking that your site isn't doing some "unique" in its configuration compared to the other sites.

接下来我将检查在您的应用程序中运行的其他与会话相关的代码.可能是通过调用 session_start() 将应用程序置于可以运行其他代码的状态.例如,可能有一段代码说如果设置了此会话变量,则仅运行此函数",并且通过启动会话,您将公开该变量,而该变量不会被公开,因此不会运行有问题的函数如果会话未开始.

I would next examine the other session related code that is running in your application. It could be that by calling session_start() you're putting your application into a state where it will run other code. For example, maybe there's a block of code that says "only run this function if this session variable is set" and by starting the session you're exposing that variable, where it wouldn't have been exposed and therefore not run the offending function if the session wasn't started.

祝你好运.

这篇关于session_start() 挂起服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆