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, ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| 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
| |||
| |||
| 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
| |||
| |||
| 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
| |||
| |||
| you're welcome |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dynamic InfoBoxes Behavior | kopoba11 | osCMax v2 Installation issues | 3 | 09-24-2006 03:33 AM |