# PHP downloads



## Caliraj (Mar 22, 2006)

Hi,
Im just beginning to lern PHP by means of online tools.One of the site says that PHP can be downloaded from http://www.php.net/downloads.php

But there are 2 links for the source code, one a .bz2 file and the other, a .gz file.COuld anyone help me out to which one should I download?
Thanks & Regards,
Cali.


----------



## covert215 (Apr 22, 2006)

Do you have a server as well? PHP cannot just be downloaded and run from a computer.


----------



## Caliraj (Mar 22, 2006)

Hi,
I do not have a PHP server.....for example if I write a simple code in a notepad and click on the file, I get a popup window to choose if I want to open it with a particulat tool...


----------



## thecoalman (Mar 6, 2006)

Google Easyphp, the name says it all. It's actually quite more. Apache server, Mysql and PHP all rolled into a simple easy installation that will allow you to run a test server under windows.


----------



## covert215 (Apr 22, 2006)

If you do not have a php parser on you're computer, you will be prompted to download the file. If you aren't prompted, you're php server is configured properly.


----------



## DrP (Jul 23, 2005)

Or try WAMP server: http://www.wampserver.com/en/
It's similar to Easyphp but I found it easier to set up.


----------



## Howelly (Sep 22, 2006)

xampp is yet another alternative with php, apache, phpmyadmin etc all rolled into one.


----------



## covert215 (Apr 22, 2006)

phpmyadmin is only a web-based control panel for MySQL. WAMP comes with that and SQLiteManager if you prefer that one.


----------



## Caliraj (Mar 22, 2006)

Hi,
I had come to know about a test server called Easyphp that has MySql, Apache server as well as PHP server.Since Im about to start working with simple PHP programs, Im trying to download this tests server.But when I click on the download link at th following link :
http://www.softpedia.com/progDownload/EasyPHP-Download-20669.html#download_locations

I get something called as External Mirror 1. On clicking it, another page opens up with many versions for particular countries.I reside in India.First of all, is this the correct download link & if so, is it fine if I download the link of Taiwan(Asia)?
COuld anyone help me out with this?


----------



## thecoalman (Mar 6, 2006)

I always go to the source: http://www.easyphp.org/telechargements.php3


----------



## namenotfound (Apr 30, 2005)

The one I use is: http://www.uniformserver.com php, mysql, apache


----------



## Caliraj (Mar 22, 2006)

Hi,
As you mentioned, Im trying to download the Uniform server for PHP. But, reg the version 3,.3, there are 3 downloads (Uniserver.exe, 2 other zip files). Which one should I download?Could you let me know.
Thanks.


----------



## namenotfound (Apr 30, 2005)

If you're using Windows (as opposed to Mac or Linux) on your computer, then get the uniserver.exe download


----------



## Caliraj (Mar 22, 2006)

Hi,
I ahve downloaded the uniform server that you had mentioned.Now could you tell me as to how do I start working with simple PHP programs?
For example, I wrote a simple code to print "hello" in a notepad & saved it as a .php file.When I clicked on the file, I just got a blank window.
COuld you help?


----------



## namenotfound (Apr 30, 2005)

Caliraj said:


> Hi,
> I ahve downloaded the uniform server that you had mentioned.Now could you tell me as to how do I start working with simple PHP programs?
> For example, I wrote a simple code to print "hello" in a notepad & saved it as a .php file.When I clicked on the file, I just got a blank window.
> COuld you help?


Locate where the Uniform Server is, click on "Server_Start", when your browser pops up, type in "localhost"

Your files go in: diskw -> www

So if you have a file called somename.php in the "www" folder, go to http://localhost/somename.php so see your file on the server

Btw, the "stop" in the screen shot shuts down the server when you're done using it (or you can keep it on all the time, your choice). The default .htaccess file that's installed when you install the server will make it so only your computer can access the server, if you want other computers to be able to access the server remove the .htaccess file, although I wouldn't if I was you.... just because I wouldn't want anyone on my test server in the first place


----------



## Caliraj (Mar 22, 2006)

Hi,
As you had mentioned, I started the Server_Start.The window that came up was the Uniform serevr website.My php program 'hello.php' was in the C:\ drive.So I moved it to the C:\nrk\Uniform Server\diskw forlder.I opened the php folder from this location.
The source code is as follows:

<?
echo Hello World";
?>

Now the output was just awindow with blue as the back ground color.But I could not see the words, Hello World.
COuld you let me know the problem?


----------



## namenotfound (Apr 30, 2005)

You don't open the php file from the folder, you get to it from _localhost_ on your browser.

First put the php file in C:\nrk\Uniform Server\diskw\www

then in your browser type in http://localhost/hello.php

This is what it looks like when I try to access the file directly:



And this is what it looks like when I access the file via the server (localhost):


----------



## Caliraj (Mar 22, 2006)

Hi,
As you mentioned, I moved the php file to the www folder.Now, I started the Server_Start file & the Uniform server site came up. This was the URL in the address bar : http://localhost/apanel/
Now, I changed the url in the address bar to http://localhost/hello.php and i got the following error : 
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in W:\www\hello.php on line 4
This was my code in the PHP file :

<?
echo Hello World";
?>

Im not sure where Im getting it wrong .


----------



## namenotfound (Apr 30, 2005)

You have "Hello World" with a formatted "

Try "Hello World"

You probably used a word processor or some other editor that formats text. Which messed up the quote. Use an unformatted "

<?
echo "Hello World";
?>


----------



## Caliraj (Mar 22, 2006)

Hi,
The PHP programs are working now.But in case I include an image with the <img src> command, I get a parse error.Another issue is with the Mail comamnd.I was trying to execute a simple mail comamnd that would send a mail to my email id. The code is as follows:

<?
mail("[email protected]","reply","Hi da,how are you?Did u get any reply from Jitu?","From:[email protected]");
if (mail($to,$subject,$body,$headers))
{
echo "Your mail has been successfully delivered to $to";
}
else
{
echo "Mail Delivery failed.Please check the validity of the Email Id($to)";
}

?>

I get the follwoing error:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in W:\www\email.php on line 4
I checked the php.ini file also.It says SMTP=localhost and smtp_port = 25.
Could you help?


----------

