dth54864 2016-06-08 16:22 采纳率: 0%
浏览 67

PHP7 + Symfony 3.1.0 + Vagrant:无法写入会话数据

although the path /mnt/my-proj/app/../var/sessions/dev is accessible for both the normal user and www-data I get the following message:

Warning: session_write_close(): Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/mnt/op-accounting2/app/../var/sessions/dev)

I get the message above only in dev, but not in prod. /mnt/my-proj/app/../var/sessions/dev and /mnt/my-proj/app/../var/sessions/prod have the same pemissions: 777.

The path above is mounted as following:

# mount -t vboxsf -o uid=1000,gid=33,umask=000 my-proj /mnt/my-proj;

What am I doing wrong?

I've read the following posts, but could find no solution for me:

PHP session handling errors

https://github.com/NewEraCracker/suhosin-patches/issues/3

PHP7 + Symfony 2.8, Failed to write session data

I'm using Vagrant 1.8.1 on Windows 8.1 Enterprice (64Bit) and ubuntu-xenial 16.04 in Vagrant. The provider is VirtualBox 5.0.20. The settings are mostly default ones. The path above is shared using VirtualBox GUI with full access.

Kind regards,

Juri

  • 写回答

3条回答 默认 最新

  • douhao3562 2016-06-08 16:32
    关注

    SOLVED! :-)

    Setting

    save_path:   "/var/lib/php/sessions"
    

    in /mnt/my-proj/app/config/config.yml solved the problem. Any adjusting of ini-Files in /etc/php/7.0/ wasn't neccessary (those files have still default values only).

    But I wander why didn't I get that error message in prod?

    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器