Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP website, should I develop into a Linux distribution instead of Windows?

In few months I start a project in PHP and I am hesitating to do like usual : develop on my Windows Vista 64bits machine. Since I know few things on Linux, I think it can be a good way to learn by working on a Linux distribution.

Do you think it's a good idea or not? I would run a VirtualBox with Ubuntu (on my Vista64bits). I was thinking to install XAMPP to be able to develop in PHP.

If you think it's a good idea, feel free to suggest me some tutorial about what I should know with Virtualizing an OS, or Linux/dev.

Update I have build many website in PHP with Windows, the question is more about if it's a good way to start learning Linux by developing on it via a Virtual machine? I have 4 gigs rams, will it be smooth if I install Eclipse in the Virtual Machine? etc.

like image 322
Patrick Desjardins Avatar asked Oct 06 '08 17:10

Patrick Desjardins


3 Answers

You should really develop on the same platform where you are going to deploy. I'm not saying it is bad to do differently, but it can save you some pain in the long run. OTOH, you might learn faster about platform differences that way. So, the main question is: do you want to have a production system running ASAP without much headache? Or, you want to spend some time and make some effort to learn how to develop cross-platform stuff?

And yes, there are differences. For example, case sensitive and case in-sensitive filenames. Then, some PHP functions use native C functions that have different implementation. For example, printf() does not produce the same amount of whitespace for some of the types. Resolution of time measurement (milliseconds vs microseconds) can be different, etc. Then, you have different ways filesystem permissions are handled. These are just some recent problems I've found that I can remember off the top of my head.

like image 176
Milan Babuškov Avatar answered Nov 03 '22 15:11

Milan Babuškov


PHP should be the same on any platform - so where you develop shouldn't matter.

However, in my experience and observation,more sites running PHP are running on Linux than Windows.

Getting Apache and PHP setup on something like Ubuntu or Fedora is a cinch, and testing everything is pretty simple, too.

Also, when you go live with your site, what platform will it be running on? I prefer to do development on the platform it will be running on whenever possible.

like image 36
warren Avatar answered Nov 03 '22 16:11

warren


Personally, I don't think that for local production you should be using a VM. Would you be running your IDE inside the VM too?

If you are aware enough of the pitfalls of moving between Windows and Linux environments (such as case sensitivity and permissions), you should have no problem developing on Windows and deploying on Linux.

like image 45
Eran Galperin Avatar answered Nov 03 '22 15:11

Eran Galperin