[You don't often get email from geteduroam AT lists.geant.org. Learn why this is important at
https://aka.ms/LearnAboutSenderIdentification ]
On 20/11/2025 06:18, "Jamie Getty" (via geteduroam Mailing List) wrote:
> I assume this is because of an issue with the generated XML
>
> So my next step was to capture the output of geteduroam.sh into a file, then
> validating that file against the eap-metadata.xsd, and it had a blank line at
> the start.
> This caused this error:
>
> output.xml:2: parser error : XML declaration allowed only at the start of the
> document
> <?xml version="1.0" encoding="utf-8"?>
>
> Is this the reason that the geteduroam app is failing to parse our XML?
It is indeed required to have the document start with <?xml, without any
whitespace in front.
However, are you sure it's a newline at the start? It could also be a
UTF8 BOM.
> I also added an extra log to the file www/api/eap-config/index.php to see what
> the XML output is, but there was no empty line as the start of the output.
> So I suspect this means that somewhere between the index.php script generating
> output and our apache2 server returning it, a starting newline is added.
>
> This is a new issue that was a result of me trying to recreate the deployed
> letswifi-portal a second time, so I would assume this is an issue with our
> deployment.
> How should I troubleshoot this?
Please confirm with `git status` that all PHP files in letswifi-portal
are unmodified. If any of the PHP files was modified to include a BOM
before <?php, it could cause errors.
If the PHP code is unmodified and the error still occurs, I'm at a loss
on what could have happened here. Can you download an eap-config file
from the web UI (it's the same effect as with the shell script) and see
if it has the same problem?
--
Jørn Åne de Jong
geteduroam