佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 851|回复: 15

又有问题了,关于SESSION的...

[复制链接]
发表于 20-6-2007 04:13 PM | 显示全部楼层 |阅读模式
Warning: session_start() [function.session-start]: open(/tmp\sess_71e7eb73b738d20eaa86841595eef4f7, O_RDWR) failed: No such file or directory (2) in C:\Domains\luckyautosport.com\wwwroot\includes\functions\sessions.php on line 67

Warning: session_write_close() [function.session-write-close]: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in C:\Domains\luckyautosport.com\wwwroot\includes\functions\sessions.php on line 106

Warning: session_write_close() [function.session-write-close]: open(/tmp\sess_71e7eb73b738d20eaa86841595eef4f7, O_RDWR) failed: No such file or directory (2) in C:\Domains\luckyautosport.com\wwwroot\includes\functions\sessions.php on line 106

Warning: session_write_close() [function.session-write-close]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in C:\Domains\luckyautosport.com\wwwroot\includes\functions\sessions.php on line 106
回复

使用道具 举报


ADVERTISEMENT

发表于 20-6-2007 07:19 PM | 显示全部楼层
unless register_globals is enabled
register global 开了没有?
回复

使用道具 举报

 楼主| 发表于 20-6-2007 09:38 PM | 显示全部楼层
原帖由 vampcheah 于 20-6-2007 07:19 PM 发表
unless register_globals is enabled
register global 开了没有?


怎样开? 叫租SERVER的人开吗?
回复

使用道具 举报

发表于 21-6-2007 02:16 AM | 显示全部楼层
主要看到的是你的PATH 有问题
No such file or directory (2) in C:\Domains\luckyautosport.com\wwwroot\includes\functions\sessions.php on line 67

和 你的REGISTER_GLOBAL
Please be advised that the session extension does not consider globalvariables as a source of data, unless register_globals is enabled.

你租的hosting 不可能没开register_global 吧
回复

使用道具 举报

 楼主| 发表于 21-6-2007 09:47 AM | 显示全部楼层
原帖由 vampcheah 于 21-6-2007 02:16 AM 发表
主要看到的是你的PATH 有问题
No such file or directory (2) in C:\Domains\luckyautosport.com\wwwroot\includes\functions\sessions.php on line 67

和 你的REGISTER_GLOBAL
Please be advised that th ...


就是不知道咯....
回复

使用道具 举报

发表于 21-6-2007 10:32 AM | 显示全部楼层
php 4.1 以上好像不鼓励register global 了
我得其中一个hosting已经不开了
session_start() 后
直接用$_SESSION['abc'] = "xxxxx"
回复

使用道具 举报

Follow Us
发表于 21-6-2007 01:57 PM | 显示全部楼层
原帖由 leomaster 于 21-6-2007 10:32 AM 发表
php 4.1 以上好像不鼓励register global 了
我得其中一个hosting已经不开了
session_start() 后
直接用$_SESSION = "xxxxx"

那楼主就惨了,一大堆CODE 慢慢改。。。
回复

使用道具 举报

 楼主| 发表于 21-6-2007 10:07 PM | 显示全部楼层
原帖由 leomaster 于 21-6-2007 10:32 AM 发表
php 4.1 以上好像不鼓励register global 了
我得其中一个hosting已经不开了
session_start() 后
直接用$_SESSION = "xxxxx"


所有$_SESSION 都要="XXXXXXXX"?
回复

使用道具 举报


ADVERTISEMENT

发表于 21-6-2007 11:44 PM | 显示全部楼层
session_start();
$_SESSION['sessionname'] = value

e.g
$_SESSION['name'] = 'NABI MUHAMAD';
应该是将

从php manual 里看到的
If you want your script to work regardless of register_globals, you need to use the $_SESSION array. All $_SESSION entries are automatically registered. If your script uses session_register(), it will not work in environments where register_globals is disabled.
回复

使用道具 举报

发表于 22-6-2007 12:09 AM | 显示全部楼层
顺道问一下
@session_start() 和 session_start() 有什么不同?
前面的@ 有什么用?
回复

使用道具 举报

 楼主| 发表于 22-6-2007 09:02 AM | 显示全部楼层
原帖由 leomaster 于 21-6-2007 11:44 PM 发表
session_start();
$_SESSION = value

e.g
$_SESSION = 'NABI MUHAMAD';
应该是将

从php manual 里看到的
If you want your script to work regardless of register_globals, you need to use the $_S ...


随便放一个VALUE吗?
回复

使用道具 举报

发表于 22-6-2007 09:39 AM | 显示全部楼层
我是做LOGGIN 哦...
$_SESSION[LOGGER]=$USERNAME;
回复

使用道具 举报

发表于 22-6-2007 06:39 PM | 显示全部楼层
原帖由 leomaster 于 22-6-2007 12:09 AM 发表
顺道问一下
@session_start() 和 session_start() 有什么不同?
前面的@ 有什么用?

呵呵,我也是最近才知道 @ 的用处
如果 mysql_fetch_array($aaa) 失败的话,会出现 error code 对不对?
但是加上 @ 后,所有的error exception 就会不见了。
请注意,不是所有的 SYNTAX都适合用@。具体的,就不太懂了。
回复

使用道具 举报

发表于 22-6-2007 06:58 PM | 显示全部楼层
原帖由 城之内 于 22-6-2007 09:02 AM 发表


随便放一个VALUE吗?


你开session 不是要放一个你有global用到的value 吗?
不然你的session 是有什么用?
回复

使用道具 举报

发表于 22-6-2007 07:01 PM | 显示全部楼层
原帖由 vampcheah 于 22-6-2007 06:39 PM 发表

呵呵,我也是最近才知道 @ 的用处
如果 mysql_fetch_array($aaa) 失败的话,会出现 error code 对不对?
但是加上 @ 后,所有的error exception 就会不见了。
请注意,不是所有的 SYNTAX都适合用@。具体的 ...


你的意思是error message 不会出现就好像我们disable php.ini 里的 error_all 吗?
mysql_fetch_array($aaa) 的话 是 @mysql_fetch_array($aaa) 浆吗?
回复

使用道具 举报

发表于 22-6-2007 08:15 PM | 显示全部楼层
原帖由 leomaster 于 22-6-2007 07:01 PM 发表


你的意思是error message 不会出现就好像我们disable php.ini 里的 error_all 吗?
mysql_fetch_array($aaa) 的话 是 @mysql_fetch_array($aaa) 浆吗?

应该是吧。 但是有时候却不能用,因为会把RETURN VALUE都吃掉

[ 本帖最后由 vampcheah 于 22-6-2007 08:18 PM 编辑 ]
回复

使用道具 举报


ADVERTISEMENT

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 11-9-2025 05:59 PM , Processed in 0.144161 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表