You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting a 405 error when executing this script. The error I get is:
bash-5.1# php restore.php --url=https://xxxxx/owncloud --username="test.user" --password="xxxxx" --date="2022-05-24"
Deprecated: Return type of Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /app/vendor/symfony/console/Helper/HelperSet.php on line 94
Collection files to restore
Found 1 files to restore
ERROR: The requested URL returned error: 405
File ownCloud Manual.pdf restored
I think the deprecated warning can be ignored. What is strange here is that it is correctly identifying the number of files to restore. So the communication seems to be working to some extent.
Any idea on what goes wrong here.
I am using PHP8.1. Our owncloud server is 10.9.1 (stable).
Any help would be appreciated.
Thanks,
Liam
The text was updated successfully, but these errors were encountered:
The issue seems to be that the restore URL is being computed incorrectly.
The value of $trashbinRecord['remoteUrl'] in the function restoreTrashbinData starts with "owncloud" (at least in our setup).
The URL we provide to the script is: https://mydomain.com/owncloud
The value of $trashbinRecord['remoteUrl'] ends up being /owncloud/remote.php/dav/trash-bin/test.user/6542166 which is then combined with $this->URI to form https://mydomain.com/owncloud/owncloud/remote.php/dav/trash-bin/test.user/6542166 (Line 103 of lib/RestoreTrash.php).
I guess the issue is that this script expects ownCloud to be available at the root of the domain. Not sure exactly.
liamoreilly
changed the title
405 Error
405 Error - Related to ownCloud URL being located in directory off a URL
May 28, 2022
liamoreilly
changed the title
405 Error - Related to ownCloud URL being located in directory off a URL
405 Error - Related to ownCloud being hosted on URL with a directory
May 28, 2022
Hi,
I am getting a 405 error when executing this script. The error I get is:
I think the deprecated warning can be ignored. What is strange here is that it is correctly identifying the number of files to restore. So the communication seems to be working to some extent.
Any idea on what goes wrong here.
I am using PHP8.1. Our owncloud server is 10.9.1 (stable).
Any help would be appreciated.
Thanks,
Liam
The text was updated successfully, but these errors were encountered: