Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/288.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php OrientDB-无法从套接字读取_Php_Server_Orientdb_Graph Databases - Fatal编程技术网

Php OrientDB-无法从套接字读取

Php OrientDB-无法从套接字读取,php,server,orientdb,graph-databases,Php,Server,Orientdb,Graph Databases,我现在想使用OrientDB在服务器上存储一些数据,即localhost。使用来自的官方图书馆。 但是,在尝试连接时,我收到以下失败消息: Fatal error: Uncaught exception 'PhpOrient\Exceptions\SocketException' with message 'socket_read(): unable to read from socket [104]: Connection reset by peer' in /Library/WebSer

我现在想使用OrientDB在服务器上存储一些数据,即localhost。使用来自的官方图书馆。 但是,在尝试连接时,我收到以下失败消息:

Fatal error: Uncaught exception 'PhpOrient\Exceptions\SocketException' with message 
'socket_read(): unable to read from socket [104]: Connection reset by peer' in 
/Library/WebServer/Documents/T1/vendor/ostico/phporient/src/PhpOrient/Protocols/Binary/OrientSocket.php on line 147
有什么不对劲?我可以连接并进入localhost:2480上的OrientDB Studio,但这里似乎出了问题

<?php 
require "../vendor/autoload.php";
use PhpOrient\PhpOrient;

$client = new PhpOrient( 'localhost', 2480 );
$client->connect('root','pwd'); 
echo "1";
$client->dbList();
?>

请尝试使用以下代码进行连接:

<?php
require "../vendor/autoload.php";
use PhpOrient\PhpOrient;
$client = new PhpOrient();
$client->hostname = 'localhost';
$client->port     = 2424;
$client->username = 'root';
$client->password = 'pwd';
$client->connect();
echo "DB list: <br /><br /> ";
echo '<pre>'; print_r($client->dbList()); echo '</pre>';
echo "<br /> <br /> DB Listed above successfully!";
?> 
您应该使用2424端口。
希望有帮助。

尝试使用以下代码连接:

<?php
require "../vendor/autoload.php";
use PhpOrient\PhpOrient;
$client = new PhpOrient();
$client->hostname = 'localhost';
$client->port     = 2424;
$client->username = 'root';
$client->password = 'pwd';
$client->connect();
echo "DB list: <br /><br /> ";
echo '<pre>'; print_r($client->dbList()); echo '</pre>';
echo "<br /> <br /> DB Listed above successfully!";
?> 
您应该使用2424端口。
希望对您有所帮助。

如果答案对您有效,您应该单击旁边的复选标记将其标记为已接受答案。如果答案对您有效,您应该单击旁边的复选标记将其标记为已接受答案。