Jump to content

php session issue


Ninjakreborn

Recommended Posts

[quote]Below are the results of checking this document for XML well-formedness and validity.

Warning Line 53 column 35: cannot generate system identifier for general entity "PHPSESSID".
<li><a href="/gateway.php?url=pets&PHPSESSID=27131950d80f588c760f16f44e7cf06d" t
An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (;). The most common cause of this error is unencoded ampersands in URLs as described by the WDG in "Ampersands in URLs".

Entity references start with an ampersand (&) and end with a semicolon (;). If you want to use a literal ampersand in your document you must encode it as "&amp;" (even inside URLs!). Be careful to end entity references with a semicolon or your entity reference may get interpreted in connection with the following text. Also keep in mind that named entity references are case-sensitive; &Aelig; and &aelig; are different characters.

If this error appears in some markup generated by PHP's session handling code, this article has explanations and solutions to your problem.

Note that in most documents, errors related to entity references will trigger up to 5 separate messages from the Validator. Usually these will all disappear when the original problem is fixed.



Error Line 53 column 35: general entity "PHPSESSID" not defined and no default entity.
<li><a href="/gateway.php?url=pets&PHPSESSID=27131950d80f588c760f16f44e7cf06d" t
This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.



Warning Line 53 column 44: reference not terminated by REFC delimiter.
...href="/gateway.php?url=pets&PHPSESSID=27131950d80f588c760f16f44e7cf06d" title
If you meant to include an entity that starts with "&", then you should terminate it with ";". Another reason for this error message is that you inadvertently created an entity by failing to escape an "&" character just before this text. [/quote]
is it not possible to keep a site that uses sessions validated.  because if some of the pages require you to be signed in, so the validator won't be abel to get to those, what do I do about all of this?
Link to comment
Share on other sites

I know one aspect of it is
& in urls
and to replace them with
&amp;
but the thing is it's automatically stringing my session id's I am done with the project, I don't want to dedicate too much more time to it, but I don't want to keep leaving those validation errors if I can find away to clean it up fairly quickly, it's all related to my php.
Link to comment
Share on other sites

I found something in one of my includes here

[code]<ul>
<li><a href="/gateway.php?url=pets" title="Pets">Pets</a></li>
<li><a href="/gateway.php?url=jewelry" title="Jewelry">Jewelry</a></li>
<li><a href="/gateway.php?url=electronics" title="Electronics">Electronics</a></li>
<li><a href="/gateway.php?url=personalitems" title="Personal Items">Personal Items</a></li>
<li><a href="/stolengateway.php" title="Stolen Items">Stolen Items</a></li>
<li><a href="/gateway.php?url=miscitems" title="Misc Items">Misc Items</a></li>
<li><a href="/postfound/found1.php" title="Post Found Items">Post Found Items</a></li>
<li><a href="/postlost/lost1.php" title="Post Lost Items">Post Lost Items</a></li>
<li><a href="/advancedsearch.php" title="Advanced Search">Advanced Search</a></li>
</ul>[/code]
Those url's it is complaining about Here are some of the errors


[quote]Warning Line 53 column 35: cannot generate system identifier for general entity "PHPSESSID".
<li><a href="/gateway.php?url=pets&PHPSESSID=cdc07925fc3affa87855d873a5649dec" t
An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (;). The most common cause of this error is unencoded ampersands in URLs as described by the WDG in "Ampersands in URLs".

Entity references start with an ampersand (&) and end with a semicolon (;). If you want to use a literal ampersand in your document you must encode it as "&amp;" (even inside URLs!). Be careful to end entity references with a semicolon or your entity reference may get interpreted in connection with the following text. Also keep in mind that named entity references are case-sensitive; &Aelig; and &aelig; are different characters.

If this error appears in some markup generated by PHP's session handling code, this article has explanations and solutions to your problem.

Note that in most documents, errors related to entity references will trigger up to 5 separate messages from the Validator. Usually these will all disappear when the original problem is fixed.



Error Line 53 column 35: general entity "PHPSESSID" not defined and no default entity.
<li><a href="/gateway.php?url=pets&PHPSESSID=cdc07925fc3affa87855d873a5649dec" t
This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.



Warning Line 53 column 44: reference not terminated by REFC delimiter.
...href="/gateway.php?url=pets&PHPSESSID=cdc07925fc3affa87855d873a5649dec" title
If you meant to include an entity that starts with "&", then you should terminate it with ";". Another reason for this error message is that you inadvertently created an entity by failing to escape an "&" character just before this text.



Warning Line 53 column 44: reference to external entity in attribute value.
...href="/gateway.php?url=pets&PHPSESSID=cdc07925fc3affa87855d873a5649dec" title
This is generally the sign of an ampersand that was not properly escaped for inclusion in an attribute, in a href for example. You will need to escape all instances of '&' into '&amp;'.



Error Line 53 column 44: reference to entity "PHPSESSID" for which no system identifier could be generated.
...href="/gateway.php?url=pets&PHPSESSID=cdc07925fc3affa87855d873a5649dec" title
This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.



Info Line 53 column 34: entity was defined here.
<li><a href="/gateway.php?url=pets&PHPSESSID=cdc07925fc3affa87855d873a5649dec" t
Warning Line 54 column 47: reference not terminated by REFC delimiter.
...f="/gateway.php?url=jewelry&PHPSESSID=cdc07925fc3affa87855d873a5649dec" title


Warning Line 54 column 47: reference to external entity in attribute value.
...f="/gateway.php?url=jewelry&PHPSESSID=cdc07925fc3affa87855d873a5649dec" title


Error Line 54 column 47: reference to entity "PHPSESSID" for which no system identifier could be generated.
...f="/gateway.php?url=jewelry&PHPSESSID=cdc07925fc3affa87855d873a5649dec" title


Info Line 53 column 34: entity was defined here.
<li><a href="/gateway.php?url=pets&PHPSESSID=cdc07925fc3affa87855d873a5649dec" t
Warning Line 55 column 51: reference not terminated by REFC delimiter.
...gateway.php?url=electronics&PHPSESSID=cdc07925fc3affa87855d873a5649dec" title


Warning Line 55 column 51: reference to external entity in attribute value.
...gateway.php?url=electronics&PHPSESSID=cdc07925fc3affa87855d873a5649dec" title


Error Line 55 column 51: reference to entity "PHPSESSID" for which no system identifier could be generated.
...gateway.php?url=electronics&PHPSESSID=cdc07925fc3affa87855d873a5649dec" title


Info Line 53 column 34: entity was defined here.
<li><a href="/gateway.php?url=pets&PHPSESSID=cdc07925fc3affa87855d873a5649dec" t
Warning Line 56 column 53: reference not terminated by REFC delimiter.
...teway.php?url=personalitems&PHPSESSID=cdc07925fc3affa87855d873a5649dec" title


Warning Line 56 column 53: reference to external entity in attribute value.
...teway.php?url=personalitems&PHPSESSID=cdc07925fc3affa87855d873a5649dec" title


Error Line 56 column 53: reference to entity "PHPSESSID" for which no system identifier could be generated.
...teway.php?url=personalitems&PHPSESSID=cdc07925fc3affa87855d873a5649dec" title


Info Line 53 column 34: entity was defined here.
<li><a href="/gateway.php?url=pets&PHPSESSID=cdc07925fc3affa87855d873a5649dec" t
Warning Line 58 column 49: reference not terminated by REFC delimiter.
..."/gateway.php?url=miscitems&PHPSESSID=cdc07925fc3affa87855d873a5649dec" title


Warning Line 58 column 49: reference to external entity in attribute value.
..."/gateway.php?url=miscitems&PHPSESSID=cdc07925fc3affa87855d873a5649dec" title


Error Line 58 column 49: reference to entity "PHPSESSID" for which no system identifier could be generated.
..."/gateway.php?url=miscitems&PHPSESSID=cdc07925fc3affa87855d873a5649dec" title


Info Line 53 column 34: entity was defined here.
<li><a href="/gateway.php?url=pets&PHPSESSID=cdc07925fc3affa87855d873a5649dec" t[/quote]
I didn't classify this as html, because my url's have to do with php.  And it is adding an & at the end of those to add session id behind the scenes, but it's not escaping it, that is one of the problems, so if I can fix that, it will fix it on most of the pages throughout the website, because that is included on every page.
Link to comment
Share on other sites

Yes it goes at the very top of your php scripts. However you can add it to htaccess file if you want like so:
[code]php_flag arg_separator.output &amp;[/code]
That way you dont have to use ini_set. However you'll need to check with your webhost whether you can use htaccess files with your hosting account, so do allow the use of htaccess however some dont.
Link to comment
Share on other sites

the htaccess code issued a severe 505 server error, but the other thing, I put it on the include page, RIGHT ABOVE the section about that, and it worked fine, now everything validates successfully on the homepage I am checking around and updating the other pages now.  Thanks for all the help.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.