RE: PHP and MySQL
"Lawson Cronlund" <[email protected]>
| Newsgroups | gmane.comp.db.mysql.windows |
|---|---|
| Message-ID | <[email protected]> |
Don,
I'm reading up on the integration of MySQL, Apache, and PHP in a book called
"How to Do Everything with PHP and MySQL" by Vikram Vaswani
(McGraw-Hill/Osborne) which lists several steps to configure the connection
between Apache and PHP. Since I haven't reached the point of doing this
yet, I can't say if it works, but here are the steps Vikram lists:
1. Extract the PHP distribution file to c:\php.
2. Copy the file php.ini-recommended from c:\php to c:\windows as php.ini.
3. Copy the file libmysql.dll from c:\php to c:\windows\system32.
4. Edit the c:\windows\php.ini file as follows:
change the string 'extension_dir = "./"' to 'extension_dir =
"c"\php\ext"'.
Delete the ';' from the line ';extension=php_mysql.dll
5. Open the Apache configuration file "httpd.conf" (in the Apache/conf/
subdirectory of the Apache installation directory) and add the following
lines to it:
AddType application/x-httpd-php .php
LoadModule php5_module "c:\php\php5apache.dll"
SetEnv PHPRC C:\windows
Once again, I haven't reached the point of trying this yet but the book
seems clear and straightforward in its description.
You may find that a copy of this book helps with general questions. It lays
information out in a way that I can understand. Many technical books are a
challenge in understanding obscure terms for simple concepts but this book
doesn't seem to have that defect.
Regards.
Lawson
[email protected]
+1(480)308-0641 (Voice)
+1(602)996-0376 (Fax)
-----Original Message-----
From: Don Lancaster [mailto:[email protected]]
Sent: Friday, January 06, 2006 9:05 AM
To: [email protected]
Subject: PHP and MySQL
Hi all - here's the story... I installed MySQL 5 on my Windows XP computer
and everything seems to work splendidly. I then installed Apache, and that
worked wonderfully also. I added PHP5, and tested it with a simple "echo"
statement and it worked marvelously. In a rapture, I tried to connect to a
MySQL database using mysql_connect and I got an error message that in effect
said Apache didn't know what the heck the function was. I remembered that
PHP5 doesn't automatically include MySQL support, so I went to the PHP
webpage and did the two things they stated I needed to do (put the php.ini
file in the c:\windows directory, which it already was, and add it to the
PATH environmental variable). I also "uncommented" the extension
php_mysql.dll in the php.ini file. But it still doesn't work! I'm at my
wit's end. What am I doing wrong? One book says that I should put the
libmysql.dll in the c:\windows directory, but I'm wondering if it should be
in the extensions folder (c:\php\ext). Is this correct? Can someone give
me some advice (besides "Use ODBC instead")?
Donald J. Lancaster
Environmental Standards, Inc.
1140 Valley Forge Road
PO Box 810
Valley Forge, PA 19482
phone: 610 935 5577
fax: 610 935 5583
www.envstd.com <http://www.envstd.com/>
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/[email protected]