You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHP Fatal error: Uncaught Error: Call to a member function write() on null in /code/vendor/tbolier/php-rethink-ql/src/Connection/Connection.php:257
#76
Closed
factormaarten opened this issue
Nov 19, 2018
· 4 comments
The table exists, the stream is created and connected in socket, however I still get the following:
PHP Fatal error: Uncaught Error: Call to a member function write() on null in /code/vendor/tbolier/php-rethink-ql/src/Connection/Connection.php:257
Stack trace:
#0 /code/vendor/tbolier/php-rethink-ql/src/Connection/Connection.php(163): TBolier\RethinkQL\Connection\Connection->writeQuery(588962815, Object(TBolier\RethinkQL\Message\Message))
#1 /code/vendor/tbolier/php-rethink-ql/src/Query/AbstractQuery.php(32): TBolier\RethinkQL\Connection\Connection->run(Object(TBolier\RethinkQL\Message\Message))
#2 /code/bin/OrderBook.php(33): TBolier\RethinkQL\Query\AbstractQuery->run()
#3 {main}
thrown in /code/vendor/tbolier/php-rethink-ql/src/Connection/Connection.php on line 257
The text was updated successfully, but these errors were encountered:
factormaarten
changed the title
How can I test my connection?
PHP Fatal error: Uncaught Error: Call to a member function write() on null in /code/vendor/tbolier/php-rethink-ql/src/Connection/Connection.php:257
Nov 19, 2018
Before you execute the query, please execute $r->connection()->connect();
The fatal error that caused your error is related to not having connected first, so there is no open stream.
I have updated the code, to throw a proper ConnectionException in that case. I've also updated the documentation which was missing the $r->connection()->connect(); reference.
Thanks for reporting this.
You can immediately fix your issue with your current version of the library by connecting first.
Hi there,
I'm testing my code on vagrant instances. Now I have Rethink running on one vm, and my code on another vm.
The db is up and running and I can access it via my browser. However inside of the code nothing happens when I run:
The table exists, the stream is created and connected in socket, however I still get the following:
The text was updated successfully, but these errors were encountered: