Analytics code

I deactivated the analytics code a long time ago. Recently, I browsed my site and discovered that it simply will not validate as valid [COLOR=Red]XML[/COLOR], so the whole page will not render.

I tried to deactivate it again, but with no effect.

You can see that it’s an issue I would like to correct as soon as possible.

Thanks.

I suspect that 000webhost either automatically appends PHP code at the end of my php, and because it is using PHP short tags “<?”, the parser fails to recognize it as PHP and lets it through, or it appends it after the PHP parsers passes over my page.

If it was supposed to be parsed by the PHP engine, it should not use short tags, as their use is discouraged, even by the php.net team.

[php.net] PHP: Basic syntax - Manual

Thanks

Can we please see a link to your site?

http://www.sebleblanc.net/

Used to work correctly.

From the control panel didn’t work for me, but going to this link did.

tdem,

I know how to disable the Analytics code, thanks, and I did disable it. That is not the issue.

So fix it to use long php tags. You’ve obiviously figured out why it fails validation.

I did not add this code, it is automatically added by 000webhost. It is PHP code, not javascript, and it fails to get parsed by the PHP engine because of the short tags. It is not part of my PHP sources, so I cannot edit it.

I didn’t actually look at the code before. However it is PHP - PHP that calls a seperate javascript file. The validation error at line 44 is because of the short PHP tag. You should really submit a support ticket with 000webhost, no one on this forum will be able to change that.

In the interem, you could try to include a php script earlier in the page that would unset the variables $c_announce and $c_ads. I don’t know if will help with the validation though.

Thanks, s.j.hebert, I’ll submit a support ticket.

I don’t think that unsetting those variables will do something, because that PHP code isn’t even parsed…

Thanks all, 000webhost fixed it!

It is finally working correctly.