Why is XAMPP not suited for production? [closed] - php

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have been running XAMPP on Windows 2008 R2 for many years now, I'm only using Apache, MySql and FileZilla. I have made many custom adjustments and upgraded it serveral times. I have addressed all the security issues I have been able to find. Running as services, the servers are never down as long as Windows Server is up. They are incredible stable. Why on earth do people tell me I should not do this? None of the Q or A's I have seen here deals with the specifics, most of them ends up in typically "it's not recommended", "it's says so on the XAMPP web site, therefore it's bad". I understand that you shouldn't use XAMPP out of the box for production because it is not secure. But having changed all root users, using https/certificate instead of plain http, using MySQL users with limited privileges in my scripts, using prepared statements (either PDO or mysqli) in php MySQL queries, catching exeptions, handling errors, protecting file folders and the nitty gritty of php programming I cannot see why I can't continue to use XAMPP for production. I have NEVER experienced ANY trouble. I have settled with the perception that security is not the main problem, there must be something else. Maybe scalability or manageability of large websites with millions of users (which is not my case)? Please tell me, but only if know what you are talking about!
EDIT: I got a noteworthy comment elsewhere:
It's just not meant to do anything more than development and boutique
use. And the opinion based comments tell you why the exchanges tend to
kick these kind of questions off as people who've worked with XAMPP
and WAMP kind of have been there and weren't impressed, but didn't
bother to gather empiric data to back up their opinion.
This is a fair comment, and it might also be THE best answer I will ever get, but it I can live with that. It is great cue for exploring new computer architectures for my software.

Like you say yourself, it's all about security and out-of-the-box, XAMPP is pretty insecure. Apart from that there are no real drawbacks that I can see. The software in XAMPP is regularly used in stable, secure, commercial systems. It takes a bit of knowledge and time to configure XAMPP to become secure enough for production use (and this is the reason why people keep telling you not to do it), but since it looks like you've got it covered there should be no problem.

Though I haven't ever tried to configure windows in that way, I can think of a few problems (other than security):
managing windows and software updates - I find it hard to manage whole windows system through console and I can't imagine managing it in production
performance - (comparing localhosts) linux in my case was always faster
scalability of web apps - majority of apps is set up to work in linux server envirionment, so running or integrating 3-rd party libraries or other apps can be sometimes difficult eg. other paths, calls to console could not work etc.
These problems could be irrelevant in your case, but when developing a bigger project should be taken into account.

Related

Cloud Hosting for PHP - Explain away my fears? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
So I've always relied on more traditional hosting when it comes to hosting my websites - either with shared or dedicated hosting. The time has come (or maybe it came long ago) for me to consider the cloud. But with the cloud come a few concerns (all arising out of my own ignorance) and I'm hoping StackOverflow can put my fears to rest.
While I've heard some answers to my questions in the past, I'm hoping to get enough feedback, and also hopefully provide a valuable resource to any others out there like me.
1) First off - how does it all work? I mean, I get the network of clouds, spinning them up and down as I need it. But until now, I've always opened up an FTP client, connected to my server and uploaded my website. My guess is this all works the same way with the cloud, but how is it all managed? How do I update files and how would I delete them? Would an FTP client suffice for the simple file-management of a website?
2) A lot of shared hosts use PHP4, and allow PHP5 with the right extension - how does this, and all the PHP extensions work? How would I turn on the mod_rewrite extension, for example? How would I select my version of PHP? Can I curl?
3) What about things like cron jobs, or administrating a mysql database? Can I access my database via a phpmyadmin interface, or via the MySQL Query Browser?
4) Lastly, how does the cost really compare to shared hosting? I know it all depends on traffic, so to phrase my question differently, where do the cost lines intersect (if at all?) For example, if I pay $100/month for a dedicated server, and can support 300,000 page visits, or 2-3 page visits per second, what would the cost be for similar usage?
As always, I appreciate the help, and hope it's enough to encourage me to use the cloud. It's so fancy!
I'd vote for Cloud Sites http://www.rackspace.com/cloud/cloud_hosting_products/sites/
I'd imagine the methods used to manage your site (in the case of Cloud Sites) would be very similar to that of your traditional shared hosted with something like Plesk or CPanel installed.
The term "Cloud" is used in many ways... What you describe is more likely a virtual root server - which you can freeze or unfreeze at will (EC2, JiffyBox (Disclaimer: I am not affiliated with any of these :)).
If you have good LAMP/Linux knowledge you do not have to worry about things like mod_rewrite etc. because you have the power to change it to your liking.
If your knowledge about root servers is limited - you can install free/open-source tools like webmin.
If your are not to enthusiastic about running your own server - a managed hosting ist probably better.
Sorry - I cannot comment on the costs.
You should be afraid...very afraid.
For offloading multiple long running tasks, clouds are fine.
However, when every web request to build a page has to go through a boat load of algorithms to find the resource, performance will suffer. (In my limited experience).
Do testing before committing to anything.

Resources to manage a PHP website [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I am a .net developer. A friend of mine is planning to outsource a website. He is getting quotes which are very cheap but the sites will be in php/msql.
At this point he is not having any resource and that includes no development machine, no programmer or whatsoever (he only has some money to invest :)). Now he wants me to get involved in this project and manage the website once the outsourcing company hands us over the application (including source-code).
Till now I have worked with VS / ASP.NET / IIS and VSS. I haven't worked a bit with php/mysql but given google / SO and little time I will be able to manage.
So I need help on identifying:
1: What and all I need on my development machine. Because after the application is handed over to me, I will be responsible to fix minor bugs and minor modifications. For major addition of new features we might go back to outsourcing(same or different company).
2: Anything specific to web-hosting I need to be aware of because ultimately I will be responsible to find host provider and manage the website.
3: Anything that can help me get going fast on php.
Editor: PHPStorm or Eclipse are popular choices.
Test Server: XAMPP which you can install locally on windows.
Version Control: Subversion (choose whichever client and server you find free).
Hosting: I like site5 for cheap shared hosting. Depends on the site's needs however.
Learn phpMyAdmin. It's a simple to use MySQL database administration tool that's already included on most lamp stacks. Allows you to set up tables, run queries, backup, etc.
I like XDebug for remote debugging and profiling. Most major IDEs are integrated with it.
To learn the code, just use the PHP online documentation. It's pretty good.
Make sure you have a similar setup as to what the outsourcing company used. Mainly: OS, Webserver/version, PHP version, MySQL version. Differences are minimal but they do crop up every now and then.
Don't skimp on price. If your hosting plan is cheap you will get exactly that.
Read their code and try to understand it (PHP is very easy to read). If you can't understand it they probably did a very bad job ;)
Suggest hitting godaddy.com for your hosting needs for most small-medium solutions. While it's true that you can host a server in your basement, it's generally more trouble than it's worth; you can buy a domain name and a year of hosting for a hundred dollars and save yourself dozens of hours of headache and downtime. While there are places that will host your site for free, a lot of times you get what you pay for.
Once the site is developed it's a (relatively) simple matter to copy-paste the site files and database; your outsource company can probably deploy their product to your godaddy server in a matter of minutes.
For your dev machine, I recommend Eclipse with the PDT plugin as your editor (download the "php version" of eclipse). I strongly recommend svn or some other source control. It's very useful to have apache and mysql installed on your dev box along with your site and db so you can test changes locally. When developing, it's good practice to test on at least IE, firefox and chrome as they're the most popular browsers at the moment.
php.net is the equivalent of the java.sun.com/reference/api/ and is searchable by function name. It also has a manual; start here http://www.php.net/manual/en/ but for small edits, if you're familiar with any c-syntax language and html you shouldn't have a problem. Just don't forget your dollar signs and semicolons.

How to manage my project? (Souce code control, production server/developing sever) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
i'm in a small team right now. We have two developers. We are developing PHP web applications. Now we have two servers. One is production server, the other is developing server. Usually my work-mate and I worked for different part of the project, but sometimes, we changed the same file. There was a source code version problem. As we are very small team, is there any light-weight version control strategy for us? We use different developing tools. I use VIM and my work-mate use Dreamweaver. Is there any source code control system support those editors?
Another question is how to control the synchronization between develop server and production server? Now what we do is just use ftp upload the files that we just tested on the
you have github(maybe by private account, because github is just amazing!) in your tag so I should suggest to just learn git(Command-line). It is the best in my opinion. One of the nice features of git is that it is distributed. I also bet if you search hard you could find plugins for both editors(like I did quickly):
git for vim.
git for dreamweaver.
But I would just use cli instead because it's power is just amazing.
As far as version control goes, Subversion is a popular choice, and easy to set up in my opinion. Looks like it can be integrated with Dreamweaver beginning with CS4, as well as VIM (although I don't have any direct experience with either of those plugins). Even without direct integration it's easy to use from the command line. I'm a big fan of RTFMing before digging into anything new, so the fact that the O'Reilly Subversion book is available as a free PDF on their website was a big plus for me.
For coordinating the move from development to production, my personal advice would be to automate as much as you possibly can - I've seen cases in which the migration is handled by a human with a checklist, and human error always seems to creep in eventually. If you're most comfortable with PHP, and you primarily access your servers via FTP, you could use PHP's FTP functions to automate moving the tested code from the development server to production.
Scenario : you can install subversion on production and developer server
Use svn and i suggest you add messages like +) for added stuff, -) for removed if that happen, o) for fixed bugs. This will help you latter.
Do commits as offen as you can
If you are not familiar with Tags and branches in SVN, just do the list of files that you are going to update on live server.
go to Live update.
Scenaria : you can't install subversion on production server
create a separate "live enviroment" on developer server
update it, when you see all works use any kind of FTP, SFTP to copy it to live server
Good luck
For version control almost any modern open source version control software will do,
For starters there is Subversion, mercurial, bazar, git. If you've never used one before I would recommend giving them all at least a quick look over to see what you like. My preference is git but the rest are all easy to use (ish). Most have companies that provide version control as a service (so you don't have to gaff with managing software yourself)such as github, launchpad, etc.
All have their benefits and downsides depending on your working style and project.

Version control for PHP Development [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I have been hearing a lot about the advantages of using a version control system and would like to try one. I was doing freelance web development in PHP for the past 2 years, two months back I hired two more programmer to help me. I will be hiring one more person soon. We maintain 4 websites, all of which are my own, which are continuously being edited by one of us. I learned PHP by myself and have never worked in any other firms. Hence I am new to version control, unit testing and all.
Currently, we have development servers on our workstations. When we edit a particular section of a site, we download the code for that particular section (say /news/ or /movies/ or /wallpapers/ ) from the production server to the dev server, makes the changes locally and uploads to the production server (no code review / testing). Because of this, our dev server is always out of date from our prod server. Occasionally, this also create problem when one of us forgets to download the latest copy from prod and overwrites the last change. I know this is very very foolish, but currently our prod server is the only copy that has all the updates and latest changes.
Can anyone please suggest which is the best version control system for me? I am more interested in distributed version control, since we don't have a central backup for all our code. I read about Mercurial and Git and found that Mercurial is used in several large open source projects by Mozilla, Sun, Symbian etc. So which one do you think is better for me? Not only version control, if there are any other package that I can use to make my current setup better, please mention that too :)
It sounds like Git can accomplish your goals quite well. As it's distributed, it's excellent for working locally since you can perform most operations (commit, revert, diff, patch) without connecting to a central server. You can also avoid that ugly moment of someone pushing new code to production while someone else is working on it, and then having the complicated task of merging those two versions of the code together (git provides a useful tool for doing this called rebase).
You noted there's some big projects using Hg (Mercurial), but there's some pretty big ones using Git, like the Linux Kernel, X.org, Android and Debian.
I use git for all my sites: it's lightning fast, efficient, and easy to use.
Edit: If you want to get into using Git, I'd recommend doing some reading before jumping right in. Starting off on the wrong foot can have some terrible implications later on. If you follow an Agile Workflow, you might want to check this out. Here's a website I learned most of my Git know-how from.
Version control is an incredible tool even when you're working alone, and when you are working with someone else it's indispensable. I would recommend using git. It's very fast, has a really great set of available tools, and of course has github.com. Mercurial is basically just as good as git, but it runs a little slower and doesn't have github.
For why to use git, please read http://whygitisbetterthanx.com/
Here's a nice-looking tutorial on getting started with git: http://www-cs-students.stanford.edu/~blynn/gitmagic/index.html
You can use SVN, Git, Mercurial.
The biggest challenge is having everyone be disciplined in using version control and not getting lazy.
Definitely Mercurial. Although you can use either Git or SVN, Mercurial is better for two reasons:
Vs Git: Good integration with Windows.
Vs SVN: It's distributed.
If you don't want to run yourself a Mercurial server (which is pretty easy anyway), there are many services available. Kiln + FogBugz is an EXCELLENT combination. There's also CodeBaseHQ (also supports Git and SVN), Bitbucket, and many more.
Before you jump onto it I strongly recommend you read at least Joel Spolsky's tutorial, but I strongly recommend you also read Mercurial: The Definitive Guide.
I am sorry, I had no intention of starting a DVCS holy war. I am going to try Git.
Yes, version control will help. To get started, I see two important issues for you:
hosted or self-managed? Do you want to host this yourself on a server, or want a service to take care of it for you? There are reasons to go either way, but if you're not that into managing the server look for a hosted option.
SVN or Git There are others, but these are the top open source contenders.
Pros and Cons (my opinion):
SVN: Good tutorials and fairly easy to get up-to-speed with. The training requirement is small (I've done a bit of it). SVN works really well with a co-located team, lots of projects, etc. With a limited number of branches (you may not need any), it is solid. There are plenty of integrations with other tools.
Git: Getting started can be a little rougher than with SVN. Some of the docs are good, but lots are geared assume a rather thorough understanding of the internals. Once you get the hang of it, it has great flexibility, but I've seen almost everyone who has started with it really stumble when beginning. Even after working with it for months, people debate the best patterns to use. It's really sweet for 1-person projects (where you want to track history), and for distributed projects like GitHub. I use Git even for small co-located teams, because I enjoy the speed and flexibility.
Given what you say about your team, though, I'd probably recommend trying SVN. There will be better resources to help you get going, and you'll be less likely to get frustrated with it.
Hope this helps.

How to drop WIMP for LAMP [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Does anyone have an example of something that can not be done on a Windows2000 server using PHP5?
UPDATE: Just to clarify, my problem isn't with IIS, or that I'm an "only open source" kinda guy. It's that the hosting is a terrible package across the board. The storage and bandwidth are ridiculous, there's no control panel so in order to do anything, even something as simple as setting up a cron job, requires contacting tech support, who grumbles about having to implement it and also seems to operate on the same timeline as the people on the island in lost.
Why not just tell the client I hear you ask! Tried it and failed. The hosting company isn't a hosting company, it's a friend of the client and nothing I say makes a blind bit of difference. I know my client is paying through the teeth for a hunk of crap but they just wont listen. On top of that, I've had to make some minor, but fundamental changes to the code base to adapt to the servers funky set up which means I now have to maintain two code bases. My development version, and the live version. it's doable, but it's wasted effort and on a tight deadline, I have better things to do with my time.
The only way I'm going to get my client to "do the right thing" is to come up with something that wont work because of the server. If not, I'll finish the job, upload it, wash my hands of it then never touch it again because it's more hassle than it's worth. I don't want to do that because I like to take pride in my work, but I will not waste my time compensating for a lazy ass server admin who really couldn't care less wether things work or not and I also wont take the blame for them either. This is my last ditch attempt to get help out a client who doesn't want to be helped. Maybe my title was misleading but I didn't want to bore everyone with the details, I just needed an answer and thought WIMP for LAMP would be the quickest way to ask. Moving to another WIMP environment wouldn't bother me, but as you can see, that's not going to happen.
On IIS 6, which ships with Windows 2000 Server, PHP will run as a CGI ... Therefore it can accomplish anything that it can do on a *nix server under apache. You must also have the supporting extensions and services installed like MySQL...
Its not a good practice to blame the technology for a mistake which is made by your client.
Explain your problems to the client (Again and Again)
Charge him more and tell him that's because of the problems you faced
Deliver the project late (Inform him earlier) tell him that this is because of the poor support from the hosting.
Find a better and cheap hosting and show the comparison to your client.
If nothing works!! QUIT! :)
It sounds like your team are using Windows, and you are an open source fan who wants to switch the Linux/Apache but don't have a good technical reason. So you are fishing here.
My comment would be that if you don't have a good reason yourself, why not stick with Windows. If you do have a good reason yourself, argue that good reason that applies to your project. Each technology has it's own advantages and disadvantages, and both are used successfully in production.
Of course, if I've misread the situation I apologise - can you edit your question to explain the situation better.
It might be hard to find a good systems administrator that knows IIS and PHP inside out.
I assume you aren't currently taking advantage of Apache's mod_rewrite utility. That's something that you can't quite do on Windows (you can, but it's a bigger job even with the latest routing / REST)
This would be a very strong case if they want restful URLs, which are often cited as good for search engines!
Other than that, charge more. If you're on a fixed rate, explain your reasons for not being able to meet the budget and quote for the additional work. These problems are usually generated by an unfair price (i.e. unfair on you in this instance).

Categories