mysql "imporved" function don't work

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
mjmacarty
Forum Commoner
Posts: 37
Joined: Tue Feb 21, 2006 3:20 pm

mysql "imporved" function don't work

Post by mjmacarty »

I am running php 5.1.2, and I can't get any of the mysql improved functions to work, i.e. mysqli().

Is there an extension that needs to be "turned on" in the php.ini file? Thanks for any help.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: mysql "imporved" function don't work

Post by Chris Corbyn »

mjmacarty wrote:I am running php 5.1.2, and I can't get any of the mysql improved functions to work, i.e. mysqli().

Is there an extension that needs to be "turned on" in the php.ini file? Thanks for any help.
Is this linux or windows? Did you compile from source or install a binary?

If you compiled from source you should ensure you add --with-mysqli=/path/to/mysql at ./configure since PHP5 doesn't do it by default.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: mysql "imporved" function don't work

Post by RobertGonzalez »

mjmacarty wrote:I am running php 5.1.2, and I can't get any of the mysql improved functions to work, i.e. mysqli().

Is there an extension that needs to be "turned on" in the php.ini file? Thanks for any help.
I think you can uncomment the mysqli line in php.ini...

Code: Select all

;remove the semicolon from behind the following line
;extension=php_mysqli.dll
mjmacarty
Forum Commoner
Posts: 37
Joined: Tue Feb 21, 2006 3:20 pm

Re: mysql "imporved" function don't work

Post by mjmacarty »

d11wtq wrote:
mjmacarty wrote:I am running php 5.1.2, and I can't get any of the mysql improved functions to work, i.e. mysqli().

Is there an extension that needs to be "turned on" in the php.ini file? Thanks for any help.
Is this linux or windows? Did you compile from source or install a binary?

If you compiled from source you should ensure you add --with-mysqli=/path/to/mysql at ./configure since PHP5 doesn't do it by default.

Does this need to be added to the path in Windows too?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Windows would follow Everah's post. If you don't have the DLL, download the zip version of PHP. It's in there.
mjmacarty
Forum Commoner
Posts: 37
Joined: Tue Feb 21, 2006 3:20 pm

Post by mjmacarty »

Thanks all. I made it work. Didn't need to add anything to the path, but my php.ini file did not have the extension line for php_mysqli.dll

Is that weird?
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

Which version of PHP do you have?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Oren wrote:Which version of PHP do you have?
mjmacarty wrote:I am running php 5.1.2
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

Well... Sorry about that. I've read your post but I replied to it latter on - after the guys had already helped you, and by then I already forgot that you mentioned the PHP version. Sorry.
Post Reply