简体   繁体   English

如何在本机 php 应用程序和 Laravel 应用程序之间共享会话?

[英]How to share session between a native php application and a laravel application?

I have a native PHP application which has the login.我有一个具有登录名的本机 PHP 应用程序。 I need to use that session from the Laravel application.我需要从 Laravel 应用程序使用该会话。 My PHP app runs on : localhost:80 While my Laravel app runs on localhost:8000我的 PHP 应用程序在 localhost:80 上运行而我的 Laravel 应用程序在 localhost:8000 上运行

I have tried to set the same session name in both and changed the session driver to 'cookie' in the laravel app.我试图在两者中设置相同的会话名称,并在 Laravel 应用程序中将会话驱动程序更改为“cookie”。 but no success.但没有成功。 Then set it to 'native'.然后将其设置为“本机”。 Nothing worked.没有任何效果。 Is there a way to do that.有没有办法做到这一点。

It is not possible to share session between servers.无法在服务器之间共享会话。 Browsers wont share cookies between websites, so the session id wont be shared.浏览器不会在网站之间共享 cookie,因此不会共享会话 ID。

Anyway Laravel doesn't use using php's native session.无论如何,Laravel 不使用使用 php 的本机会话。 More info 更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在同一服务器上的Web应用程序(Core PHP)和另一个Web应用程序(Laravel)之间共享会话? - How to share Session between Web Application (Core PHP) and another Web Application (Laravel) on Same Server? 如何与php应用程序共享会话 - How to share a session with a php application 如何与另一个 PHP 应用程序共享 Laravel 会话? - How do i share Laravel session with another PHP application? 如何在Codeigniter中的多个应用程序之间共享会话 - How to share session between multiple application in codeigniter 使用Redis作为会话存储时,如何在actix-session和PHP应用程序之间共享会话? - How can I share sessions between actix-session and a PHP application when using Redis as session storage? 如何使用Laravel框架在应用程序控制器之间共享代码? - How share code between application controllers using Laravel framework? 如何在PHP和ASP.net应用程序之间共享会话? - How to share sessions between PHP and ASP.net application? 如何在Flash AS3和PHP之间共享会话? - How to share session between flash AS3 and PHP? 在Laravel中获取另一个PHP应用程序的会话数据 - Get session data of another PHP application in Laravel Laravel-如何与其他工作站共享应用程序 - Laravel - How to share application to another stations
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM