I have installed:
1- Windows XP
2- Wamp
3- Apache
4- MySQL
5- PHP
6- phpExpertEditor
When I run any php file in phpExpertEditor it works ok,
but when I try to connect php to mysql Im getting Error:
Fatal error: Call to undefined function mysql_connect() in C:\Program Files\PHP Expert Editor\php3A.tmp on line 9
the php code is:
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
?>
I asked this question previously and someone said to check
I checked it but mysql wasnt there.
=================================
my second question is that i can not run any php file (which is on my HardDisk) by my InternetExplorer !!
I have to upload them to my host (which supports php) and then only i can run them.
Is there any problem in Installation of PHP?
2006-07-06
08:21:41
·
5 answers
·
asked by
QuestionAnswer
2
in
Computers & Internet
➔ Programming & Design
I didnt install Apache,Php,MySQL seperately!
I just installed WAMP which contains them, does it need any arrangement?
2006-07-06
10:50:51 ·
update #1
I could open file by my IE < http://localhost/test1.php > So i got the answer of my second question.
but still i cant run a php file which is trying to connect to mysql !? i get this error:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'peter'@'localhost' (using password: YES) in C:\wamp\www\bb.php on line 4
Could not connect: Access denied for user 'peter'@'localhost' (using password: YES)
and this is code of php file:
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
?>
It seems that problem is in connection of php to mysql, but i have activated mysql by wamp...
2006-07-06
11:16:15 ·
update #2