installing mysqli

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
loveccb
Forum Newbie
Posts: 10
Joined: Wed Jul 05, 2006 6:48 pm

installing mysqli

Post by loveccb »

I've successfully installed php5 and mysqli on my home system, but I'm having trouble getting it to work on a dedicated box with an ISP. They've installed php5 but this piece of code always returns "MySQLi is not installed...

Code: Select all

if(function_exists("mysqli_connect")) { 
   echo "MySQLi is installed!"; 
} else { 
   echo "MySQLi is not installed..."; 
}
I can ssh into the box but I'm very noobie with this environment. Any suggestions as what to check? Links to sites? Anything?

Many thanks!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Unless they gave you control over php.ini (and possibly allow you to build) they'll need to install MySQLi too.
loveccb
Forum Newbie
Posts: 10
Joined: Wed Jul 05, 2006 6:48 pm

Post by loveccb »

Thanks for the response. Yes, I have control over the php.ini. I'm just not sure on how to proceed from here!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

If mysqli's php extensions are built, on the server, and placed in the extension directory, all you have to do is add the appropriate line to the extension section of php.ini .. and restart the web server.

If it's not built and you don't have access to a built version, you'll need to build it.

http://php.net/ref.mysqli#mysqli.installation
loveccb
Forum Newbie
Posts: 10
Joined: Wed Jul 05, 2006 6:48 pm

Post by loveccb »

Thanks for the reply feyd. When I peak in the directory usr/lib/php5 I only see these files:

gd.so
imap.so
ldap.so
mbstring.so
mysql.so
ncurses.so
odbc.so
snmp.so
xmlrpc.so

Can I assume from this that I don't have mysqli installed? I'm wondering is there a way to add the extension for mysqli manually or do I have to recompile php 5?

Thanks again.
Post Reply