LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-10-2007, 10:13 PM   #1
Splenden
Member
 
Registered: Jan 2007
Posts: 32

Rep: Reputation: 15
PHP - mysqli_connect doesn't exist but mysqli is enabled?


Hi,

I apologize for asking so many questions on this board. Hopefully soon I can gain a little knowledge and start helping others :-)

I have PHP 5 (latest version available as of today) set up 5.2.0 set up with Apache 2.2. I'm trying to install something which requires MySQL support, but it says there is no MySQLi support, and I compiled with MySQLi.

My phpinfo says the following:

MysqlI Support enabled
Client API library version 4.1.13
Client API header version 4.1.13
MYSQLI_SOCKET /var/lib/mysql/mysql.sock

Directive Local Value Master Value
mysqli.default_host no value no value
mysqli.default_port 3306 3306
mysqli.default_pw no value no value
mysqli.default_socket no value no value
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.reconnect Off Off

But, for some reason, the mysqli_connect function does not exist.

Thanks!

Splenden
 
Old 01-12-2007, 11:31 AM   #2
Splenden
Member
 
Registered: Jan 2007
Posts: 32

Original Poster
Rep: Reputation: 15
I was able to fix this myself. In case someone else has the issue, here's the answer:

For some reason, when I installed PHP with MySQL, the php.ini didn't load the extension mysqli.so. I recompiled everything by that time with mysql and mysqli, plus a bit more. So I added "extension mysqli.so" (without the quotes) on its own line to the php.ini file and all was fine.
 
Old 04-23-2012, 10:39 PM   #3
yifangt
LQ Newbie
 
Registered: Dec 2010
Posts: 7

Rep: Reputation: 0
mysqli_connect not found

It seems the "mysqli_connect()" function is not there or not working properly. When change
Code:
mysqli_connect("localhost", "username", "password", "database")
to
Code:
mysqli("localhost", "username", "password", "database")
then it is working fine. Can anybody explain?
Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysqli installation error for php5 @unstable janus_tr Debian 3 08-25-2006 05:52 PM
LXer: Performing Basic Tasks with MySQL 4.1 and Above, using mysqli with ... LXer Syndicated Linux News 0 07-02-2006 09:33 PM
Problems compiling php with xml enabled bullshit Linux - Newbie 2 05-07-2004 06:39 PM
uploading to a windows iis5.0 php enabled server antken Programming 1 03-15-2003 06:50 AM
RH8/Apache - PHP installed but not enabled(?) bkeating Linux - Software 3 12-05-2002 12:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration