:?: how do I start? :?:

Reply

Join Date: Jul 2005
Posts: 41
Reputation: jasondrey13 is an unknown quantity at this point 
Solved Threads: 0
jasondrey13's Avatar
jasondrey13 jasondrey13 is offline Offline
Light Poster

:?: how do I start? :?:

 
0
  #1
Mar 4th, 2006
I am learning the PHP language but I can't figure out how to see what i am doing. I need a program to see the result of my coding. Can someone help?

thanx
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 354
Reputation: Troy is an unknown quantity at this point 
Solved Threads: 5
Troy's Avatar
Troy Troy is offline Offline
Posting Whiz

Re: :?: how do I start? :?:

 
0
  #2
Mar 4th, 2006
Welcome to a long frustrating journey! Seriously, it is obvious you are just starting this journey so expect a lot of struggling. But soon, it will all come together--just keep pushing forward and learning.

First of all, PHP is not only a web development language. You can use PHP to write shell scripts as well as develop full GUI apps. Since you do not say, I have to assume you are learning PHP as a web development language.

As you've already discovered, you can not simply double click a PHP file on your local filesystem and have it process and display in your browser. You are probably familiar with doing this with HTML files--which does work.

PHP must be processed by the webserver. This means you need both a webserver as well as the php interpreter integrated somehow with your webserver (so the webserver knows how to process the PHP code before sending the results to the browser).

The good news is that it's relatively easy to set this up on your local computer. You have several options, but the two most popular are to install:
1. IIS and PHP
2. Apache and PHP

I recommend Apache and PHP for several reasons, but the 2 most important are:
1. Apache runs on both Windows and Linux, so the configuration skills you learn will work on either.
2. IIS is not available anymore for Windows XP Home and Pro. (I think....in any case, it's increasingly difficult to get a Windows webserver you can use on anything other than Windows Server version.)

Apache and PHP (along with MySql) on Windows is commonly referred to as "WAMP" (Windows, Apache, MySql, PHP). "LAMP" is the same thing but Linux instead of Windows.

So, my recommendation to you is to install Apache, then install PHP. You must then configure Apache to use the PHP module. There are many places to learn how to do this, but I'm partial to my own WAMP HOWTO at http://www.troywolf.com/articles/wamp_howto.htm

Now, my HOWTO is a bit dated, but still very relevant. It explains to install PHP5, but if I were to update it, I'd change it to PHP4.4.2 which has less compatiblity issues with some of the popular PHP application packages out there. For your purposes though, installing either PHP version will be just fine for your learning.

Once configured, to test your PHP pages, you'll surf to them in your browser using http://localhost/foo.php (or whatever you name your scripts).
Troy Wolf is the author of SnippetEdit. "Website editing as easy as it gets." IX Web Hosting
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC