MySQL Forums
Forum List  »  PHP

mysqli constructor returns object with null members
Posted by: Matt Aikens
Date: April 20, 2012 12:49AM

I am attempting to create a connection to mysql using the following bit of code:

$conn = new mysqli('localhost', 'user', 'pass', 'test');

An object is returned, but all the members of it are null (including connect_error and connect_errno).

I'm guessing this is a config problem, but not sure where to start looking. Anyone have any idea what this could be?

Apache v 2.2.17
PHP v 5.3.4
MySQL v 5.1.53

Options: ReplyQuote


Subject
Written By
Posted
mysqli constructor returns object with null members
April 20, 2012 12:49AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.