默认情况下 APMServ在设置虚拟主机后,访问PHP程序时(目前遇到的是杰奇系统,也许其他PHP系统也会产程此错误提示),凡事启用到 session 时就会提示:
Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(C:\WINDOWS\TEMP\) is not within the allowed path(s): (F:/web/aiqzu.com/www.shukv.com/;F:/APMServ5.2.6/tmp/uploadtemp/;) in F:\web\xx.com\global.php on line 940
Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: files (path: ) in F:\web\xx.com\global.php on line 940
大概类似这样的错误,解决方法如下:
打开AMPServ的PHP.INI文件设置.修改
;session.save_path = "/tmp"
原来是这样设置的.
我把它改成:
session.save_path = "c:\WINDOWS\TEMP"
然后从新启动APMServ