View Full Version : Login in a diferent site

02-22-2007, 12:41 PM
I have a site of an university in PHP and a joomla site for university administration. Can I have a authentication form in the main site for logon the joomla site?? If yes how can I do that??...I have tried several times without success!!!

I have a the next form:


<form ID="secLogin" action="secretaria/index.php?option=com_comprofiler&task=login" target="_blank" method="post">

&nbsp;<input name="username" id="username" type="text" size="20">
<input name="passwd" id="password" size="20" type="password">
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="Reset" type="reset" value="Limpar">&nbsp;&nbsp;<input type="submit" value="Submeter" /></div>


And result say that I havenīt permissions!!! Which permissions??

02-22-2007, 04:25 PM
It depends on how the login system in Joomla works, and on your own site.

Cross-over logins are not that easy.

It usually requires modification on both sides.

This isn't really a must have, but more like a nice to have. Unless you want to do some research it might not be worth the effort.

02-22-2007, 06:45 PM
It definitely would be a pain. I haven't tried it before, but I've heard of people doing it. Do a search on here and Google to see how other people have accomplished this. I know it would definitely take either modifications of the tables, or you would have to somehow join the different columns together. It would be complicated, but most likely possible.

03-01-2007, 01:55 PM
Do you have examples of people or post's of that??

03-01-2007, 03:41 PM
Not without searching, which you all can do too. I only say what I said above because I researched into how to join two user database tables because I was thinking of linking two Joomla sites together. From what I read at that time, and from what I know now as a PHP/MySQL Programmer, you would have to have two different connections to two databases. Then, you have to check the entered username/password from both tables, choose which table to use the user information from, etc. I guess if you wanted to keep it more on the simple side, you might be able to do it without too many problems. I'm sure there are others who have actual practical experience in this, so I'll let them give concrete details.

03-01-2007, 05:19 PM
Recently did this for a cross domain auth between asp.net/mssql and 2 load balanced php/mysql servers. The amount of work involved is not small. I'd advise against it unless cross domain logins are essential to functionality.

Gist of it went like this:

PHP1 managed session data in mysql for both PHP1 and PHP2 servers.

PHP1 had the detailed user table with a column php_session_ID which was updated with session_ID() from the custom session handlers and auth scripts.

ASP1 server mirrored only essential user records in mssql (userName, Password, Access_ID), with a column asp_session_ID. ASP1 User records managed from PHP1 except for asp_session_id, ASP1 took care of it's own session handling.

PHP and ASP configured to session.use_only_cookies.

Auth scripts on all servers checked for session_id cookies from opposing platform. If set, queried the opposing database for user.xxx_session_id. If still current, user auto-logged on.

Both platforms had great session handlers for garbage collection to keep user.xxx_session_id current.

The only problem we encountered were from firefox and ie users with 'maintain session state' mods active. They could logon, but logging off x-domain was a migrane to tackle.

Bottom line - I wouldn't bother. Let your users logon twice.