|
Posted by Rik Wasmus on 10/13/07 21:05
On Sat, 13 Oct 2007 23:00:42 +0200, Evan Jou <l.jou@att.net> wrote:
> Hi there,
>
> I have a simple question for you experts here that I've installed
> Apache, PHP and MySQL on my Windows machine and set up a test
> script(test.php) like what is listed in a book. It's like
>
> <?php
> @mysql_connect("localhost","root","password")
> or die("Could not connect to MySQL server!);
> @mysql_select_db("mysql")
> or die("Could not select database!);
> echo "You're connected to a MySQL database!";
> mysql_close();
> ?>
>
> After I opened the browser and selected the test.php, nothing =
> happened.
> I look in the php.ini file and uncomment the line
>
> extension=3Dphp_mysql.dll
>
> and change extension_dir =3D ".\" to extension_dir =3D "c:\php\ext\"
>
> I also make sure libmysql.dll resides on the Windows system path =
as
> told in the book. Then I restart the computer and open the browser aga=
in =
> and
> select test.php. Still nothing happens. What did I miss? :(
>
> Thank you in advance for your help.
First rule of debugging: show, don't supress errors. So remove the @ and=
=
tell us what it sais.
Also: what does phpinfo(); tell you? Is the mysql extention loaded? Have=
=
you edited the php.ini it uses or perhaps another one?
-- =
Rik Wasmus
Navigation:
[Reply to this message]
|