设置php的session分级存放后,phpMyAdmin运行不正常

  前一段把php的session进行了目录分级存放,详情见 http://www.toplee.com/blog/300.html ,总的来说效果不错,不过却在使用phpMyAdmin时遇到点小问题。

  首先是phpMyAdmin页面显示错位,然后是页面间_GET和_POST参数都不能正常传递,因为最近还修改了服务器上的一些别的配置,花了很长时间才定位到是session的问题,在phpMyAdmin的libraries/common.lib.php文件中进行debug,发现在session验证的地方总是出错,于是怀疑到php的session故障,不过由于其他应用中使用session都没有问题,应该是phpMyAdmin处理session方面的问题,打开 libraries/session.inc.php,可以看到一些处理session的ini设置项,在适当位置加入下面一行代码,问题得到解决。
[coolcode lang=”php”]
ini_set(‘session.save_path’,”your_session_save_path”);
[/coolcode]

  由此可以引出一些通用的问题,就是如果在php代码里面改变了ini中session的设置项,则一些关键的项都需要重新设定,php.ini中原来定义的设置就不会继续生效了,今后需要多加注意。

Category: PHP / Zend
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image