views:

396

answers:

17

I am planning on teaching myself PHP. I was wondering if I should use LAMP or a Microsoft stack. I have access to both. I would like to know which will ultimately be easiest to learn, but be the most relevant.

+6  A: 

I wouldn't say either stack makes it easier or harder, since PHP is just the language. I would say that a LAMP/WAMP pre-made installer will get you going faster since it will do all the setup work for you. On the other hand, if you're interested in learning how to set up the web server to use PHP, and how to get the items in the acronym talking to eachother, you might opt to go the manual route.

byte
http://www.wampserver.com/en/
Matt Briggs
A: 

If you're just trying to learn PHP, then it doesn't really matter which one you learn on. There are differences, but they are edge cases. I prefer to develop on a Windows box, so I use WampServer, which makes it very easy.

mgroves
+11  A: 

XAMPP will get you up and running fast on either Linux or Windows.

Andrew Hare
I would second XAMPP. Makes it all so easy.
Xetius
+1  A: 

If you are planning on learning PHP in a windows environment, I would highly recommend WampServer, it's what I use for my full-time development environment, and is extremely easy to set up (just install one .exe) and configure. It includes Apache, MySQL and PHP.

tj111
+2  A: 

If you are concentrating on learning the PHP language itself, then the overall architecture doesn't really matter. However, PHP is often used in LAMP or other Linux-involved stacks.

PHP home page is the best resource for learning PHP.
Stackoverflow is also another resource for specific PHP programming questions. :)

bLee
+1  A: 

You can interchange a lot of components in a LAMP stack, since you want to focus on coding, I would choose an environment your more familiar with. But I would say the most important relationship in terms of ease of coding is mysql with php.

SeanDowney
+1  A: 

LAMP is inherently more flexible (there is just more support for it, in my experience) and will probably get you started faster. However, for speed of development, it doesn't really mean that much, as PHP is the language regardless. Unless you have to do some kind of OS-specific operation, the only difference will be the few hours/days that it takes to get a server set up.

Jason
A: 

If your intent is to learn/develop PHP, whether or not you use an MS stack is irrelevant. If you want to live in MS windows rather than linux, just replace LAMP with WAMP -- they both serve the same "Apache, MySQL, PHP" stack -- just under different OSes.

anushr
So much so that I got AMP rolling on Windows XP first, but ignorantly called it LAMP for months. Later I harnessed Ubuntu the same way. Based on that experience, I say the IDE is what matters.
Smandoli
+1  A: 

If you're working on Windows, XAMPP is a slightly better option than WAMP.

Humberto
Not that I agree or disagree, but could you explain why this is so? I use Wamp because it's company standard.
Erik van Brakel
No technical excuse, I just found it to be a bit easier to use!
Humberto
+4  A: 

If you're comfortable with any OS other than Windows, you will be much happier in the long run to have learned PHP on it. PHP on Windows is quite easy to install today thanks to XAMPP but it is still inferior.

Various things work slightly differently than you except (through no fault of PHP) and extensions are both fewer in number and harder to install without PECL.

In addition, the under-appreciated interactive interpreter (php -a) doesn't run on Windows. However, phpsa might be an acceptable alternative for you if you're comfortable also installing Python on Windows.

pr1001
Until not so long ago you could download an archive with win32 builds of many pecl extensions from php.net which made it almost easier to "play" with the extensions on win32 than on linux. Currently no new pacakages are relasesed though.
VolkerK
A: 

You ask about relevance, and for this reason, I think you should go with a Linux-based stack. Not because Microsoft isn't relevant, per se, but because Linux much more likely to be the environment under which you'll deploy any PHP applications you write. You can learn PHP just fine using either stack, but when it comes time to deploy your applications, familiarity with the Linux stack can make that process go just a bit more smoothly.

Of course, if you know ahead of time that you'll probably use a hosting service that uses a Microsoft PHP stack, then that's a better choice for you, but my guess is that's unlikely. Go Linux.

Alex Basson
A: 

Since your a windows guy, I'd say use WAMP .

djangofan
I am actually an Ubuntu guy. I am learning PHP on my own. At home I have a dual boot machine with Ubuntu and Windows. I could easily go either way. I was looking for the one that would be the easiest to set up and get working right away.
Molex
+1  A: 

If you want to learn PHP, I'd say use whatever OS / Stack you feel comfortable with.

When you get to know PHP better, it'll be time to enlarge you horizons, and have a look at other OSes (Windows/Linux/Mac), Database engines (MySQL/SQLite, PostgreSQL, ...), Webservers (Apache/IIS/Lighttp, nginx, ...), ...

Of course there are some differences between platforms (one of which, between Windows and Linux is case-sensivity for files names ; maybe the most disturbing when you've been working on windows for all your life and suddently have to deploy an application on a Linux server ^^ ) ; but there are not that many, and you probable shouldn't focus on those before knowing at least some basics about PHP.

To begin, something like WAMP should be OK ; after some time, maybe you'll switch to Linux ; you might event compile Apache+PHP+MySQL yourself (interesting experience btw) ; you'll learn more and more ; but don't rush things :-)

Pascal MARTIN
+3  A: 

Zend (the main company behind PHP) provides Zend Server community edition. It's a free installer that sets up the entire PHP stack, and provides a web-admin interface. It's optimized for reliability and performance (even on windows). It's not half-bad actually. There are installers for linux, windows and mac.

http://www.zend.com/en/products/server-ce/index

Plus, it bundles zend framework, which is a pretty good choice framework-wise.

It's not bad to deploy on either. Very powerful troubleshooting tools in the commercial edition. Pricy though.

Joeri Sebrechts
+1  A: 

I always liked WAMP server if you go the route of the Microsoft stack: http://www.wampserver.com/en/

Jefe
+1  A: 

Debugging can be tricky and the best advice from me is to mirror the production server environment as much as possible (db content, setup, filesystem the lot)

I pretty much develop on a production grade webserver, with slightly higher logging, oh yeah logging, much better in Linux than windows.

You can also add Linux experience with php on your CV =)

Have fun.

Question Mark
+1  A: 

to install in Ubuntu:

sudo apt-get install mysql-server apache2 php5 php5-gd php5-mcrypt php5-mysql libapache2-mod-php5 mysql-query-browser mysql-admin

I would also recommend highly svn or git for keeping track of your code, might be too much too soon but personally i can't think how i got by without it.

Question Mark