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.
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?

eZ debug

Timing: Jan 18 2025 04:55:19
Script start
Timing: Jan 18 2025 04:55:19
Module start 'content'
Timing: Jan 18 2025 04:55:20
Module end 'content'
Timing: Jan 18 2025 04:55:20
Script end

Main resources:

Total runtime0.9984 sec
Peak memory usage4,096.0000 KB
Database Queries210

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0087 588.9766180.8125
Module start 'content' 0.00870.8251 769.7891670.6250
Module end 'content' 0.83380.1646 1,440.4141341.0547
Script end 0.9983  1,781.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00470.4739210.0002
Check MTime0.00230.2342210.0001
Mysql Total
Database connection0.00100.097510.0010
Mysqli_queries0.894489.58882100.0043
Looping result0.00230.22952080.0000
Template Total0.946294.820.4731
Template load0.00360.355720.0018
Template processing0.942694.413820.4713
Template load and register function0.00010.013610.0001
states
state_id_array0.00320.318010.0032
state_identifier_array0.00160.163720.0008
Override
Cache load0.00330.3317570.0001
Sytem overhead
Fetch class attribute can translate value0.00150.146050.0003
Fetch class attribute name0.00180.1763100.0002
XML
Image XML parsing0.00340.343450.0007
class_abstraction
Instantiating content class attribute0.00000.0040100.0000
General
dbfile0.01701.7050390.0004
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs