Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP version upgrade / Upnp script error with XMLReader #89

Open
shikasta-net opened this issue Aug 21, 2022 · 5 comments
Open

PHP version upgrade / Upnp script error with XMLReader #89

shikasta-net opened this issue Aug 21, 2022 · 5 comments

Comments

@shikasta-net
Copy link

shikasta-net commented Aug 21, 2022

I have been trying to get DLNA working with a docker container (happy to share more on this as it's not trivial to get the networking right).
While debugging I found:

(log.lib) -> [Error] Non-static method XMLReader::XML() should not be called statically in file /var/www/src/Module/Api/Upnp_Api.php(297)
(log.lib) -> [Runtime Error] XMLReader::read(): Load Data before trying to read in file /var/www/src/Module/Api/Upnp_Api.php(302)

This is related to

public static function parseUPnPRequest($prmRequest)
    {
        $retArr = array();
        $reader = new XMLReader();
        $result = XMLReader::XML($prmRequest);

XMLReader is not static until PHP 8. I've tried using the instance instead of static call; the error is fixed but I'm still getting no listings on the client, so I'll give the updated PHP version a try. When I change the line to $result = $reader->XML($prmRequest); everything works, so the container just needs upgrading to PHP8.

@shikasta-net
Copy link
Author

I tried building my own image from the Dockerfile so I can try updating it to php8 but it stalls around dpkg-reconfigure libdvd-pkg with exit code 2.

@shikasta-net shikasta-net changed the title Upnp script error with XMLReader / PHP version PHP version upgrade / Upnp script error with XMLReader Aug 29, 2022
@lachlan-00
Copy link
Member

i'm going to update docker to php8.1 now as 7.4 is on the way out soon

@lachlan-00
Copy link
Member

also, here are the docker examples. i'll probably include that in the docker repo too
https://github.com/ampache/ampache/tree/develop/docker

@lachlan-00
Copy link
Member

All docker tags are php8.1 now

@shikasta-net
Copy link
Author

Thanks, I've been giving it a try but run into the issue in #90.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants