For dev purposes, is it better to install XAMPP or Apache MySQL & PHP from the repository?
2 Answers
It depends on what your productive platform looks like. If your productive system runs for example PHP 5.2 and you develop your app with some feature that requires running 5.3 you'll run into problems when you deploy your stuff.
My developers tell me that they want their development environment as close as they can get to production so if the stuff the write runs on their machine, it sure as hell does runs when it goes live.
If on your live server you run LAMP from the distro than you'll have the least problems if you do too (also, try to use the same php.ini / httpd.conf / my.cnf settings if possible). Mixing stuff in dev and production almost always leeds to trouble.
![](../../users/profiles/42007.webp)
- 21
- 2
A couple of advantages of using XAMPP for development over a true LAMP install:
- You can start and stop the whole webserver+database stack with one command.
- XAMPP is portable so you can carry it around on a thumb drive.
- The security settings are strict by default, nobody but you will be able to access the web server.
- Php error reporting is enabled by default, which helps when debugging scripts.
You didn't specify what kind of production server you are deploying your work on. If it is also Ubuntu, it could be interesting to mimic the production server by installing the Apache, MySQL and PHP packages from the repositories for development.
Should you go that route, I would recommend turning on the php error reporting for debugging purposes on your development server. Which, again, is something XAMPP does by default.
![](../../users/profiles/49297.webp)
- 8,925
- 3
- 41
- 58