List Info

Thread: PHP will not connect to Mysql




PHP will not connect to Mysql
user name
2006-08-04 09:55:44
I can enter records into the Mysql command prompt and
retrieve them
back.
I have also tested basic PHP and HTML files with just echo
commands
they work fine.
apache also is up and running showing me the
"localhost"  in internet
explorer

(In the script below i am only trying to establish a
standard
connection not actually trying to access a database but this
does not
work either)

(Here is a basic connection Script from the book)
(I use MySQL 4.0.21)

<?php
$conn = mysql_connect("localhost",
"test", "test");
echo $conn;
?>


(This is the error i get)

Fatal error: Call to undefined function mysql_connect() in
C:\Program
Files\Apache Group\Apache2\htdocs\2.php on line 2


(here is a copy of mysql.ini)

#This File was made using the WinMySQLAdmin 1.4 Tool
#02/08/1999 12:31:55

#Uncomment or Add only the keys that you know how works.
#Read the MySQL Manual for instructions

[mysqld]
basedir=C:/mysql
#bind-address=127.0.0.1
datadir=C:/mysql/data
#language=C:/mysql/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=C:/mysql/bin/mysqld-max-nt.exe
user=test
password=test
QueryInterval=3


(In the setup options i used port 80 did also have the
choice for 8080
but was recommended 80 in the options)

Pls tell me if you can help me with this simple script thank
you

Daniel aka Flickle - West bond


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "PHP & MySQL" group.
To post to this group, send email to phpmysqlgooglegroups.com
To unsubscribe from this group, send email to
phpmysql-unsubscribegooglegroups.com
For more options, visit this group at http://groups
.google.com/group/phpmysql
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )