#925068 doxygen: search.php uses <script language="php"> which is not supported by php7.0

Package:
doxygen
Source:
doxygen
Description:
Documentation system for C, C++, Java, Python and other languages
Submitter:
Antoine Musso
Date:
2022-07-18 04:15:08 UTC
Severity:
important
#925068#5
Date:
2019-03-19 17:27:12 UTC
From:
To:
Dear Maintainer,

The generated documentation comes with a PHP based search system. The
search.php page has:

	<script language="php">
	require_once "search_functions.php";
	main();
	</script>

However PHP 7.0 has removed support for <script language="php">:

https://php.net/manual/en/language.basic-syntax.phptags.php

Changelog

7.0.0 | The ASP tags <%, %>, <%=, and the script tag <script
       | language="php"> are removed from PHP.


As a result, the Doxygen generated documentation lacks a working search
engine.

PHP 7.0 support has been added upstream via 22b6783 and has been
released with Doxygen 1.8.15:
https://github.com/doxygen/doxygen/commit/22b67836d678cea695b977ec648c0aa013339c55
https://github.com/doxygen/doxygen/pull/680

Since Debian Stretch comes with PHP 7.0, I guess that upstream fix has
to be backported to restore the search functionality.

Example:
https://doc.wikimedia.org/mediawiki-core/master/php/search.php?query=ObjectCache

Downstream bug: https://phabricator.wikimedia.org/T218233

#925068#10
Date:
2019-03-20 17:52:04 UTC
From:
To:
Hi Antoine,

and thanks for the good and well documented report.

I agree that for consistency doxygen search should work with the PHP version we ship in any given
Debian release.
And this issue also applies to buster as it will ship doxygen 1.8.13 and php 7.3.

Fixing it for buster is higher priority, and a solution could be to backport doxygen 1.8.15,
but before that we need it in testing: https://bugs.debian.org/919413
Then for stretch, backporting it to stretch too is an option if it is painless.

Another option is to just backport the upstream fix.

I propose that we keep this on hold for now.

Paolo

#925068#15
Date:
2019-03-20 22:24:31 UTC
From:
To:

Hello Paolo,

Thank you for the quick reply and all the context with 1.8.15 status. I
hope it makes it to testing and get included in buster!


Regarding this bug, I will get our team to rebuild the Debian package
with the patch included (22b67836), test it, deploy it and monitor how
our documentations behave.  At least that will fix it for us.

Then maybe that will build enough confidence to have the patch included
in the Stretch package?

#925068#20
Date:
2019-03-21 08:21:20 UTC
From:
To:
Hi,

I think this is probably the best option for both buster and stretch. As
much as I'd like to see a new doxygen version in buster, #919413 looks a
little too impactful to do now that the freeze has started.

I backported the upstream patch to the doxygen currently in buster, and
it applied perfectly. Attached a debdiff, and uploaded a built .deb to
<https://people.debian.org/~legoktm/doxygen/>.

What do you think about just uploading that? If that looks good, I can
also prep something for stretch as well.

Thanks,
-- Kunal

#925068#25
Date:
2019-06-05 12:45:41 UTC
From:
To:
Hello Matthias,

I am reaching you for the Doxygen Debian package as you appear in its
Debian changelog.

Doxygen generated search.php does not work with Php 7.0, it is thus
broken on Stretch.

Upstream has fixed it, but we would need the patch to be backported as
an update to the Stretch package.  Is that something you could
potentially handle?


The patch is straightforward:

https://github.com/doxygen/doxygen/commit/22b67836d678cea695b977ec648c0aa013339c55
https://github.com/doxygen/doxygen/pull/680


And Debian bug: https://bugs.debian.org/925068