Jump to content
Reliance Jio & Reliance Mobile Discussion Forums
Sign in to follow this  
RajanPERT

Php Tutorial

Recommended Posts

Please help me to download and install the PHP on my computer. i am very confused about the installation. I am new for PHP.

Thanks in Advance.

Take Care.

Share this post


Link to post
Share on other sites

Try to install WAMP (google for that) thatz the best around with a lot of tutorials etc along with it ! (it stands for Windows Apache MySQL and PHP )

Cheers

Ashok

Share this post


Link to post
Share on other sites

PHP can be installed along with IIS server also on Windows

Share this post


Link to post
Share on other sites

Hope this solves your problem

http://www.apachefriends.org/en/xampp.html

I am using Xampp for quite a time, no issues!

Direct Download Links

Lite: http://www.apachefriends.org/download.php?...in32-1.4.15.exe

Full: http://www.apachefriends.org/download.php?...in32-1.4.15.exe

Share this post


Link to post
Share on other sites

Installing Of PHP on your Windows XP computer with IIS.

Now i found the simple way to install the PHP on your Standalone Computer Running Windows XP

To Install the PHP you must install a web server.

A web server is software that serves web pages in response to requests from web browsers. A web server is sometimes called an HTTP server. The default name of your web server is the name of your computer.

You can change the server name by changing the name of your computer. If your computer has no name, the server uses the word localhost. The server name stands for (or is an alias for) the server’s root folder, which is most likely

C:\Inetpub\wwwroot

. You can open any web page stored in the root folder by entering the following URL in a browser running on your computer:

http://myServerName/myFileName

For example, if the server name is localhost and a web page called pert.htm is stored in

C:\Inetpub\wwwroot\

, you can open the page by entering the following URL in a browser running on the local computer:

http://localhost/pert.htm

You can also open any web page stored in any subfolder of the root folder by specifying the subfolder in the URL. For example, suppose the pert.htm file is stored in a subfolder called pert, as follows:

C:\Inetpub\wwwroot\pert\pert.htm

You can open this page by entering the following URL in a browser running on your computer:

http://localhost/pert/testPage.htm

To change the Computer Name.

You must be logged on as an administrator or a member of the Administrators group in order to complete this procedure. Click on Control Panel > System..

On the Computer Name tab, click Change.

Enter the Appropriate Name Without Space.

and click OK.

Installing IIS

IIS may already be installed on your computer. Check your folder structure to see if it contains a Inetpub Folder. IIS create this folder during installation. If it not, just do following Task.

To install IIS on XP Professional:

in Windows XP, choose Start > Control Panel > Add/Remove Programs.

Choose Add/Remove Windows Components.

Select the IIS box and follow the installation instructions.

Testing the IIS

Create a html file and saved it in Inetpub\wwwroot folder on your computer. The HTML page can consist of a single line, such as:

<p>My web server is working.</p>

Save the page as pert.htm. Next, open the test page in a web browser with an HTTP request. If IIS is running on your local computer, enter the following URL in your web browser:

http://localhost/pert.htm

If the browser displays your page, the web server is running normally.

If the browser fails to display the page, make sure the server is running. Click on the Control Panel > Administrative Tool > Internet Information Service. In IIS click on Plus sign of Local Computer, now click the Plus sign of Web Sites. Right Click on Default Web Site and Click on Start, if Start is displayed dimmed. This means that the Web Server is already running.

If the page still fails to open, make sure your test page is located in the Inetpub\wwwroot folder and has an .htm or .html file extension.

Download and install PHP.

After configuring the IIS successfully, Now configure the PHP on your system. For PHP,

you can download it

from http://www.php.net/downloads.php. I am using PHP 5.0.2. I take it from a Friend CD. Unzip the file to c:\php folder.

You can download it to other location, but I download it here. After Unzipping, follow the following procedure.

There are two main ways to install PHP for Windows: either manually or by using the installer. I not prefer installer way, I installed it manually for the experience. It’s a simple way, just joking. Just do it step by step. There is no problem now.

First create the Environment Variables PHPRC. For this follow the following steps:

Right Click on My Computer and Click on Properties.

On System Properties, Click on Advance Tab.

In this Click on Environment Variable option.

Now Click on New for both for User Variable and System Variables one by one.

On variable name, type the “PHPRC” and Variable Value, type the “C:\PHP; C:\PHP\EXT; C:\PHP\PEAR” without Quotes. And click OK three times and close the system properties dialog Box.

Next step is to set up a valid configuration file for PHP, php.ini. There are two ini files distributed in the zip file, php.ini-dist and php.ini-recommended, in c:\php (where we extract PHP files). You may use any file. Copy your chose file in c:\php and rename it to “PHP.INI”.

Edit your new PHP.INI file. Set the doc_root to point to your web servers document_root. For Examples:

Doc_root = c:\inetpub

Set the browscap configuration setting to point to c:\windows\system32\inetsrv\browscap.ini. Like this:

browscap = c:\windows\system32\inetsrv\browscap.ini

Start the Computer Management Console.

For this Click Start > Run and Type “compmgmt.msc” without quotes. And click OK.

In open window’s left pane click on plus sing of Services and Application, Click on the plus sign of Internet Information System, Click on plus sign of the Web Sites.

Right Click on default web sites.

Under the Home Directory, Click on Configuration option.

In mappings click on Add option.

Type the “c:\php\php5isapi.dll” in Executable and in Extension box type “.php” (Without quotes) and click OK.

Again click on Add and type “c:\php\php-cgi.exe” in Executable, and in Extension box type “.php3” (without quotes) and click OK.

Repeat the same process for “c:\php\php-cgi.exe” and “.phtml”.

Now click on ISAPI Filters and Click on Add. Type “php” in Filter Name box and “c:\php\php5isapi.dll” in Executable box. And Click OK Twice.

Restart the IIS completely. To do it.

Click on Start > Run. Type cmd and click ok.

In MS DOS windows type “NET STOP iisadmin” and press Y for ervery Question.

Aftert this, type “NET START w3svc

You have configured the PHP successfully.

To test the PHP installation

For it, type the following code in a file named pert.php and saved it to c:\inetpub\wwwroot directory of your webserver.

<html>
<head>
<title> PERT Installed PHP Successfully</title>
</head>
<body>
<?php
phpinfo();
?>
</body>
</html>

and open the Internet Explorer or Firefox. What else u using. And Type following in Address Bar.

http://localhost/pert.php

and U Will see an introduction page. The Script is successfully installed.

I successfully test it on my computer, it success. But I did not take any responsibilty. For further Queries Feel free to contact me at RIMWEB. I will try to help u.

Thanks and Take Care.

Share this post


Link to post
Share on other sites

wow!!!!!! that was an amazing post Rajanpert ... teacherji.... dhanyawad!

Well that method u mentioned sure works.... but I would still advise using WAMP coz that simplifies a lot of things!!

http://www.wampserver.com/en/index.php

PS : BTW, running PHP on IIS is sure a good way for a novice, or for someone just wanting to try PHP / Learn it! and a great post Rajan

cheers

Ashok

Share this post


Link to post
Share on other sites

Great tutorial Rajanpert.

And if you are using Mysql, you can also tryout PhPMyadmin.

Share this post


Link to post
Share on other sites

depu and TCP, both of you did not describe download location of the respective package that was described by you!

Please Give details not only one line!

Thanks and Take Care!

Share this post


Link to post
Share on other sites

Doesn't matter when there is Google !

phpMyAdmin

EasyPHP

Share this post


Link to post
Share on other sites

But if it found here. Than it is great. And if Some introduction about It.

What's u thought!

Thanks and Take Care!

Share this post


Link to post
Share on other sites

Hey admin please add the contents of this topic to installing Mysql also on IIS right now m using Easy PHP on local comp and my 2003 server has got IIS already installed on it I want to use IIS+PHP5+Mysql combination

Share this post


Link to post
Share on other sites

hey some where in this forum there was a discussion on how to install php on windows... I tried to look for that topic to add my post there but it seems the topic has been moved...

I want assistance in installing graphics on php presently I m using WAMP server latest download and want to use graphs in my code.. how to install/enable graphics for php in this installation...

<< Topic Merged >>

Edited by Arun

Share this post


Link to post
Share on other sites

I am facing a problem to run this PHP script. Please help. The file is saved as test.php.

&lt;HTML&gt;
&lt;FORM&gt;
Please type your name here:&lt;BR&gt;
&lt;INPUT TYPE=TEXT NAME=username&gt;&lt;BR&gt;&lt;BR&gt;
&lt;INPUT TYPE=SUBMIT VALUE="Submit data"&gt;
&lt;/FORM&gt;
&lt;BR&gt;&lt;BR&gt;
You typed:
&lt;?php
echo($username);
?&gt;
&lt;/HTML&gt;

I submit "Rajan". The ans should be You typed : Rajan. But i only find You typed:. Please help me.

Thanks and Take Care!

Share this post


Link to post
Share on other sites

what was that an advertisement... I want a suggestion I have wamp server running with gdlib activated...

1) Is it better that I install php 5 and mysql on my IIS with windows XP becos all the work I am developoing is finally going to be on Win2003 server?

2) I have tried some small trial programs with graphs they are working ok on my comp. Can some one refer me a book which has tips and tricks about how to use graphs in your php webpages? Or a website where I can find this information... I know obviously I can google but Its better if someone can refer me a site where I can learn faster...

Share this post


Link to post
Share on other sites
I submit "Rajan". The ans should be You typed : Rajan. But i only find You typed:. Please help me.

47751[/snapback]

Please Help Me! Is this related to Configuration or other reasons. I am using WAMP.

@imvikky!

U can find all information here http://in.php.net/links.php

THANKS AND tAKE CARE!

Share this post


Link to post
Share on other sites

Use either <? echo $_POST['username']; ?> or add a

<? extract($_POST); ?> on top of the page.

Or else you can turn register_globals On in your php.ini file.

Was that the full code that you posted?You also need to set the form method and action.

<form name='form1' method='post' action='<?=$_SERVER['PHP_SELF'];?>'>

Php works best with apache.The performance is significantly higher than when used with IIS.

Edited by mathewvp

Share this post


Link to post
Share on other sites

imvikky, i must've posted in the wrong thread. anyway, it wont matter if you write your PHP scripts on Win XP and later use them o n server 2003. Just be careful while handling files if you later plan to use your script on a Linux machine...

Share this post


Link to post
Share on other sites

Thanks linuxguy.... anyone any idea about a book for advance graphics functions...I have requested on ebooks thread tooo..............

Share this post


Link to post
Share on other sites

Hi Friends,

I have been looking around for a tutorial all over the net. Thanks guys.

Rimweb ROCKS.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×