RE: PHP and MySQL

"Larry Elliott" <[email protected]>
Newsgroups gmane.comp.db.mysql.windows
Message-ID <000001c613c3$ea1c1fe0$d800a8c0@LARRY>
I am running PHP 5.1.1, MySQL 5.0.17, and Apache 1.3.34.  I am also a
amateur, not a professional programmer.  I do however, have some strong
opinions.
1.  Use the documentation on how to install for windows XP that is included
with the programs.  The books never have the current instructions.  They are
good for how to use the program once installed, but not for the initial
installation.
2.  Don't use the windows installer for MySQL.  Download the
mysql-noinstall-5.0.17-win32.zip file, unzip into c:\mysql then follow the
directions in the section about installing for Windows XP.  Create the
My.ini file in the c:\mysql directory.
3.  Here are the salient lines in the My.ini file running on my computer:
	[mysqld]
	basedir = c:/mysql
	bind-address = 127.0.0.1
	port = 3306
	[WinMySQLAdmin]
	Server=C:/mySQL/bin/mysqld-nt.exe
The bind-address line is critical for the windows setup and not included in
the recommended ini file.  You will need to add the line manually.
4.  Download and install mysql-administrator from the MYSQL download site.
Once MySQL is installed on the computer run MySQL-Administrator to set the
root password, create other users, grant privilege and to back up your
database(s).  You can also download and install mysql-query-browser from the
MySQL download site and execute queries\view results in the windows GUI.
Very useful in verifying that the MySQL service is running properly
5.  Next install Apache and check to make sure it is running properly.  The
install directions for the 1.3 series work well and are clear.  I did not
succeed in my attempt to get Apache 2.0 running here at home.
6.  Install PHP into the directory c:\php.  Create php.ini in the c:\php
directory.  You will need to adjust the extension_dir statement in the
recommended ini file to suit a windows installation.  Here is what I use
	; Directory in which the loadable extensions (modules) reside.
	extension_dir = C:/PHP/ext
I recommend you activate the 'extension=php_mbstring.dll' line.  You have to
activate the MySQL extension (delete the ';' from the start of the line).
The mbstring functions are useful in running phpMyAdmin.
7.  Edit the httpd.conf file in the Apache/conf directory to enable Apache's
use of PHP.  The PHP documentation gives explicit instructions.  Follow them
carefully as a screw up here will render the installation useless.
8.  Check again to make sure http://localhost/ brings up the Apache default
page.  Then make a web page that runs the phpinfo() function.  Run it and
scroll down.  Verify you see the MySQL section.
9.  I recommend you download and install the phpMyAdmin program.  It is
available at http://www.phpmyadmin.net/home_page/index.php.  It is a a set
of PHP scripts which does an excellent job of setting up and administering
MySQL databases.

Once you have everything working as described, use the books you bought.
They will have a lot of help in how to use the capabilities.  
P.S. You can use other computers on a home network to view web pages,
including MySQL data by using http://xxx.xxx.xxx.xxx/web_page.php You can
find the IP address you need in the client information of
MySQL-Administrator on the server information tab.

Hope you find this helpful.
-----Original Message-----
From: LE Backup [mailto:[email protected]] 
Sent: Friday, January 06, 2006 15:54
To: [email protected]; 'Don Lancaster'; [email protected]
Subject: RE: PHP and MySQL

Contrary to belief, and the installation documentation (and I know I'll
confuse this poor person so kinda ignore me, but for everyone else...)

You do NOT need to put any of these files in the %windir% or %system%,
matter of a fact our machine build policies will NOT allow any NON-Microsoft
product to install ANYTHING in the %windir%, and if it insists, we simply
will not use it.

For WAMP setup, we left the libmysql.dll and libmysqli.dll in the apache/bin
dir.

Cheers,

James Friesen, CIO

Lucretia Enterprises
"Our World Is Here..."
Info at lucretia dot ca
http://lucretia.ca


> 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



-- 
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:    http://lists.mysql.com/[email protected]





-- 
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.