1、web3.php Error: The method personal_newAccount does not exist/is not available
只需要在geth启动时的rpc参数中设置rpcapi时包括 “personal” 即可。
geth --rpc --rpcaddr 0.0.0.0 --rpcport 8545 --rpcapi eth,web3,admin,personal,net
2、web3.eth.sendTransaction调用报错“Error: authentication needed: password or unlock”
只需要将from账户解锁即可:web3.personal.unlockAccount(web3.eth.accounts[0],"你的密码");