how to set a cookie in ez ?

Author Message

nuno emilio

Friday 25 July 2003 7:57:39 am

Can anyone please tell me how could i set a cookie in a template operator php page. I've made a template operator page for a visit counter and i need to know if it's the first time (in that session) that the user enter the page (for incrementing the counter) or not (for not incrementing). I think that i must use cookies for that, but with the php function setcookie i couldn't create it. Can anyone tell me how can i use cookies in ez ? or there is a better away to do this without cookies ?

John van der Boom

Friday 25 July 2003 8:25:26 am

I'm having the same problem, but with reading cookies. Ez has problems reading cookies too. Think its an allround problem with ez not able to handle cookies very well (or at all).

A script of mine wich needs to read a cookie to see exactly if a member has already visit my page (just like yours), read the cookie standalone without any problem. But when I implement it in ez it won't.

I'll inform you when I figure out how to solve this. I think it's gonna be difficult tough. Let me know if you figure something out...

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 19:15:23
Script start
Timing: Jan 18 2025 19:15:23
Module start 'layout'
Timing: Jan 18 2025 19:15:23
Module start 'content'
Timing: Jan 18 2025 19:15:23
Module end 'content'
Timing: Jan 18 2025 19:15:23
Script end

Main resources:

Total runtime0.6709 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.0469152.6250
Module start 'layout' 0.00550.0035 741.671939.4453
Module start 'content' 0.00890.6605 781.1172456.4141
Module end 'content' 0.66940.0014 1,237.53138.1641
Script end 0.6709  1,245.6953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.5696160.0002
Check MTime0.00150.2208160.0001
Mysql Total
Database connection0.00080.111910.0008
Mysqli_queries0.628193.6178540.0116
Looping result0.00080.1188520.0000
Template Total0.634594.620.3173
Template load0.00210.310920.0010
Template processing0.632494.265220.3162
Template load and register function0.00030.041910.0003
states
state_id_array0.00100.153210.0010
state_identifier_array0.00170.256120.0009
Override
Cache load0.00170.248880.0002
Sytem overhead
Fetch class attribute can translate value0.00070.099420.0003
Fetch class attribute name0.00721.067720.0036
XML
Image XML parsing0.00020.035220.0001
class_abstraction
Instantiating content class attribute0.00000.001520.0000
General
dbfile0.00060.0908100.0001
String conversion0.00000.002040.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 6
 Number of unique templates used: 4

Time used to render debug report: 0.0001 secs