Page 1 of 1

Probable cause: Attempt to use an XML processing

PostPosted: 09. May 2012 13:41
by qretzu
Hello! I am new here and eager to learn more about xampp :) .

I don't want to jump right into this topic, but I have pretty much a similar problem.
I have a html file called lista.html, which has a form with action=rez_lista.php and 2 radio buttons. I acces the html file with the URL http://localhost/lista.html, when I click submit, the URL turns to http://localhost/rez_lista.html and the php code inside rez_lista.php won't get interpreted. When I click to view the page source, it shows pretty much like this : Image
Mozilla Firefox describes the problem as : Saq "<?". Probable cause: Attempt to use an XML processing instruction in HTML.(XML processing instructions are not supported in HTML).
And this is just an example, the problem repeats with pretty much every "form" html file.

Looking forward for a sollution.

[EDIT by Altrea: fixed Image URL and separated whole topic from the original post, because it is very common a different issue and should following the unwritten rule "one thread per user and issue"]

Re: Probable cause: Attempt to use an XML processing

PostPosted: 09. May 2012 16:16
by JonB
If you read your own message, you will 'see' the issue -

The best place for a question like this is in a PHP fourm.

Good Luck
8)

Re: Probable cause: Attempt to use an XML processing

PostPosted: 09. May 2012 18:11
by JonB
I should have said - Look at Altrea's response - (he is much more the PHP guru than I)

Code: Select all
the URL turns to http://localhost/rez_lista.html

Re: Probable cause: Attempt to use an XML processing

PostPosted: 09. May 2012 19:11
by Altrea
Hi qretzu,

qretzu wrote:when I click submit, the URL turns to http://localhost/rez_lista.html

Please verify: Are you really meaning rez_lista.html or rez_lista.php? Please double check that.
If it is .html then the solution is easy: Apache don't pass .html files through the php interpreter so none php-blocks get processed.

qretzu wrote:When I click to view the page source, it shows pretty much like this : [...]

If it is not possible solution 1, then i can guess that it can be a charset problem. You are using some special characters. I don't know which language it is, but looks like Romanian, so maybe you use a different charset. Especially the < and ? sign can be different, so that your PHP-Interpreter don't realize the block as PHP-Block.

"<?". Probable cause: Attempt to use an XML processing instruction in HTML.(XML processing instructions are not supported in HTML).

That looks like an error output of some HTML Validator. Do you use some HTML Validator Plugin in your Firefox?
Any Validator Plugin that takes effect before your .php interpreter can get the page can produce that issue too. Your Plugin must have the function to preload pages or other functionality apart from normal HTTP communication to produce such errors. Possible issue but very uncommon.

Last thoughts: filenames with chars from special charsets (like Romanian) can produce unexpected behaviors too.

best wishes,
Altrea