php-lxd icon indicating copy to clipboard operation
php-lxd copied to clipboard

Logs endpoint error

Open piferrari opened this issue 4 years ago • 3 comments

Hi,

In Containers.php (line 504) and Containers/Logs.php (line 26) you have two time the same error:

        foreach ($this->get($this->getEndpoint().$name.'/logs/') as $log) {
            $logs[] = str_replace(
                '/'.$this->client->getApiVersion().'/containers/'.$name.'/logs/',
                '',
                $log
            );
        }

You must replace /containers/ by /instances/

Best Regards

PiF

piferrari avatar Jun 02 '21 06:06 piferrari

In my memory we do something like this:$r = $ldx->execute(....);if($r['return'] !== 0)   $whoami=$r['stdout'];Best Regards.piferrari

piferrari avatar May 13 '22 16:05 piferrari

Well this is somewhat of a dupe of https://github.com/ashleyhood/php-lxd/issues/34 as switching /containers/ to /instances/ fixes it.

@ashleyhood Do you have an interest in maintaining this project still? I could send a PR if so.

It's been broken for VMs for some time and a fork has popped up - https://github.com/turtle0x1/php-lxd

(I also forked it with just the VM fixes so far)

C0rn3j avatar Nov 19 '23 22:11 C0rn3j

Thanks @C0rn3j for you r offer of a PR but I don't use this library anymore and so don't have time to work on it.

ashleyhood avatar Nov 20 '23 15:11 ashleyhood