Using MYSqli in PHP

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Mickey400z
Forum Newbie
Posts: 3
Joined: Sat Dec 05, 2009 9:48 am

Using MYSqli in PHP

Post by Mickey400z »

Hello there,

I'm not sure if this is a configuration issue or not. I'm using PHP 4.3.11 and MySQL 5.0 on a godaddy shared hosting server. I've just recently started learning PHP and have been working along with a book I purchased. They show the MySQL functions using the mySQLi format. It doesn't seem that either my PHP server or mySQL is recognizing these functions. I figured how to use the mySQL_query commands and what not, but the mySQLi format looks soooo much easier.

Any suggestions?
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Using MYSqli in PHP

Post by Eran »

probably the mysqli extension is not loaded. run phpinfo() and check the output to see if it's loaded - if not, activate it in your php.ini file
Mickey400z
Forum Newbie
Posts: 3
Joined: Sat Dec 05, 2009 9:48 am

Re: Using MYSqli in PHP

Post by Mickey400z »

I'm assuming it isn't. I ran a phpinfo() script and disn't see anything that would show that it was. Not really sure what I'm looking for though. What's the command to enable it?
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Using MYSqli in PHP

Post by Eran »

activate it in your php.ini file
In your PHP configuration file, usually php.ini, you would find the directives that enable modules. you need to make sure mysqli is also there and its uncommented
Mickey400z
Forum Newbie
Posts: 3
Joined: Sat Dec 05, 2009 9:48 am

Re: Using MYSqli in PHP

Post by Mickey400z »

This is what it looks like:

register_globals = off
allow_url_fopen = off

expose_php = Off
max_input_time = 60
variables_order = "EGPCS"
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12
SMTP = relay-hosting.secureserver.net
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="

[Zend]
zend_extension=/usr/local/zo/ZendExtensionManager.so
zend_extension=/usr/local/zo/4_3/ZendOptimizer.so
Post Reply