douhai9043 2019-06-25 12:26
浏览 331

当session.save_path设置为Windows文件系统上的路径时,为什么PHP session_start()在WSL上失败?

I am trying to transition my local PHP development from a Windows XAMPP stack to using the Windows Subsystem for Linux. Under WSL my website codebase is located on the windows filesystem and is accessible to the Apache webserver via /mnt/c/www/myweb.

I have inherited a codebase that sets session.save_path to the root of the website ie. /mnt/c/www/myweb and then runs session_start(). This worked fine under XAMPP but under WSL the session start command fails with a fatal exception and the error message "Warning: session_start(): Session data file is not created by your uid".

From the WSL command line I can create a file at /mnt/c/www/myweb and also appear to be able to run chmod commands.

Is this a limitation of the interface between WSL and the Windows filesystem or am I doing something else wrong?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?
    • ¥15 c++头文件不能识别CDialog
    • ¥15 Excel发现不可读取的内容