Details
-
Task
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
-
1
Description
Running the sample code in https://github.com/osfameron/docs-sdk-php/blob/doc-7888-rbac/modules/howtos/examples/collection-manager.php
Gives the following output, which I'm reading as:
1) the createCollection command is failing, but giving a JSON warning
2) as it's failed, the subsequent attempt to drop it fails.
PHP Warning: Module "couchbase" is already loaded in Unknown on line 0Warning: Module "couchbase" is already loaded in Unknown on line 0 |
scopeAdmin
|
create-collection-manager
|
create-scope
|
create-collection
|
[cb,WARN] (pcbc/http L:50) Failed to decode value as JSON: json_last_error=4. I=0x7fd421c12520 |
drop-collection
|
PHP Fatal error: Uncaught Couchbase\HttpException: _: Collection with name "example-collection" in scope "example-scope" is not found in /Users/hakimcassimally/couchbase/docs-sdk-php/modules/howtos/examples/collection-manager.php:66 |
Stack trace:
|
#0 /Users/hakimcassimally/couchbase/docs-sdk-php/modules/howtos/examples/collection-manager.php(66): Couchbase\CollectionManager->dropCollection(Object(Couchbase\CollectionSpec)) |
#1 /Users/hakimcassimally/couchbase/docs-sdk-php/modules/howtos/examples/collection-manager.php(75): main() |
#2 {main} |
thrown in /Users/hakimcassimally/couchbase/docs-sdk-php/modules/howtos/examples/collection-manager.php on line 66Fatal error: Uncaught Couchbase\HttpException: _: Collection with name "example-collection" in scope "example-scope" is not found in /Users/hakimcassimally/couchbase/docs-sdk-php/modules/howtos/examples/collection-manager.php:66 |
Stack trace:
|
#0 /Users/hakimcassimally/couchbase/docs-sdk-php/modules/howtos/examples/collection-manager.php(66): Couchbase\CollectionManager->dropCollection(Object(Couchbase\CollectionSpec)) |
#1 /Users/hakimcassimally/couchbase/docs-sdk-php/modules/howtos/examples/collection-manager.php(75): main() |
#2 {main} |
thrown in /Users/hakimcassimally/couchbase/docs-sdk-php/modules/howtos/examples/collection-manager.php on line 66 |
This is with SDK version 3.1.2. against Enterprise Edition 7.0.0 build 5247
(With previous version 3.0.5 I was getting warnings in between every call relating to create/drop scope/collection but no errors)