validazione pagina

ho provato a validare il sottoriportato codice

<a class="menuLink" href="start.php">Home</a>
<span class="divisore">|</span>
<a class="menuLink" <?php echo"href='start.php?pagina=7'";?> >Azienda</a>
<span class="divisore">|</span>
    <a class="menuLink" href="start.php?pagina=10">Dove siamo</a> 
<span class="divisore">|</span>

purtroppo sia con il codice riga 3 che riga 5 ricevo il seguente warning:

Warning Line 45 column 50: cannot generate system identifier for general entity "PHPSESSID".

...="menuLink" href='start.php?pagina=7&PHPSESSID=447f1a0b30a59e0074cf5c0ae385d5

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 45 column 50: general entity "PHPSESSID" not defined and no default entity.

...="menuLink" href='start.php?pagina=7&PHPSESSID=447f1a0b30a59e0074cf5c0ae385d5

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 45 column 59: reference not terminated by REFC delimiter.

...k" href='start.php?pagina=7&PHPSESSID=447f1a0b30a59e0074cf5c0ae385d5d6' >Azie

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 45 column 59: reference to external entity in attribute value.

...k" href='start.php?pagina=7&PHPSESSID=447f1a0b30a59e0074cf5c0ae385d5d6' >Azie

This is generally the sign of an ampersand that was not properly escaped for inclusion in an attribute, in a href for example

qualcuno s darmi una mano?

grazie giovanni

inviato 9 anni fa
bonann23
X 0 X

E' un problema con il sistema automatico delle sessioni, che cerca di aggiungere il session ID a tutti gli URL contenuti nella pagina.

Prova ad andare nel php.ini e a togliere il punto e virgola iniziale dalla direttiva:

;arg_separator.output = "&amp;"

e riavvia Apache

:bye:

risposto 9 anni fa
Gianni Tomasicchio
X 0 X

purtroppo no ho l'abilitazione ad agire sul file php.ini.

Cosa posso fare in alternativa a quello che mi hai suggerito?

Ho letto che posso agire sul file htaccess; ma non s come muovermi.

Sai dirmi qualcosa?

grazie giovanni

risposto 9 anni fa
bonann23
X 0 X

prova a mettere all'inizio dello script l'istruzione:

ini_set("arg_separator.output","&amp;");

:bye:

risposto 9 anni fa
Gianni Tomasicchio
X 0 X

ok FUNZIONAAAAAAAAAAAAA!!!!!!!

grazie.

Purtroppo i problemi non finiscono mai ed ecco cosa trovo superati i problemi che mi hai risolto:

# Error Line 83 column 118: general entity "special" not defined and no default entity.

...dTipologia' href='start.php?pagina=6&special=19&amp;PHPSESSID=bf0da977c137df3

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 83 column 125: reference not terminated by REFC delimiter.

...gia' href='start.php?pagina=6&special=19&amp;PHPSESSID=bf0da977c137df32ae4eba

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.

cosa devo fare?

grazie giovanni

risposto 9 anni fa
bonann23
X 0 X

Quando crei gli URL dei link nella pagina HTML non devi usare il carattere & per separare i parametri ma devi mettere &amp;

:bye:

risposto 9 anni fa
Gianni Tomasicchio
X 0 X
Effettua l'accesso o registrati per rispondere a questa domanda