Jump to content


Photo

Apache with PHP


  • This topic is locked This topic is locked
10 replies to this topic

#1 JP128

JP128
  • Members
  • PipPipPip
  • Advanced Member
  • 233 posts
  • LocationWisconsin

Posted 25 June 2006 - 10:38 PM

I get an error when I try to connect to a mysql db...

Fatal Error: Undefined function mysql_connect()


Anyone know how to fix that?
-----------------------------------------------------------------------
John Ensign - Age 16 - PHP Learner

My email is Johnny.Ensign@gmail.com

#2 adamwhiles

adamwhiles
  • Members
  • PipPipPip
  • Advanced Member
  • 54 posts

Posted 25 June 2006 - 10:41 PM

Can you please post your PHP code your trying to use?

#3 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 25 June 2006 - 11:03 PM

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Anyone know how to fix that?[/quote]
Compile php with support for mysql.

#4 JP128

JP128
  • Members
  • PipPipPip
  • Advanced Member
  • 233 posts
  • LocationWisconsin

Posted 25 June 2006 - 11:07 PM

I am not compiling... I am just setting it up with apache
-----------------------------------------------------------------------
John Ensign - Age 16 - PHP Learner

My email is Johnny.Ensign@gmail.com

#5 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 25 June 2006 - 11:09 PM

How have you installed apache, php and mysql?

maybe [a href=\"http://phpbuilder.com/board/showthread.php?t=10246585\" target=\"_blank\"]this[/a] will help you out.

#6 JP128

JP128
  • Members
  • PipPipPip
  • Advanced Member
  • 233 posts
  • LocationWisconsin

Posted 25 June 2006 - 11:22 PM

nope, still same error

-----------------------------------------------------------------------
John Ensign - Age 16 - PHP Learner

My email is Johnny.Ensign@gmail.com

#7 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 25 June 2006 - 11:26 PM

How have you installed apache, php and mysql? And what OS are you using?

#8 JP128

JP128
  • Members
  • PipPipPip
  • Advanced Member
  • 233 posts
  • LocationWisconsin

Posted 25 June 2006 - 11:37 PM

I installed it from website... apache.org. the MSI. Also I have Windows XP
-----------------------------------------------------------------------
John Ensign - Age 16 - PHP Learner

My email is Johnny.Ensign@gmail.com

#9 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 25 June 2006 - 11:50 PM

We need more details. What steps have you taken to configure apache, php and mysql?

Really, sounds like you should probably just download and install something like [a href=\"http://www.apachefriends.org/en/xampp.html\" target=\"_blank\"]xampp[/a].

#10 JP128

JP128
  • Members
  • PipPipPip
  • Advanced Member
  • 233 posts
  • LocationWisconsin

Posted 26 June 2006 - 12:13 AM

I configured the php to use mysql, just as a guide told me to do. then I changed like 2 settings in http.conf. But I get that error
-----------------------------------------------------------------------
John Ensign - Age 16 - PHP Learner

My email is Johnny.Ensign@gmail.com

#11 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 26 June 2006 - 09:09 AM

Thread closed you already posted this problem in the PHP Installation forum. Please do not post duplicat threads around the forum.

[a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=96797&pid=387967&st=0&#entry387967\" target=\"_blank\"]Link to post[/a]

Also I would recommend you to download the zipped binaries rather than the MSI package for PHP. PHP doesnt need an installer if you're using Apache. With the zipped binaries you can just extract the contents of the file to where you want php to be installed to.

Also reason why you are getting that error is because there was a license change between PHP and MySQL. Thats whay PHP no more comes with built in MySQL support. In order to use mysql functions you need to enable the mysql extension.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users