-
andymike Newbie

-
Posts: 4
Threads: 2
Joined: Dec 2015
Reputation:
0
Hi,
Currently, i have kohana framework and codeigniter website. Can anyone help or show me a way to integrate Kohana script into codeigniter script?
Or maybe using kohana website as subfold (subdomain) that at least make kohana user login same as codeigniter meaning when user logs in from codeigniter website, it is automatically login in kohana website.
Thank you so much for your help
-
skunkbad Senior Citizen
    
-
Posts: 1,300
Threads: 63
Joined: Oct 2014
Reputation:
86
12-05-2015, 08:45 PM
(This post was last modified: 12-05-2015, 08:46 PM by skunkbad.)
(12-05-2015, 12:30 AM)andymike Wrote: Hi,
Currently, i have kohana framework and codeigniter website. Can anyone help or show me a way to integrate Kohana script into codeigniter script?
Or maybe using kohana website as subfold (subdomain) that at least make kohana user login same as codeigniter meaning when user logs in from codeigniter website, it is automatically login in kohana website.
Thank you so much for your help
I can't give you very specific advice, but in many websites I have worked on, I have had more than one application handle requests. The requests will by default route to one application, but other specific routes are routed to the other app by using Apache mod_rewrite. For example:
Code: Options -Indexes
RewriteEngine On
RewriteBase /
# URLs routed to CodeIgniter
RewriteRule ^auth(.*)$ /ci_index.php [L]
RewriteRule ^forms(.*)$ /ci_index.php [L]
RewriteRule ^login$ /ci_index.php [L]
RewriteRule ^logout$ /ci_index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
In this example, all requests are routed to WordPress unless they are auth, forms, login, or logout. Notice that I have renamed CI's index.php file to ci_index.php.
Both CI and Wordpress are sharing the same database, so I can use WordPress to create content that is pulled into CI.
With some creative planing, I'm sure you can figure out how to make something similar work for you.
-
PaulD Posting Freak
    
-
Posts: 1,061
Threads: 42
Joined: Mar 2015
Reputation:
73
I have a few sites that use a CMS with a login tied into codeigniter. The problem, and I am not underestimating it, because it can be seriously difficult, is getting the two to recognize each others logins. I have to admit that I have never actually managed it with wordpress, which is a real pain, because I would really like to.
If anyone has any info or tips about how to do it I would be really interested to hear. Sharing a database is one thing, but sharing a login seems to mean creating two differently encoded cookies, which has always been a severe headache. Admittedly I have never been in the position of having to do this, choosing one login to work as default and the other system to share the database info. However I can think on a few scenarios where doing this (if it was easy enough) would be really, really helpful.
Best wishes,
Paul.
-
andymike Newbie

-
Posts: 4
Threads: 2
Joined: Dec 2015
Reputation:
0
(12-05-2015, 08:45 PM)skunkbad Wrote: (12-05-2015, 12:30 AM)andymike Wrote: Hi,
Currently, i have kohana framework and codeigniter website. Can anyone help or show me a way to integrate Kohana script into codeigniter script?
Or maybe using kohana website as subfold (subdomain) that at least make kohana user login same as codeigniter meaning when user logs in from codeigniter website, it is automatically login in kohana website.
Thank you so much for your help
I can't give you very specific advice, but in many websites I have worked on, I have had more than one application handle requests. The requests will by default route to one application, but other specific routes are routed to the other app by using Apache mod_rewrite. For example:
Code: Options -Indexes
RewriteEngine On
RewriteBase /
# URLs routed to CodeIgniter
RewriteRule ^auth(.*)$ /ci_index.php [L]
RewriteRule ^forms(.*)$ /ci_index.php [L]
RewriteRule ^login$ /ci_index.php [L]
RewriteRule ^logout$ /ci_index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
In this example, all requests are routed to WordPress unless they are auth, forms, login, or logout. Notice that I have renamed CI's index.php file to ci_index.php.
Both CI and Wordpress are sharing the same database, so I can use WordPress to create content that is pulled into CI.
With some creative planing, I'm sure you can figure out how to make something similar work for you.
Thank you very much for your help
For my understanding about your answer is, i should install both framework websites on same hosting, Kohana website is subdomain/ subfolder of codeigniter website, and using MOD rewrite to point to subdomain/folder.
But what about how to let user login 1 website and other should be logged in too? Thanks again
-
andymike Newbie

-
Posts: 4
Threads: 2
Joined: Dec 2015
Reputation:
0
Hi
After searching online, i found there is someone using External JSON Authentication - that allow users could have same username and password in both system. This method is worked by installing a small piece of code on your external system that Tickets will lookup whenever a user logs in. But i cannot get more specific information about this. This might be a clue
|