|
Posted by Bruintje Beer on 11/12/06 06:36
"K Kien" <kurrabakien@hotmail.com> schreef in bericht
news:eif2j2$p13$1@news-02.connect.com.au...
> Hi
>
>
>
> I'm completely new to MySQL, PHP and Apache.
>
>
>
> I dowloaded Apache 2.23, PHP 5.1.6 and MySQL 5.0.27 and setup on Windows
> 2000 Professional as follows:
>
>
>
> 1) Apache 2.23 - installed using installer then edited httpd-conf file by
> inserting the following:
>
> *********************************************
>
> ScriptAlias /php/ "c:/php/"
> AddType application/x-httpd-php .php
> Action application/x-httpd-php "/php/php-cgi.exe"
>
>
>
> <Directory "C:/php/">
> AllowOverride None
> Options None
> Order allow,deny
> Allow from all
> </Directory>
>
> *********************************************
>
> The Directory portion above was added because it generated 403 access
> permission error when tested (phpinfo.php).
>
>
>
> 2) PHP 5.1.6 - extracted in C:\, copied php.in-recommended in WINNT
> changed
> to php.ini then edited as follows:
>
> *********************************************
>
> Added ext in the end - extension_dir = "./ext"
>
> Uncommented - extension=php_mysql.dll
>
> *********************************************
>
>
>
> 3) MySQL 5.0.27 - installed using default options. For testing created
> mysqltest.php file and saved in Apache's htdocs folder.
>
> *********************************************
>
> mysqltest.php
>
>
>
> <html>
> <head><title>MySQL Connection Test</title></head>
> <body>
> <h2>
>
>
>
> <?php
> $connection = mysql_connect("localhost","root","")
> or die("Sorry - unable to connect to MySQL");
> echo("Congratulations - you connected to MySQL");
> ?>
>
>
>
> </h2>
> </body>
> </html>
>
> *********************************************
>
> When I try to run this file in the browser -
> http://localhost/mysqltest.php - the only thing I get is this:
>
>
>
> Sorry - unable to connect to MySQL
>
>
>
> Can anyone please tell me what am I doing wrong?
>
>
>
> Thanks in advance
>
>
>
> K Kien
>
>
Hi
Use xamp. MySQL, PHP, Apache and SSL all together in this package. Install
and run
John
[Back to original message]
|