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.
dhaval.patel@inetprocess.com
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
maxime.thomas@wascou.org | 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.
dhaval.patel@inetprocess.com
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.
dhaval.patel@inetprocess.com
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.
dhaval.patel@inetprocess.com
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?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:39:53
Script start
Timing: Jan 18 2025 11:39:53
Module start 'layout'
Timing: Jan 18 2025 11:39:53
Module start 'content'
Timing: Jan 18 2025 11:39:54
Module end 'content'
Timing: Jan 18 2025 11:39:54
Script end

Main resources:

Total runtime0.9168 sec
Peak memory usage4,096.0000 KB
Database Queries73

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0079 588.0469152.6406
Module start 'layout' 0.00790.0030 740.687539.4766
Module start 'content' 0.01090.9046 780.1641665.5313
Module end 'content' 0.91540.0014 1,445.695320.1250
Script end 0.9168  1,465.8203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.4392160.0003
Check MTime0.00140.1576160.0001
Mysql Total
Database connection0.00140.157310.0014
Mysqli_queries0.842591.8948730.0115
Looping result0.00070.0759710.0000
Template Total0.881796.220.4409
Template load0.00230.248420.0011
Template processing0.879495.919320.4397
Template load and register function0.00020.020410.0002
states
state_id_array0.00130.143510.0013
state_identifier_array0.00080.082820.0004
Override
Cache load0.00200.2182570.0000
Sytem overhead
Fetch class attribute can translate value0.00090.097840.0002
Fetch class attribute name0.00180.1982100.0002
XML
Image XML parsing0.00160.173140.0004
class_abstraction
Instantiating content class attribute0.00000.0020100.0000
General
dbfile0.00110.1157280.0000
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs