osCmax v2.5 User Manual
Results 1 to 4 of 4

wacky tag mangling behavior

This is a discussion on wacky tag mangling behavior within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; i'm trying to integrate OSCommerce into my existing PHP app, whereby sharing of session variables is required. right or wrong, ...

      
  1. #1
    Lurker
    Join Date
    Feb 2004
    Posts
    4
    Rep Power
    0


    Default wacky tag mangling behavior

    i'm trying to integrate OSCommerce into my existing PHP app, whereby sharing of session variables is required. right or wrong, i've chosen to accomplish this by including "application_top.php" and "application_bottom.php" in all my pages (even non-oscommerce ones) and using the tep_ functions to manage all variable registration.

    my problem is: when i include application_top.php in my code, i'm experiencing a problem where certain HTML tags are getting mangled.

    for example, what should look like this
    ---snip---
    <a href="#" onclick='javascript:addList();'>add list</a>
    | <a href="#" onclick="javascript:removeList();">remove list</a>
    ---snip---

    comes out like this

    ---snip---
    <a href="#" onclick='javascript:addList();'>add list</ | <a href="#" onclick="javascript:removeList();">remove list</a>
    ---snip---

    ...obviously distorting what the broser renders. when i simply remove this line:

    require('includes/application_top.php');

    the problem goes away. i've even removed all calls to any tep_xxxx functions from this page, and the problem persists.


    questions:
    1. any idea what could possibly cause this behavior?
    2. if not, any other suggestions on how i can share session variables between oscommerce pages and non-oscommerce pages?

    Thanks
    Steve

  2. #2
    Active Member
    Join Date
    Jan 2003
    Location
    Surrey, UK
    Posts
    126
    Rep Power
    0


    Default

    I asked this question on the oscommerce forums a while ago, I had table tags that weren't cl;osing and it was doing my head in, especially as my local server was fine but the remote was playing up.

    Anyway I think it's a bug in PHP itself, see here:

    http://www.oscommerce.com/community/bugs,1242

    I have sometimes found that it is possible to stop it simplay by changing the formatting of your code, eg splitting <a href="#" onclick='javascript:addList();'>add list</a> onto two lines

    <a href="#" onclick='javascript:addList();'>add
    list</a>

    that may or may not work. Upgrading to PHP 4.3 would fix it.

    jon

  3. #3
    Lurker
    Join Date
    Feb 2004
    Posts
    4
    Rep Power
    0


    Default

    that's the one alright.

    splitting onto two lines didn't work, however, the suggested work-around of adding the following line to application_top.php appears to have done the trick:

    ini_set ( 'session.use_trans_sid', 0);

    thanks again, my friend. it is much appreciated.

    steve

  4. #4
    Active Member
    Join Date
    Jan 2003
    Location
    Surrey, UK
    Posts
    126
    Rep Power
    0


    Default

    you're welcome

Similar Threads

  1. Dynamic InfoBoxes Behavior
    By kopoba11 in forum osCmax v2 Installation issues
    Replies: 3
    Last Post: 09-24-2006, 03:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •