neo4j graphaware php-client: class not found - php

When I tray to access my neo4j-DB via Graphaware's php-client using http-protocol, I get the following error message:
Fatal error: Class 'GraphAware\Common\Result\AbstractRecordCursor' not found in ...
On the other hand when I'm using the bolt-protocol t says:
Fatal error: Uncaught Error: Call to undefined method GraphAware\Bolt\Result\Result::getResult() in...
At the beginning of my code I have used
require_once 'vendor/autoload.php';
use GraphAware\Neo4j\Client\ClientBuilder;
so I thought the classes should be autoloaded which is obviously not the case.
What's wrong?

I have solved this issue by replacing the respective syntax for queries of the example-files by one out of the README.

Related

How to Bulk Delete in PHP-OpenCloud/OpenStack

I've got a problem iam currently building a php backend with connect to an OVH object storage
and I would like to make a bulk delete using the php-opencloud sdk
According to the documentation there is a function named batchDelete() or bulkDelete() which does exactly what i am searching for but when I call it, php throw an error saying the called method does not exist (I have seen in the GitHub that batchDelete is deprecated and we should use instead bulkDelete but none of them work)
$openstack
->objectStoreV1()
->batchDelete($list);
Fatal error: Uncaught RuntimeException: OpenStack\ObjectStore\v1\Service::batchDelete is not defined
OR
$openstack
->objectStoreV1()
->bulkDelete($list);
Fatal error: Uncaught RuntimeException: OpenStack\ObjectStore\v1\Service::bulkDelete is not defined
Could someone help me please ?

php Uncaught Error: Class 'BitWasp\Bitcoin\Key\PrivateKeyFactory' not found

im trying to add a library to my php. I already downloaded all the files from composer but a fatal error happended. here is my code :
require_once('vendor/autoload.php');
use BitWasp\Bitcoin\Bitcoin;
use BitWasp\Bitcoin\Address\AddressCreator;
use BitWasp\Bitcoin\Key\PrivateKeyFactory;
use BitWasp\Bitcoin\Key\KeyToScript\Factory\P2pkhScriptDataFactory;
//Rest of my code
ERROR 1 -> Uncaught Error: Class 'BitWasp\Bitcoin\Key\PrivateKeyFactory' not found
ERROR 2 -> Class 'BitWasp\Bitcoin\Key\PrivateKeyFactory' not found
Shouldn't that namespace be BitWasp\Bitcoin\Key\Factory\PrivateKeyFactory?
See here https://github.com/Bit-Wasp/bitcoin-php/blob/1.0/src/Key/Factory/PrivateKeyFactory.php#L5

undefined class constant METH_GET

I have the following php code:
#!/usr/bin/php -q
<?php
require_once 'HttpRequest.php';
$r = new HttpRequest("http://192.168.0.223:8080/dsrmap/msfleet.php", HttpRequest::METH_GET);
//$r_test = new HttpRequest("http://192.168.0.223:8080/dsrmap/msfleet-test.php", HttpRequest::METH_GET);
$r_test = new HttpRequest("http://192.168.0.223:8080/dsrmap/msfleet-dev.php", HttpRequest::METH_GET);
when I run this I get the message:
PHP Fatal error: Undefined class constant 'METH_GET' in /home/jsnyder/jsonmaker/map.php
Fatal error: Undefined class constant 'METH_GET' in /home/jsnyder/jsonmaker/map.php
do you know what is causing this error. I had to manually download a HttpRequest and put it in the directory that this program is in because I got the error:
PHP Fatal error: Class 'HttpRequest' not found in /home/jsnyder/jsonmaker/map.php
Based on the information I gave can you help me resolve this issue? How am I supposed to install HttpRequest so I can use this in my code?
Thank you for your help
had to manually download a HttpRequest and put it in the directory that this program is in because I got the error:
That sounds to me like you downloaded a random class with the same name somewhere and crossed your fingers it would work.
It's likely you simply have the picked the wrong library.

Fatal error: Class 'phpseclib\Crypt\Base'

Getting this Error in php encription what to do please help
Fatal error: Class 'phpseclib\Crypt\Base' not found in /usr/share/php/phpseclib/Crypt/DES.php on line 55
Are you using the master branch of phpseclib? If so you need to use an autoloader. eg. https://raw.githubusercontent.com/composer/composer/master/src/Composer/Autoload/ClassLoader.php

PHP Fatal error: Class 'Swift_Validate' not found

I am trying to use Swift_Validate::email($email) and I get a php error: PHP Fatal error: Class 'Swift_Validate' not found.
I have the latest version of swiftmailer. Is there some preference settings I need to do?
I have tried including the Validate.php file, but then I get the error: PHP Fatal error: Class 'Swift_DependencyContainer' not found.
I include DependencyContainer.php and I get the error PHP Fatal error: Class 'Swift_DependencyException' not found.
I include DependencyException.php and I get the error: Class 'Swift_SwiftException' not found.
I include SwiftException.php and I still get the same error.
I think I must not have the preferences set up correctly. I am calling:
"require_once($dir.'/swift/swift_required.php');"
The code I am using for the validation is:
if (!Swift_Validate::email($email))
{ $error = true; }
Any help would be greatly appreciated. Using latest Apache and PHP.
Try require_once dirname( __FILE__) . '/lib/swift_required.php'; to use the built-in autoloader, where lib is subfolder of folder where is the current file ( for default directory structure of the library )

Categories