APMserv5.2.6的session_start错误解决办法

2/10/2017来源:ASP.NET技巧人气:1061

使用APMserv5.2.6搭建的环境,会莫名的出现seeion_start()的错误。   调试iWebMall程序时出现下面的错误提示: Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(C:\Windows\TEMP\) is not within the allowed path(s): (F:/APMServ5.2.6/www/htdocs/;F:/APMServ5.2.6/tmp/uploadtemp/;) in F:\APMServ5.2.6\www\htdocs\foundation\asession.php on line 9 Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: files (path: ) in F:\APMServ5.2.6\www\htdocs\foundation\asession.php on line 9 APMserv5.2.6默认的PHP设置上session的存储路径是关闭的,解决方法如下: 打开APMserv5.2.6的PHP.INI文件设置,修改: ;session.save_path = "/tmp" 原来是这样设置的,改成: session.save_path = "F:\APMServ5.2.6\tmp\sessiondata" //这里的为APMserv的路径 重启APMserv5.2.6