1
manumanu
Xoops session handling: something special? - Problem with Pear
  • 2004/10/9 16:13

  • manumanu

  • Just popping in

  • Posts: 10

  • Since: 2002/5/15


Is there something special in the way XOOPS handle sessions?

here is my situation:

I'm working on a module that uses complexes multi-pages forms. So I make extensive use of these coponents:
- PEAR:HTML_QuickForm
- PEAR:HTML_QuickForm_Controller (multi-pages forms)
- PEAR:HTML_QuickForm Smarty renderer
I also use XOOPS embeded Smarty engine with a local tpl file (not db::template).

To store values beetwen pages, QuickForm_Controller (QFC) uses sessions.

Everything is running well, but when I have to connect to a different database than XOOPS one (for fetching default form values), QFC is not able anymore to write session values...

So I tested various things:
- Tested the script outside XOOPS portal: running well
- Using $XoopsDB and querying XOOPS_DB_NAME: no problem, but I have to fetch data on a separate database.
I thought it was my DB connexion class (PEAR:B).
I manage to derivate the XOOPS database class to connect to a second database (see here) and again QFC cant write session values...

I seen 2 things:
- XOOPS use custom session handler ( and apparently serialized in a specific way (see
this thread))
- $xoopsDB object is stored in session

Finaly my questions are:
- do you think that connecting to a second database is changing something in the session handler?
- I suspect that connecting to a separate database is disturbing the XOOPS connexion_id stored in session, but how it can be intercepted?

Hoping to be clear enough
thanks if someone could help me

2
manumanu
Re: Xoops session handling: something special? - Problem with Pear
  • 2004/10/9 16:18

  • manumanu

  • Just popping in

  • Posts: 10

  • Since: 2002/5/15


note: QFC uses $_SESSION[] to access session values

3
ackbarr
Re: Xoops session handling: something special? - Problem with Pear

are you using custom sessions in System -> Preferences? What are the default session settings in your php installation?

4
manumanu
Re: Xoops session handling: something special? - Problem with Pear
  • 2004/10/10 11:50

  • manumanu

  • Just popping in

  • Posts: 10

  • Since: 2002/5/15


tested the two option and returned to normal sessions in admin cp

My php version is 4.3.8,Apache/2.0.50 (Win32), here the sessions settings:

Session Support     enabled
Registered save handlers     files user

Directive    Local Value    Master Value
session
.auto_start    Off    Off
session
.bug_compat_42    On    On
session
.bug_compat_warn    On    On
session
.cache_expire    180    180
session
.cache_limiter    nocache    nocache
session
.cookie_domain    no value    no value
session
.cookie_lifetime    0    0
session
.cookie_path    /    /
session.cookie_secure    Off    Off
session
.entropy_file    no value    no value
session
.entropy_length    0    0
session
.gc_divisor    100    100
session
.gc_maxlifetime    1440    1440
session
.gc_probability    1    1
session
.name    PHPSESSID    PHPSESSID
session
.referer_check    no value    no value
session
.save_handler    files    files
session
.save_path    C:PROGRA~1Zendtmp    C:PROGRA~1Zendtmp
session
.serialize_handler    php    php
session
.use_cookies    On    On
session
.use_only_cookies    Off    Off
session
.use_trans_sid    Off    Off


I have installed zend studio debuger (3.5.2) to track GLOBALS but the problem was present before...

thanks ackbarr

Login

Who's Online

276 user(s) are online (185 user(s) are browsing Support Forums)


Members: 0


Guests: 276


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits