How do you install php i run windows xp plez help i want to learn php :fangel:
Printable View
How do you install php i run windows xp plez help i want to learn php :fangel:
Hi,
Here's a list of step-by-step instructions of how I do it:
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.
- Download and install Apache.
- Download your preferred version of PHP (the ZIP file, not the installer).
- Unpack the contents of the ZIP file to your preferred location.
- Open Apache's configuration file (located in c:\path\to\apache\conf\httpd.conf).
Apache, PHP4:
Apache2, PHP4:Code:LoadModule php4_module "c:\path\to\php\sapi\php4apache.dll"
Apache, PHP5:Code:LoadModule php4_module "c:\path\to\php\sapi\php4apache2.dll"
Apache2, PHP5:Code:LoadModule php5_module "c:\path\to\php\php5apache.dll"
The second line that should be added is this:Code:LoadModule php5_module "c:\path\to\php\php5apache2.dll"
This tells Apache that files with the extensions php and foo should be parsed by PHP.Code:AddType application/x-httpd-php .php .foo
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).
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.PHP Code:<?php echo 'Hello World'; ?>
Hello my firend
http://www.hotscripts.com/PHP/Softwa...allation_Kits/
I recommend WAMP 5
Good luck