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

Unknown payload type issue #22

Closed
odiel opened this issue May 5, 2015 · 1 comment
Closed

Unknown payload type issue #22

odiel opened this issue May 5, 2015 · 1 comment
Labels

Comments

@odiel
Copy link

odiel commented May 5, 2015

Hi

I'm not sure which one is the most active repo this one or orientechnologies/PhpOrient, so I'm posting this issue here as well.

I'm having a piece of code that generates Clusters on the fly, depending on the client performing the request.

For this, the first thing I do, is to perform an Insert:

$query = 'INSERT INTO Event CLUSTER '.$clusterName.' CONTENT '.json_encode($event);
$orientDBClient->command($query);

if the commands raises an exception, then I proceed to check if the cluster exists or not, then create the cluster and attach it to the class and as final step, attempt to insert the content once again

$db = $orientDBClient->dbReload();

if (null == $db->getClusterID($clusterName)) {
   $command = 'CREATE CLUSTER '.$clusterName;
   $orientDBClient->command($command);
   $command = 'ALTER CLASS Event ADDCLUSTER '.$clusterName;
   $orientDBClient->command($command);
   $query = 'INSERT INTO Event CLUSTER '.$clusterName.' CONTENT '.json_encode($event);
   $orientDBClient->command($query);
}

The issue comes with the last command execution getting exceptions like these:

PhpOrient\Exceptions\PhpOrientException: Unknown payload type ▒ in .../ostico/phporient/src/PhpOrient/Protocols/Binary/Abstracts/Operation.php on line 577

PhpOrient\Exceptions\PhpOrientException: Unknown payload type  in .../ostico/phporient/src/PhpOrient/Protocols/Binary/Abstracts/Operation.php on line 577

PhpOrient\Exceptions\PhpOrientException: Unknown payload type % in ..../ostico/phporient/src/PhpOrient/Protocols/Binary/Abstracts/Operation.php on line 577 

Notice that the character after '...payload type' is different for the exact same code.

The last record insert attempt is actually having place, creating the record in the db.

I'm using version 1.1.7

@Ostico
Copy link
Owner

Ostico commented May 5, 2015

Hi @odiel ,

the two repositories are always even. I'm working to unify them.

Thanks for reporting this bug.

@Ostico Ostico added the bug label May 5, 2015
Ostico added a commit that referenced this issue May 10, 2015
Ostico added a commit that referenced this issue May 10, 2015
Exception after command ALTER PROPERTY #7
Fatal error: Allowed memory... #25

Fixed
@Ostico Ostico closed this as completed May 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants