mysql configuration for php

how to configure mysql for php

Page 1 of 1

9 Replies - 2265 Views - Last Post: 12 December 2008 - 08:11 AM Rate Topic: -----

#1 prashu25  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 21-April 06

mysql configuration for php

Posted 21 April 2006 - 10:19 PM

hi i am not able to configure mysql to be used in mysql

what are the steps to do to configure mysql to be used in php in Windows XP Operating System..

can somebody help me plz....
Is This A Good Question/Topic? 0
  • +

Replies To: mysql configuration for php

#2 snoj  Icon User is offline

  • Married Life
  • member icon

Reputation: 84
  • View blog
  • Posts: 3,564
  • Joined: 31-March 03

Re: mysql configuration for php

Posted 21 April 2006 - 11:01 PM

What version of Mysql are you using?

Really all I do is copy the libmysql.dll to either the Windows, System, or System32 directory (I can't remember which one works), then uncomment the line in the php.ini file that contains "extension=php_mysql.dll", and then restart Apache.
Was This Post Helpful? 0
  • +
  • -

#3 prashu25  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 21-April 06

Re: mysql configuration for php

Posted 22 April 2006 - 03:30 AM

Hi thanx a lot for replying to my question i was really suprised by this fast reply.

well i am using MYSQL mysql-essential-4.1.18-win32.msi

i followd u steps..

copied the libmysql.dll to System and System32...
and even uncommented "extension=php_mysql.dll" in php.ini file

but still i am getting this error


Fatal error: Call to undefined function mysql_connect()
Was This Post Helpful? 0
  • +
  • -

#4 mattman059  Icon User is offline

  • Epic Awesomeness
  • member icon

Reputation: 15
  • View blog
  • Posts: 538
  • Joined: 23-October 06

Re: mysql configuration for php

Posted 09 December 2008 - 10:37 PM

I realize this has been dead for a long @$$ time..but Im having the same problem, im not sure what is going wrong exactly :P and as always i come to <D.I.C />..most other websites are far too confusing. So ive copied the libmysql.dll into my windows\system folder (i'm using vista btw..i dont know if that matters) and uncommented the extension=php_mysql.dll in the php.ini folder.

Still getting the error. Thanks.


note:
when i load up a file with phpinfo() there is no entry anywhere for mysql?
using php5.2.7 and apache 2.2.9

This post has been edited by mattman059: 09 December 2008 - 10:41 PM

Was This Post Helpful? 0
  • +
  • -

#5 msvp4u  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 64
  • Joined: 15-July 08

Re: mysql configuration for php

Posted 10 December 2008 - 02:08 AM

check whether mysql is installed along with php and check using phpinfo();

look in for mysql in phpinfo page and check for its status

Attached File(s)


Was This Post Helpful? 0
  • +
  • -

#6 Findarato  Icon User is offline

  • New D.I.C Head

Reputation: 5
  • View blog
  • Posts: 35
  • Joined: 11-November 08

Re: mysql configuration for php

Posted 10 December 2008 - 04:54 AM

Simply install easyphp (easyphp.org) and it works out of the box :)
Was This Post Helpful? 0
  • +
  • -

#7 mattman059  Icon User is offline

  • Epic Awesomeness
  • member icon

Reputation: 15
  • View blog
  • Posts: 538
  • Joined: 23-October 06

Re: mysql configuration for php

Posted 10 December 2008 - 08:39 AM

@msvp4u : Already done that -see my "note"

@findarato: ...I would prefer not have to uninstall my php..and by "works out of the box" do you mean PHP or mySQL because my problem is with mySQL
Was This Post Helpful? 0
  • +
  • -

#8 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6081
  • View blog
  • Posts: 23,557
  • Joined: 23-August 08

Re: mysql configuration for php

Posted 10 December 2008 - 11:12 AM

You usually need to restart your webserver after un-commenting the mysql line.

WampServer is a nicely integrated Apache, MySQL, PHP package for Windows.
Was This Post Helpful? 0
  • +
  • -

#9 mattman059  Icon User is offline

  • Epic Awesomeness
  • member icon

Reputation: 15
  • View blog
  • Posts: 538
  • Joined: 23-October 06

Re: mysql configuration for php

Posted 10 December 2008 - 05:40 PM

Ive gotten the mySQL to work within PHP now (all i had to do was copy the libmysql.dll from the mysql bin into the apache bin..something i didnt read about anywhere else. everyone mentioned the windows directory)

Now i have the problem of the web server crashing when i query multiple records for example:

while ($row = mysql_fetch_assoc($result))
{
	  echo $row["userid"];

//	echo $row["fullname"];   Commented out this row
//	echo $row["userstatus"]; Commented out this row
}




This works, it returns the userid's that I want

but this on the other hand:

while ($row = mysql_fetch_assoc($result))
{
	echo $row["userid"];
	echo $row["fullname"];
//	echo $row["userstatus"]; Commented out  this line
}



crashes the server.


EDIT: If it helps any, windows reports that php5ts.dll is the fault module
: I've been trying it some more, and now even one query crashes apache....
Any ideas?


ps. thanks for all your help so far, im just learning on my own how this all works for a project coming up in the spring so all help is appreciated.

Im leaning away from kits like wampp i've tried it before and was not impressed. Something about installing and configuring it myself makes me feel good haha.

This post has been edited by mattman059: 11 December 2008 - 05:45 PM

Was This Post Helpful? 0
  • +
  • -

#10 mattman059  Icon User is offline

  • Epic Awesomeness
  • member icon

Reputation: 15
  • View blog
  • Posts: 538
  • Joined: 23-October 06

Re: mysql configuration for php

Posted 12 December 2008 - 08:11 AM

I've been working on it some more and It seems to be having trouble stepping through the "mysql_fetch_assoc($result)" part..I've tried For loops, Foreach loops, While loops..and everytime it crashes, but if i just echo each row once it works....very odd..is there some kind of bounds checking or something that i need to do?


EDIT: This includes things like count() which also crashes. So im thinking its has something to do with iteration?

This post has been edited by mattman059: 12 December 2008 - 08:16 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1