# Thread: Help on installing php

1. ## Help on installing php

How do you install php i run windows xp plez help i want to learn php

2. Hi,

Here's a list of step-by-step instructions of how I do it:

2. Download your preferred version of PHP (the ZIP file, not the installer).
3. Unpack the contents of the ZIP file to your preferred location.
4. Open Apache's configuration file (located in c:\path\to\apache\conf\httpd.conf).
The next step is to configure PHP for Apache. This is done by adding two new lines to Apache's configuration. The first line loads the PHP module, and the second one defines which filetypes that should be parsed by PHP. How the first line should look depends on which versions of Apache and PHP that you've chosen.

Apache, PHP4:

Code:
LoadModule php4_module "c:\path\to\php\sapi\php4apache.dll"
Apache2, PHP4:

Code:
LoadModule php4_module "c:\path\to\php\sapi\php4apache2.dll"
Apache, PHP5:

Code:
LoadModule php5_module "c:\path\to\php\php5apache.dll"
Apache2, PHP5:

Code:
LoadModule php5_module "c:\path\to\php\php5apache2.dll"
The second line that should be added is this:

Code:
AddType application/x-httpd-php .php .foo
This tells Apache that files with the extensions php and foo should be parsed by PHP.

Now we're almost done. There is just one thing left; the configuration of PHP. There are two configuration files that you can choose from; php.ini-recommended and php.ini-dist (both are located in the PHP folder). Choose the one you want (I think that the options set in php.ini-dist corresponds most to the settings used by most hosts (correct me if I'm wrong)), copy it to c:\Windows, and rename it to php.ini.

After you've changed the options in the configuration file to fit your needs, you'll have to restart Apache for the changes to take effect (Start menu -> Programs -> Apache HTTP Server -> Control Apache Server -> Restart). After you've done that, save this little script in c:\path\to\apache\htdocs (or whatever Apache's DocumentRoot directive is set to) with the extension php (e.g. hello-world.php).

PHP Code:
 <?php echo 'Hello World'; ?> 
When that's done, start up your web browser, and type in http://localhost/hello-world.php (change the filename to whatever you named your script) in the address bar. If everything is working properly, the text "Hello World" should be displayed on the page.

3. ## Hello

Hello my firend

http://www.hotscripts.com/PHP/Softwa...allation_Kits/

I recommend WAMP 5

Good luck

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•