Jump to content


Photo

miss configured where is mysqli


  • Please log in to reply
4 replies to this topic

#1 kdthiele

kdthiele
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 24 April 2006 - 07:30 PM

Running php5.1.2 with Apache 2.0 Handler with MySQL 4.1.13 on SUSE 10.

I can run php with mySQL connect and query database via procedure calls but not by object. I get this error:

Fatal error: Class 'mysqli' not found in /usr/local/apache2/htdocs/results.php on line 31

I must have left something out in the configuration?????????? I have been looking in the docs but have not found my answer.

Anyone have the answer?

Thanks much.

kdthiele@nc.rr.com

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 24 April 2006 - 07:42 PM

Of you want to use mysqli specified functions you will need to configure PHP to use the mysli extension rather than the mysql extension.

#3 kdthiele

kdthiele
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 25 April 2006 - 12:11 AM

[!--quoteo(post=368113:date=Apr 24 2006, 02:42 PM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Apr 24 2006, 02:42 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Of you want to use mysqli specified functions you will need to configure PHP to use the mysli extension rather than the mysql extension.
[/quote]

Ok, but how do I do that? If I include mysqli extension and remove mysql extension will both work???

BTW thanks so far.

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 25 April 2006 - 08:36 AM

I believe you will have to recomile PHP5 to use to the mysqli extension rather than using a pre-packaged rpm unless there is one already available. If you want to see how to recomile PHP you might want to look at [a href=\"http://tedi.heriyanto.net/papers/html-php5-suse.html\" target=\"_blank\"]this[/a], however thats for 9.2 Pro

If you enable mysqli but no mysql then you will only be able to use mysqli functions and not any mysql functions. If you want to use both mysqli functions and mysql functions you will want to enable both extensions.

#5 kdthiele

kdthiele
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 25 April 2006 - 06:11 PM

[!--quoteo(post=368323:date=Apr 25 2006, 03:36 AM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Apr 25 2006, 03:36 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
I believe you will have to recomile PHP5 to use to the mysqli extension rather than using a pre-packaged rpm unless there is one already available. If you want to see how to recomile PHP you might want to look at [a href=\"http://tedi.heriyanto.net/papers/html-php5-suse.html\" target=\"_blank\"]this[/a], however thats for 9.2 Pro

If you enable mysqli but no mysql then you will only be able to use mysqli functions and not any mysql functions. If you want to use both mysqli functions and mysql functions you will want to enable both extensions.
[/quote]


Thanks much!! thanks for the links too. I will give it a try.

I am still a bit confused on the terminology of client library. Sorry I am being so dense,

"If you would like to install the mysql extension along with the mysqli extension you have to use the same client library to avoid any conflicts."





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users