PHP会话或Cookie不存储在服务器上。 PHP.ini配置不正确 [英] PHP sessions or cookies not storing on server. PHP.ini misconfiguration

查看:163
本文介绍了PHP会话或Cookie不存储在服务器上。 PHP.ini配置不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为一个标准共享主机帐户的网站工作一个简单的SESSION / COOKIE登录系统。问题是会话或cookie都不存储。我的代码是100%正确,但服务器配置错误。

I am working on a simple SESSION/COOKIE login system for a website on a standard shared hosting account. The problem is that neither sessions or cookies are stored. My code is 100% correct but the server is misconfigured.

我注意到没有文件夹存储会话,所以我创建一个,并添加了本地PHP。 ini文件。会话存储在该文件夹中,但是当我尝试在我的PHP网站中使用它们时,它们不工作。

I have noticed that there was no folder in which to store sessions so I created one and added a local php.ini file. Sessions are stored in that folder properly but they don't work when I try to use them in my PHP website.

我已经谈论支持,但他们是非常糟糕。

I have talked to support but they are very bad.

服务器配置如下: http:// luttnerre。 com / test.php

谢谢!

推荐答案

p>您是否已检查指定目录的权限? php进程需要能够写入。

Have you checked the permissions on the specified directory? The php process needs to be able to write to it.

这篇关于PHP会话或Cookie不存储在服务器上。 PHP.ini配置不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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