יום חמישי, 23 באוקטובר 2014

quick mysqli dev tip

if you get the following error in
/var/log/nginx/error.log
/var/log/apache2/error.log

PHP Fatal error:  Call to a member function bind_param() on a non-object in /var/www/functions.php on line #



most chances are its due to a bad mysql query you are trying to bind your parameter to...

i wasted 2 hours figuring that out after changing a function to a procedure and forgetting to change the invocation to call instead of select :P

 update (nginx):

2014/11/12 11:09:51 [error] 1726#0: *33 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to a member function bind_param() on a non-object in /var/www/functions.php on line 96" while reading response header from upstream, client: 10.0.0.6, server: localhost, request: "POST zzz.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "10.0.0.126"

another bad query with an ambiguous error