Jump to content
Larry Ullman's Book Forums

Mysqli_Connect Error With Php5.5.11


Recommended Posts

Hello Larry,

 

firstly thank you for your book, I have beeing programming websites for a while and I had always stayed clear of e-commerce because I was scared of it, but  a client requested some new features and thanks of your book I am finally getting over this hurdle.

 

Anyway, I was playing around with the example in your books, everything was working fine (I was testing on may apache server that run php4.7) I wanted to implement the password hashing you suggest and so I decided to upgrade my php to the latest version (5.5.11). From then on the myscl.inc.php file crashes with the message Fatal error: Call to undefined function mysqli_connect().

By comparing the php info from my 4.7 version to the current one I sea that there is a whole table titled mysqli which is not present anymore. Does this mean that this function is not supported anymore?

I have searched around on the web but haven't been able to find anything relevant (on the contrary everybody seams to suggest myslqi_connect is the way to go)

 

your help is appreciated

 

greeting

K.

Link to comment
Share on other sites

Hallo HartleySan,

 

thank you for your speedy reply.

I looked at the php change log and I see no reason why mysqli_connect should not work, yet it does not.

I am positive it is not mispelled as the same file worked fine before upgrading the php (and it works still when I revert back to 4.7.3)

 

in case here is my code:

DEFINE ('DB_HOST', 'localhost');

... (I define all the other variables)...

$dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);

 

end the message is

Fatal error: Call to undefined function mysqli_connect() in C:\xampp\htdocs\ex1\ecommerce1\includes\mysql.inc.php on line 13

 

Any idea?

 

The only thing I noticed is that when I call phpinfo with version 4.7.3 I had a table titled mysqli and one titled mysqlnd that cited in the row API extension mysqli, whereas in the phpinfo for verion 5.5.11 the table mysqli is not there and in the table mysqlnd at the row API extenion it now says 'No Value', but I am at a loss to know what this all means

Should I maybe intall some additional library?

 

thanks again

k

Link to comment
Share on other sites

Perhaps the PHP 5.5 version you installed does not contain the MySQLi family of functions for some reason.

I can't imagine why, but maybe try installing PHP 5.5 from scratch again, and see what happens.

It definitely sounds like your installation is messed up.

Link to comment
Share on other sites

 Share

×
×
  • Create New...