Reputation: 539
Before explaining my situation, here is a small briefing of the system I am running and my overall experience with web programming:
Development Environment: Ubuntu Server 4.14 64-bit, Apache 2, PHP and MYSQL database. Experience: I do not have much experience with PHP, the main language I am using for my current project (it has been almost three years since I last worked with web programming; these last few years my focus was mainly on the development of desktop apps).
I am developing a new website for a company and almost all of the application code is ready. This application was developed in Zend Framework 2 (PHP) + Doctrine 2. Only a few aspects are missing, which are:
1 - The client currently has a website that works as an educational social network focused on providing a platform for students and teachers to interact and share knowledge and ideas. My work is related to the development of a new interface which we defined as a 'relational-modular interface' consisting in a new way of displaying information to the users of this platform. The website that the client already has was developed in Zend Framework 1, and we need the new application to coexist with the old application in the same domain. So far so good. The question is: these frameworks have a structure of files and directories that I do not fully understand yet, particularly concerning the implementation of Zend Framework 2 when organized within the implementation of Zend Framework 1. In simpler terms, I need to have the ZF2 application that I have developed running inside a fully functional ZF1 application [there are reasons for this choice that, albeit counter intuitive at first glance, will give us valuable time to work on the transition from the original platform to our new system]. The reason for running ZF2 inside ZF1 is that at certain points in the old application [ZF1], the user will be redirected to the new application [ZF2] without ever leaving the domain.
2 - Both applications [ZF1 and ZF2] will use the same domain (eg -..> Domain.com). The old application currently resides in a subdomain (ZF1 -> school.domain.com) and, for now, the new application will be located in a subdomain of the old application (ZF2 -> imr.school.domain.com). Up to this point, I suppose none of this is complicated to accomplish. However, using the aforementioned structure we still can't read the Session data that was created in the parent domain (school.domain.com) from the subdomain (imr.school.domain.com), which apparently is setting Cookies. We need to read and set these Session values in order for the user to be able to log in the relational modular interface and be redirected to the old application keeping his session active (and vice versa).
How can I achieve this?
Upvotes: 0
Views: 145
Reputation: 539
In case someone needs an answer to my problem, i've found a solution:
Unfortunately, can't use sub-domains. Had to use school.domain.com/imr. Not exactly what i've expected, but works.
Upvotes: 0