Im new to Lumen and i need to use the Session functionality, but based on the change log in the site. Sessions was excluded in the latest release, I already looked up in the documentation of Lumen 5.2, it says that i should refer to Laravel way of activating session and something like that. my problem is I have no experience using in Laravel too. Can anyone tell me, a step by step way to activate Lumen Sessions?
or can anyone suggest a third-party library?
There is no built-in session support in Lumen. From the release notes:
... sessions and views are no longer included with the framework. If you need access to these features, you should use the full Laravel framework.
You should install the Laravel framework instead of Lumen and refer its docs on sessions.
Also, the default PHP sessions are still available.
Related
I have an existing laravel project with AlpineJS. I wanted to integrate authentication but not able to find a proper solution having in mind I DONT USE VUE. I have done this with Vue but just wanted to know if there's an updated guide for Laravel with Alpine JS. I tried to look into documentation but wasnt able to find something related.
composer require laravel/ui
php artisan ui:auth
Do I still need to do this? Any suggestions for best practices?
Alpine is just a lightweight framework for DOM manipulation, it's not going to provide any authentication functionality alone so you will need to add something to your project.
If you're wanting to add authentication to your application, you'll want to consider something like Laravel Fortify which is a headless front end agnostic authentication solution. There are starter kits such as Breeze or Jetstream, however, adding either of these boilerplate start kits to existing projects can have issues. Some people recommend starting a new project, installing one of them and them porting your existing functionality across (this will obviously depend on the scale of your project).
I am new to laravel and but know core PHP well. And I am decided to create a project in laravel. So I started studying laravel. while I research about laravel, laravel community says that laravel 5.1 has Long term support(LTS). Now I confused which version want to use. Give me suggestions about which one want to use.
#Gowtham I reccommend to go for 5.3 version. because of realy specious features like
Laravel Scout: is a driver based full-text search for Eloquent
Laravel Mailable :is a new Mail class for sending emails in an expressive way.
Laravel Notifications : awesome feature which allows you to make quick updates through services like Slack, SMS, or Email.
Laravel Passport : Another superb feature . It is an optional package that is a full oAuth 2 server ready to go.
There are lot more which will curious you to go for 5.3 version.
Is there a middleware for sessions in PHP Slim Framework? If not, is there a lightweight session library that works well with the Slim Framework? Its important that the library supports session storage in a database (MySQL).
Slim session manager package can be used. It's available at:
https://github.com/yusukezzz/slim-session-manager
Composer based installation
Slim middleware
Can be used with any database driver
Hope it helps.
PHP native sessions can be database backed.
PHP sessions in Database
It's pretty easy to use native PHP sessions, not sure why you'd need a library.
According to their Session Docs, they only have
Native Session Store
Cookie Session Store
It doesn't appear to have a database backed session. Maybe its in development or maybe there is a 3rd party plugin for it.
I'm using Symfony components in my web application. I need to store session in APC but unfortunatelly I can't find the way to do it.
As I see here Symfony does not support APC as a session handler. Is that true?
I have found an old example of using APC as a session handler in Symfony. But there all configuration is done in factories.yml file which I don't have since I'm only using standalone Symfony components.
Can anyone give me an example of using APC as a session handler using only Symfony components?
Since I don't get any answer here for a long time I will answer the question myself. For now there is no built in suport for APC as a session handler in Symphony framework. There is no particlar reason for it, likely Symphony developers just did not get to it.
The solution is simple, just code APCSessionHandler.php file yourself (I was not doing it because we decided not use this in project), APCSessionHandler will be very similar to MemcachedSessionHandler.php file.
How to store PHP sessions in APC Cache? suggests it is feasible but a bad idea for a busy site. The accepted answer lists a few useful ideas
I'm trying to integrate Facebook's API in a CodeIgniter project, however it seems to be not working because sessions are disabled somehow in CodeIgniter. (Trying to integrate outside CodeIgniter works, but inside a codeigniter project it doesn't work).
Is there any way to do this? All I want is for native sessions to not be cleared or destroyed by CodeIgniter. If the only way is to hack the core to remove a line or two, then I'm willing to do it. I think there's someplace where its doing $_SESSION = null or something like that. Where's this place, so I can remove that line?
If you follow this blog on a fresh CI install, it works without any problem:
http://www.dannyherran.com/2011/02/facebook-php-sdk-and-codeigniter-for-basic-user-authentication/
From there, you can continue to build you application, or find where it goes wrong.
in CI session are not disabled.
It must be done in your manual coding.
Please refer your coding again.
It is also possible that some jQuery - JS is conflicted in project, which can destroy session.
There is a library to extend CI sessions (which are cookies) to use native server sessions.
Have a look at this native session library.