Forums / Developer / pass variable into php file using querystring

pass variable into php file using querystring

Author Message

Dhaval Patel

Tuesday 22 January 2008 10:16:14 pm

hello

i have integrated knowledge tree into ezpublish (only login and logout system)

login and logout are workig fine at local.

i m sending one variable from kt to ez from link.

i have used normal php url like "index.php/eng/user/login?var1=value1&var2=value2" to pass variables from kt to redirect to ez.

and i fetch "var1" to login.php file of ez using getVariable method.

this works fine at localhost. but it is not fetching variable on the server.

means i am not getting "var1" and "var2" in login.php file of ez.

so please help me how to get "var1" and "var2" in login.php file.

With Best Regards,

Dhaval Patel
Team Leader - iNETProcess(I) Pvt. LTD.
[email protected]
Ph No: +91 79 65 12 35 00
http://www.inetprocess.co.in

Maxime Thomas

Wednesday 23 January 2008 4:20:56 am

Hi Dhaval,

If you would like to automaticaly login in eZ, you must post variables on the /user/login url. Get method won't work.

For a better integration of authetication, I recommand you to look at a Single Sign On mecanism which is more secure and totally transparent. It means that you won't get your login and password in the calling url like :

http://www.domain.com/admin/user/login?login=toto&pass=toto123

The more famous of the Open Source SSO software is called CAS (Central authentication service). You can find it here :

http://en.wikipedia.org/wiki/Central_Authentication_Service

An extension already exist to get a CAS login handler in eZ :

http://ez.no/developer/contribs/applications/smile_cas

Hope it helps...

Maxime Thomas
[email protected] | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Dhaval Patel

Wednesday 23 January 2008 10:25:35 pm

hi maxime,

thanks for replying.

in url i m not passing login and password.

i m just passing the sessionid.

so please tell me how to pass variable to login.php file of ez from kt link in querystring.

With Best Regards,

Dhaval Patel
Team Leader - iNETProcess(I) Pvt. LTD.
[email protected]
Ph No: +91 79 65 12 35 00
http://www.inetprocess.co.in

Kristof Coomans

Thursday 24 January 2008 12:32:38 am

Hi Dhaval

Just being curious... why do you need to pass a session ID there?

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Dhaval Patel

Thursday 24 January 2008 1:07:12 am

thank you for replying,

now what i am doing that i have two diff systems. ez and kt.

ni both system, the users will be same with username and password.

so when anybody log in into the kt then he click on ez link to redirect to ez at that time i am sending one variable of sessionid that will be in kt user table.

i will fetch the passed sessionid in login.php file of ez and i will get the username and password from kt table using that session id.

kt is storing the logged in users in table "active_sessions" with sessionid, userid.

and from that userid , i will get username and password from "users" table in kt system.

as the usernames and passwords are same in both the system, i will do login into ezpublish.

now the problem is that, i am able to fetch the sessionid at localhost.

But the problem is that i am not getting the sessionid at server.

so tell me the ways of passing the variables in querystring.

currently i am sending the variables using url "index.php/fre/user/login/?frmkt=1254asdas23184afa23fa4".

so i can get the frmkt variable at localhost using $http->getVariable("frmkt").

but not at server...

With Best Regards,

Dhaval Patel
Team Leader - iNETProcess(I) Pvt. LTD.
[email protected]
Ph No: +91 79 65 12 35 00
http://www.inetprocess.co.in

Dhaval Patel

Friday 25 January 2008 5:28:29 am

hello to all.

i have done this by pssing vars like

index.php?/eng/user/login/&var1=val1&var2=val2

Thank You once again.

With Best Regards,

Dhaval Patel
Team Leader - iNETProcess(I) Pvt. LTD.
[email protected]
Ph No: +91 79 65 12 35 00
http://www.inetprocess.co.in

Jianjun Hu

Monday 15 June 2009 7:07:21 pm

<b>Smile CAS</b> vs. <b>Cas with ezpublish 4.0.1</b>, which is better? Thanks!

OnlyBlue

☆..·°∴°.☆°°.☆°.
°∴ °☆ .·enjoy star° .·★°∴°
∴°.°★ .·°
  ミ☆°∴°.★☆° ∴·°
°.☆° .·∴° 

Is it a pleasure after all to practice in due time what one has learnt?