Open katoyi120 opened 4 years ago
Same
cURL error 28: Operation timed out after 1000 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
use Web3\Providers\HttpProvider;
use Web3\RequestManagers\HttpRequestManager;
$timeout = 30;
$web3 = new Web3(new HttpProvider(new
HttpRequestManager('host', $timeout)));
resolved it
Also If you want to interact with a contract, you can set the timeout like this:
$timeout = 30;
$contract = new Contract( new HttpProvider(new HttpRequestManager('http://localhost:8545', $timeout)) , $abi);
Also If you want to interact with a contract, you can set the timeout like this:
$timeout = 30; $contract = new Contract( new HttpProvider(new HttpRequestManager('http://localhost:8545', $timeout)) , $abi);
this works for me, to connect to some ropsten just do this :
$contract = new Contract(new HttpProvider(new HttpRequestManager("https://ropsten.infura.io/v3/790551957e7d483a932d0b1a3f6e7xxx", $timeout)) , $abi);
When I create an account using the 'personal_newaccount' method, the blockchain is created successfully, but the page cannot get the address of the account. The error message is' connection timeout '.