[PCBC-305] 2.0 Doc typo, wrong filename Created: 23/Oct/14  Updated: 23/Oct/14  Resolved: 23/Oct/14

Status: Resolved
Project: Couchbase PHP client library
Component/s: docs
Affects Version/s: None
Fix Version/s: None
Security Level: Public

Type: Bug Priority: Minor
Reporter: Ian McCloy Assignee: Brett Lawson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
http://docs.couchbase.com/developer/php-2.0/hello-couchbase.html

"Copy and paste the Hello Couchbase code into a file named hello-couchbase.php. ....
Execute the following command:
$ php hello-couchbase.js"


that should be
Execute the following command:
$ php hello-couchbase.php




[PCBC-306] 2.0 PHP SDK Doc Hello Couchbase Code HTML Formatting issue Created: 23/Oct/14  Updated: 23/Oct/14  Resolved: 23/Oct/14

Status: Resolved
Project: Couchbase PHP client library
Component/s: docs
Affects Version/s: None
Fix Version/s: None
Security Level: Public

Type: Bug Priority: Minor
Reporter: Ian McCloy Assignee: Brett Lawson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
http://docs.couchbase.com/developer/php-2.0/hello-couchbase.html

The code block for the example code isn't stopping at </codeblock> so is parsing the paragraph after incorrectly.

$result = $bucket->replace('aass_brewery-juleol', $doc);

var_dump($result);</codeblock>

<p>The console output should look similar to this:</p>




[PCBC-301] Get Json cause a crash Created: 10/Oct/14  Updated: 21/Oct/14  Resolved: 17/Oct/14

Status: Resolved
Project: Couchbase PHP client library
Component/s: None
Affects Version/s: 2.0.0
Fix Version/s: 2.0.1
Security Level: Public

Type: Bug Priority: Major
Reporter: jcoutin Assignee: Brett Lawson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Debian Apache 2.2.22, PHP Version 5.4.4
Couchbase 3.0 on debian


 Description   
I get a simple Json document from Couchbase and the web browser showing me the following error :

Notice: unserialize(): Error at offset 0 of 62 bytes in CouchbaseNative on line 388
Read var_dump: object(CouchbaseMetaDoc)#4 (4) { ["error"]=> NULL ["value"]=> bool(false) ["flags"]=> int(4) ["cas"]=> resource(2) of type (CAS) }


Json doc :
{
  "name": "steve",
  "town": "paris",
  "test": [
    3,
    45,
    "toto"
  ],
  "e": 5
}

php code :

$myCluster = new CouchbaseCluster('x.x.x.x');
$myBucket = $myCluster->openBucket('mybucket', 'mypw');
$res = $myBucket->get('6uB1oGclKO');
echo 'Read var_dump: ';
var_dump($res);


 Comments   
Comment by Brett Lawson [ 14/Oct/14 ]
Would you be able to provide more information about the data that is being stored? How are you storing it, what version of the SDK did you store it with, etc...
Cheers, Brett
Comment by jcoutin [ 15/Oct/14 ]
Hi Brett , you can close this issue.
As the PHP SDK is not stable enough ( https://www.couchbase.com/issues/browse/PCBC -300 ) , we stopped all our tests.
We await the next release.
 
Comment by Brett Lawson [ 16/Oct/14 ]
Hey JCoutin,

It looks like you're inserting your data as JSON, but specifying a flag identifying it as PHP serialized content. Do you have any insight on what may have caused this to occur?

Cheers, Brett
Comment by jcoutin [ 17/Oct/14 ]
I made a json_encode to load Json in CB.

$arr = array('name' => 'steve', 'town' => 'NY', 'test' => [3, 45, 'toto'], 'e' => 5);
$res = $myBucket->insert($key, json_encode($arr));

And then I could not get this doc.
Comment by Brett Lawson [ 17/Oct/14 ]
Hey jcoutin,

You may wish to try and use the code below. By using json_encode on the value prior to passing it to the library, you are preventing the library from accurately storing the values type for automatic decoding when retrieving values. I have additionally located and corrected a minor issue with regard to the management of types when storing purely string values, which will be available in the release in the beginning of November, or immediately if you wish to build from the source repository!

```php
$arr = array('name' => 'steve', 'town' => 'NY', 'test' => [3, 45, 'toto'], 'e' => 5);
$res = $myBucket->insert($key, $arr);
```

Cheers, Brett
Comment by jcoutin [ 21/Oct/14 ]
Hi Brett,

I will try your code.

Thank you

José




[PCBC-304] Append/prepend command do not support TTL Created: 20/Oct/14  Updated: 21/Oct/14

Status: Open
Project: Couchbase PHP client library
Component/s: library
Affects Version/s: 1.2.2
Fix Version/s: 2.0.1
Security Level: Public

Type: Task Priority: Major
Reporter: Patrick Varley Assignee: Brett Lawson
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates to
relates to PYCBC-261 Append and Prepend with TTL not suppo... In Progress
relates to JSCBC-155 Append/prepend command do not support... Resolved

 Description   
The underlying memcached binary protocol does not support TTL on prepend/append operations:

https://code.google.com/p/memcached/wiki/BinaryProtocolRevamped#Append,_Prepend

However the the SDK API suggests other wise:

http://www.couchbase.com/autodocs/couchbase-php-client-1.2.2/classes/Couchbase.html#method_append

We need to remove the TTL options from these commands:

append
prepend

This was 1st discovered in the Python SDK: PYCBC-261

 Comments   
Comment by Patrick Varley [ 21/Oct/14 ]
We should update the older docs/API and the release notes as a known issue.




Generated at Fri Oct 24 20:53:03 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.