note 31187 added to installation

From: Date: Sat, 12 Apr 2003 12:49:59 +0000
Subject: note 31187 added to installation
Groups: php.notes 
Request: Send a blank email to php-notes+get-46542@lists.php.net to get a copy of this message
Once you have downloaded PHP and Apache, you are ready to start installing! First unzip and install Apache. For the Server Information screen, type anything you want because it wont matter. You might want to type in a realy Admin email tho. Also install it on port 80 (normal). Change the install folder to C:\ (dont worry, it will make a folder apache2) and then install it! If you want a server with NO PHP support or Mysql Support then you may stop here and go on to the last step. Now we are going to install PHP. First, you will unzip the constance of that 5meg file you downloaded. Now create a folder in C:\Apache2 and called PHP. Now move the constance of the ziped file to that folder. Now go to your httpd.conf file. It is in your C:\apache2\conf directory. Now open that sucker up with notepad. Be sure to do not add the files in ( )'s First find the line: Setting up Httpd.conf ScriptAlias /cgi-bin/ "C:/Apache2/cgi-bin/" Go to the line under it and insert: ScriptAlias /php/ "C:/apache2/php/" (what this does is tell the server where the php folder is) Now find the lines: # Format: Action handler-name /cgi-script/location # Go to the line following it and insert this: Action application/x-httpd-php /php/php.exe (What this does is tell the server where the php program is) Now find the lines: # AddType allows you to add to or override the MIME configuration # file mime.types for specific file types # AddType application/x-tar .tgz Go to the line following it and insert these lines: AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 AddType application/x-httpd-php .phtml AddType application/x-httpd-php-source .phps (what this does is like the extensions on files) Now, look for <IfModule mod_mime_magic.c> MIMEMagicFile conf/magic </IfModule> Now add this below: <IfModule mod_dir.c> DirectoryIndex index.html index.php default.php main.php </IfModule> (What that does is when you go to a folder, it will go to one of thoes files) Installing MySQL OK! Your done with installing PHP. Now, we are going to install MySQL. First unzip and run the SETUP and do everything that is reccomended. Now you installed it and hopefull it all worked.... NOTE: If you install MySQL in a folder other than C:\MYSQL or you intend to start MySQL on NT/Win2000 as a service, you must create a file named C:\MY.CNF or \Windows\my.ini or \winnt\my.ini with the following information:: [mysqld] basedir=E:/installation-path/ datadir=E:/data-path/ After your have installed MySQL, the installation directory will contain a file named 'my-example.cnf'. You can use this as a starting point for your own C:\my.cnf file. Starting your server To start your nice little server with PHP and mysql, goto Start---->Program Files---->Apache HTTP Server 2.0.39---->Control Apache Server---->Start Apache in Console That little thing will start your server. Now to start MySQL, Create a shortcut that leads to "C:\mysql\bin\mysqld.exe --standalone" . The file should open and then close. Now go to http://localhost and see if it works! If it does then go to C:\Apache2\htdocs and start making your website! Now to test your PHP & MySQL. First, make a new file called info.php and insert in the C:\Apache2\htdocs dir. In that file, add the following lines of code: <? phpinfo(); ?> Now go to http://localhost/info.php . You should see a screen with a bunch of info on it. If you DO NOT get this screen, Then go to "Common Error" -- http://www.php.net/manual/en/installation.php http://master.php.net/manage/user-notes.php?action=edit+31187 http://master.php.net/manage/user-notes.php?action=delete+31187 http://master.php.net/manage/user-notes.php?action=reject+31187

« previous php.notes (#46542) next »