Author Topic: input type="hidden" name="sessionid"  (Read 22011 times)

0 Members and 1 Guest are viewing this topic.

Offline thehammer

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • DigitalWhisper
input type="hidden" name="sessionid"
« on: October 21, 2007, 11:41:00 AM »
The comment form create a hidden field:
 <input type="hidden" name="sessionid" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
can you help me to find where the field is created ?

I need to modify this code to solve an error in Markup Validation Service ( http://validator.w3.org/ )

TIA!

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: input type="hidden" name="sessionid"
« Reply #1 on: October 21, 2007, 01:13:28 PM »
Quote
I need to modify this code to solve an error in Markup Validation Service ( http://validator.w3.org/ )

Is possible for say where you find source is say Markup create error for this ?
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline thehammer

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • DigitalWhisper
Re: input type="hidden" name="sessionid"
« Reply #2 on: October 21, 2007, 06:37:21 PM »
this is the error...

document type : XHTML 1.0 Strict

Code: [Select]
document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag .

…="f2c2d94452abe9a7ae1affebf8d1051d" />



The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").


this is the line....

Code: [Select]

#  <div style="background-color: #ffffff; padding:10px;"><form action='details.php?image_id=687&amp;sessionid=f2c2d94452abe9a7ae1affebf8d1051d' method='post' onsubmit='postbutton.disabled=true;'><input type="hidden" name="sessionid" value="f2c2d94452abe9a7ae1affebf8d1051d" />
#
# <div>Post comment</div>
# <div>
# <span><label for="user_name">Name:</label></span>
# <span><input type="text" name="user_name" title="Text input: Name" id="user_name" size="30" /></span>
# </div>



Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: input type="hidden" name="sessionid"
« Reply #3 on: October 21, 2007, 06:58:23 PM »
Hum ... if try this tabular fix:

http://www.4homepages.de/forum/index.php?topic=18256.0

Is problem there ?
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline thehammer

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • DigitalWhisper
Re: input type="hidden" name="sessionid"
« Reply #4 on: October 21, 2007, 07:42:00 PM »
... the form run ok  ...
but when i try to validate the page, have the above mentioned error...

If I know  WHERE is located in 4images scripts the creation of this  hidden field form.... ( <input type="hidden" name="sessionid" value="f2c2d94452abe9a7ae1affebf8d1051d" />)  i can solve my problem... ;)

may be that adding a little code like <div>... </div> is enough for a successful Validation....

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: input type="hidden" name="sessionid"
« Reply #5 on: October 21, 2007, 08:14:09 PM »
If you know, look for define name - SESSION_NAME ...
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline thehammer

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • DigitalWhisper
Re: input type="hidden" name="sessionid"
« Reply #6 on: October 21, 2007, 08:37:25 PM »
thanks thunderstrike but i need to locate where the string:
"<input type="hidden" name="sessionid" value="" />"
is created and modify it to  "<div> <input type="hidden" name="sessionid" value="" /> </div>"

this is the only field that is not inserted in the comment_form  template



Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: input type="hidden" name="sessionid"
« Reply #7 on: October 21, 2007, 08:42:36 PM »
In includes/sessions.php file, you need edit this line:

Quote
$url .= SESSION_NAME."=".$this->session_id;
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline thehammer

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • DigitalWhisper
Re: input type="hidden" name="sessionid"
« Reply #8 on: October 21, 2007, 10:21:41 PM »
 8O 8O 8O

please can you explain?

Offline thehammer

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • DigitalWhisper
Re: input type="hidden" name="sessionid"
« Reply #9 on: October 21, 2007, 11:25:12 PM »
found the cause.

Quote
"The problem is because PHP is adding the following HTML tag into your HTML to transport the Session id:
Code:
<input type="hidden" name="PHPSESSID" value="fa266b3bf02959848ab2ecb6d4ce1727" />

As you are using XHTML Strict DOCTYPE. The validator is failing because form field tags, such as input and textarea etc must be contained within block level elements. They cannot be on their own.

Solution:

1. Downgrade from XHTML Strict to XHTML Transitional. XHTML Transitional does not require block level elements to be wrapped around form field tags.
2. If you want to stay XHTML Strict you are going to have change PHP's configuration to only use only cookies and not use any other method to transport the sessions id. However this will break you PHP application if your users doesn't have cookies enabled."

about 3 hours for nothing.... bha!

Offline thehammer

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • DigitalWhisper
Re: input type="hidden" name="sessionid"
« Reply #10 on: October 21, 2007, 11:55:42 PM »
i've inserted in htaccess the following instruction:
 
Code: [Select]
php_flag session.use_trans_sid offand ALL is ok!!!  ;)

i found another solution:
Code: [Select]
ini_set('session.use_trans_sid', false);
that is the same... but i don't know where insert it in the 4images  php files ...





Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: input type="hidden" name="sessionid"
« Reply #11 on: October 22, 2007, 12:32:51 AM »
Quote
that is the same... but i don't know where insert it in the 4images  php files ...

You can find in includes/sessions.php file.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline thehammer

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • DigitalWhisper
Re: input type="hidden" name="sessionid"
« Reply #12 on: October 22, 2007, 12:43:56 AM »
Quote
that is the same... but i don't know where insert it in the 4images  php files ...

You can find in includes/sessions.php file.

it does not work ( for me ) ... otherwise I did not have the problem.. :)

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: input type="hidden" name="sessionid"
« Reply #13 on: October 22, 2007, 01:02:06 AM »
No work for you for change this ?

Quote
// Stop adding SID to URLs
    @ini_set('session.use_trans_sid', 0);

:? ...
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline thehammer

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • DigitalWhisper
Re: input type="hidden" name="sessionid"
« Reply #14 on: October 22, 2007, 01:35:49 AM »

only via htaccess ...
i've changed the 0 to false no reaction...

thanks for your support!