Page 1 of 1

installing mysqli

Posted: Tue Nov 14, 2006 2:57 pm
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!

Posted: Tue Nov 14, 2006 3:16 pm
by feyd
Unless they gave you control over php.ini (and possibly allow you to build) they'll need to install MySQLi too.

Posted: Tue Nov 14, 2006 3:19 pm
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!

Posted: Tue Nov 14, 2006 3:23 pm
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

Posted: Tue Nov 14, 2006 4:23 pm
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.