Welcome Guest, Not a member yet? Register   Sign In
CI as a module in a Legacy PHP APP
#1

[eluser]Garf Orlock[/eluser]
Hi, I am currently working on a CI app which will have to be integrated at a point, to a legacy PHP APP (no mvc, just plain PHP and html).

The catch is that since my CI APP will plug as a module, all users will login using the legacy PHP APP, I am trying to find a way to allow access to CI only for the users that have logged in from the old app, and block any other access that has not been auth.

Also is there a way of sharing session info among the two apps? for instance can my CI app access the session variables stored in the other app?

Thanks for your help and for reading this post.
#2

[eluser]Twisted1919[/eluser]
Yes there is. You will have to use a library that uses the PHP's native session handlers so that you can get the stored data within CI and also from your legacy PHP app.

You can do it with CI's session library also, and store the data into database then create a copy of the CI Sess lib so that it can be used independently of CI's core (but that can be too much of a hassle when you can just go with native sessions)
#3

[eluser]Garf Orlock[/eluser]
Thanks for your reply, any library that you would suggets ? i forgot (me fault) to mention I am using postgresql
#4

[eluser]Twisted1919[/eluser]
Well, depends on how you want to go with this, if you want to use the database for your sessions, then you can do a search : http://www.google.com/search?q=postgresq...=firefox-a
If you want to use what php provides by default, then look in the CI wiki for Native Sessions, there's a very useful library there that will help you get started .




Theme © iAndrew 2016 - Forum software by © MyBB