I'm trying to start learning PHP. I've checked out many references but most of them focus on coding.

My questions are:

  1. How can I set up my system to run a PHP project (Apache or IIS)?

  2. In which programming environment is it suitable to write PHP code (Dreamweaver or something else)?

I use Windows.

link|improve this question
feedback

migrated from stackoverflow.com May 17 '11 at 15:40

This question came from our site for professional and enthusiast programmers.

14 Answers

What others said about environment, XAMPP or WAMP are both quite good.

Adding my two cents - about IDEs, my advice would be : stay away from Dreamweaver. It produces horrible code.

Notepad++ is a very good yet lightweight editor to code PHP. You could go for something more complete (Such as Netbeans / Eclipse) but if you're just learning, a more complex IDE is just going to burden you.

http://notepad-plus-plus.org/

link|improve this answer
2  
It's not IDE, just notepad. Good IDE will help to write good code. – OZ_ May 17 '11 at 14:47
1  
Some of the (limited) features of Notepad++ are interesting when you're learning. Text colouring according to what you're writing, automatic indentation, etc, are all good features. Of course, it won't complete your code, but going for a full-fledged IDE will just burden someone who is learning, imho. Getting the habit of not relying too much on the IDE in the beginning is a good thing. – RabidFX May 17 '11 at 14:51
Dont't make IDE's bad. Today I regret not learning with an IDE. – Rito May 17 '11 at 14:52
And don't assert that you need an IDE. Some people flourish with just an editor. Use whatever suits you. – Lightness Races in Orbit May 17 '11 at 14:56
I agree with you Tomalak Geret'kal, I just recommended to use one, never asserted to "need" one. – Rito May 17 '11 at 15:00
show 2 more comments
feedback

Personally, I like using XAMPP for my environment (works on *nix/Windows/Mac).

For editing, you could try using Aptana Studio or use the plugin for Eclipse.

link|improve this answer
I use Aptana too, it's a bit chatty - it has ads all over the place for Aptana Cloud, but eclipse is a nice environment. – Rich Homolka May 17 '11 at 16:40
@Rich: Which version are you using? I've been using Aptana for many years, and I've only seen mention of their hosted services in the welcome dialog. But they weren't ads, just integration with the services so that users could easily connect to them. But I haven't seen even this for a long time. My Aptana installs just start in the web perspective; integration with Aptana's cloud services aren't exposed anywhere. – Lèse majesté May 14 at 16:52
feedback

WAMP is the easiest way to get an Apache server supporting PHP up and running.

link|improve this answer
feedback

I've always used xampp. Though I don't know what makes it different to WAMP.

link|improve this answer
WAMP is named after the common combination of Windows, Apache, MySQL and PHP as a server environment. XAMPP means Cross-Platform, Apache, MySQL, PHP and Perl. – Lightness Races in Orbit May 17 '11 at 14:57
I guessed that bit. Is there any other differences like actions they can perform? – Ash Burlaczenko May 17 '11 at 14:59
@Ash: Clearly, XAMPP is available for platforms other than Windows, and includes Perl. For WAMP these factors are not the case. – Lightness Races in Orbit May 17 '11 at 15:28
So the answer is XAMPP contains Perl. Why would anyone install WAMP then? – Ash Burlaczenko May 19 '11 at 9:24
Maybe they find the components updated more frequently, or maybe they prefer the administration tools, or maybe they don't need Perl and don't want the bloat, or maybe they want a native Windows app, or maybe they just like the acronym better... Why does anyone install anything over its competition? – Lightness Races in Orbit May 19 '11 at 9:58
feedback

As far as setting up an apache server, WAMP is in my opinion the easiest solution to setup. As far as IDEs go I would suggest either Netbeans for a full IDE or Notepad++ if you just want the editor. I personally use E-Text Editor as it's in between the two but if your just learning PHP you probably don't want to drop the money on it.

link|improve this answer
feedback

I recommend XAMPP on Windows/Mac and MAMP on Mac and as IDE Netbeans or PHPclipse. I also recommend to start working with an IDE from the very beginning. It will make your life easier, especially for code completiton and debugging.

link|improve this answer
feedback

I'm no PHP expert but after a quick glance this page seems to have a lot of good resources for PHP development.

It mentions PHPEclipse as a good programming environment. I use Eclipse for Java development and its a pretty good tool.

Regarding WAMP vs XAMPP here's a stack exchange wordpress post comparing the two.

link|improve this answer
feedback

Just install WAMP (Windows, Apache, MySQL, PHP) and try Notepad++ to be a happy PHP programmer.

Use WAMP because it comes with some easy to use DB tools (PhpMyAdmin).

link|improve this answer
Just for note - XAMPP also includes PHPMyAdmin. – Lucanos May 17 '11 at 14:48
WAMP include SQLBuddy :) – Sourav May 17 '11 at 14:49
feedback

With VirtualBox you can use any system (or almost any). If you know (or will learn) how to install Debian on VirtualBox, you will be able to install PHP and Apache and Mysql just by 1 command in console (it's easy to google it).
As IDE, take NetBeans. It's free, with good code completion. Code completion is VERY important thing, especially on start. More simple (and more fast) is Komodo Edit, but not very handy code completion.

link|improve this answer
feedback

I'd recommend XAMPP for an Apache / MySQL environment. You can write PPH code in any text editor. I use NetBeans, but Dreamweaver would work as well - NetBeans has code hints for PHP so I'd recommend it over Dreamweaver.

link|improve this answer
feedback

How can I set up my system to run a PHP project (Apache or IIS)?

The quickest and easiest way to set this up is to install a package that has Apache (web server), PHP (scripting language), and MySQL (database) integrated for you.

I see people recommending XAMPP and WAMPServer. Myself, I use a professional version called WampDeveloper Pro.

Also which programming environment is suitable to write PHP code (Dreamweaver or something else)?

phpDesigner is one of the better IDEs for PHP.

Komodo Edit has a free version that I've seen recommended.

Notepad++ is fast and clean but is just an editor and won't help you much.

DreamWeaver is the big one.

link|improve this answer
feedback

use wamp server WAMP -> Windows, Apache, MySQL, PHP Just Go There & Download it & Install It, After You Installed it Go to your C Drive -> wamp -> www -> Create your Folder and put your file there. And for Running it Start Wamp and type on browser : localhost/YourFolderName/YourFileName

link|improve this answer
feedback

I will expand on OZ_ mentioned.

Go Virtual, but use TurnKey You can download and run a complete LAMP system in minutes. And get developing in php right away instead of spending hours or days setting up a LAMP system from scratch or using a preconfigured XAMMP.... With a TUrnKey virtual running you do not have to worry about fudging your own system. It is all pre-configured with Turnkey.

Editor? I always liked a plain text editor. Even just Notepad, but text coloring is nice when you first start out and auto completion. But you should stay away from Word/Dreamweaver, they add so much junk.

link|improve this answer
feedback

Install XAMPP and use it. Its a combo of Apache, PHP & MySQL. You can use Dream Viewer or Aptana Studio.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown