Anjanesh

Assignment Statements, Comparisons & Observations
Font: Size: + -
Showing posts with label webhosts. Show all posts
Showing posts with label webhosts. Show all posts

Web Hosting Solutions for Web Developers

Saturday, June 29, 2013

There are tons of hosting companies for web developers.
There are many that provide VPS-like solutions.
But there are a few good ones for developers wanting more than the standard LAMP setup and a Fantastico script.
Here we'll look at a handful of the ones that have proven to be good enough.

Webfaction

This is a semi-VPS where you can install your own tools / software as long as it resides in your home directory. Supports Python, Ruby, PHP out-of-the-box.
Plan starts at $9.50 a month for 100GB disk space.

Linode

A fully-fledged unmanaged VPS that has been in the hosting space for quite some time now. Developers normally compared Linode with Slicehost, another great unmanaged VPS before it got acquired by & merged with Rackspace.
Plan starts at $20 a month for 24GB disk space.

DigitalOcean

This is one of the best places to start out for newbies who want to full root-access at a low cost. Its an unmanaged VPS where you can setup your own Linux distro with whatever software you want. Oh - and it may offer the choice of a datacenter in India.
Plan starts at $5 a month for a 20GB SSD disk space.

Amazon AWS

A proven product, if you want scalability & reliability. Some of the major websites / services like Reddit, DropBox, FourSquare, Netflix, Zynga use Amazon AWS. Amazon AWS EC2 is the virtual dedicated hosting service.
Amazon AWS provides a plethora of other services like S3, etc.
You still need to maintain the server on your own - Amazon won't do it for you. Moreover you've got to have sys-admin skills to handle an EC2 instance.

Google App Engine

Google's servers ! That's the best part. Scalability. No worrying of backups, server maintanence, server going down etc etc.
What's the worst part ? It's not the standard setup you get with other providers which provide (S)FTP, SSH etc.
Configuration is done using a file named app.yaml. Everything else is almost custom based.
This is PaaS - Platform as a Service hosting solution and hence you can't go about installing your own software. Instead it provides a wide range of options and custom solutions. Currently Python, Java, Go and PHP are the languages supported.

Others :

Uploading and Extracting files without Shell Access on a Shared Host

Sunday, September 28, 2008

The easiest way to upload a large number of files to your website hosting server is to zip the files first on your local PC, upload the zip file to your hosting account and then use a shell command like unzip to extract. Unfortunately, most shared hosting environments don't provide shell access due to security reasons. But from a business perspective, users who require shell access access would be really requiring a custom setup on a dedicated server.

But if you have an entire directory of files to upload to your shared hosting account, there is still a way to extract the contents online using a simple PHP script. For this to work you got to have PHP 5.2 or later enabled.

<?php
if (isset($_GET['f']))
 $file = $_GET['f'];
else
 die("arg 1 required");

$zip = new ZipArchive;

if ($zip->open($file) === FALSE)
 die("Failed to open $file");

if (!$zip->extractTo('.'))
 echo "Extract not successful";
else
 echo "Extract successful";

$zip->close();
?>
  1. Zip the folder on your local PC using WinZip or whatever (say sample.zip).
  2. Upload the zip file sample.zip via FTP to your host (say in temp folder).
  3. Upload the PHP file unzip.php to temp folder.
  4. Enter in your browser the following address http://mywebsite.com/temp/unzip.php?f=sample.zip
  5. If you look in your host server's temp folder, you should see the contents of sample.zip extracted.

DAOne issue you would face is the owner permissions of that extracted directory. Since the extract part was done by a script, the owner of that folder would be apache instead of your username. The only workaround of this is to login to your web control panel, browse files and reset ownership of that folder. For example, in a control panel like DirectAdmin you could just Browse for files and click on Recursively.

What to look for when looking for a new shared host

Friday, July 20, 2007

There is a multitude of web-pages on the Internet related to web-hosting in specific. There are umpteen number of questions, opinions and reviews on web-hosting companies and its various issues. It is impossible to come up with a definite answer - only experience can tell what & which one is best for you. The criteria is mainly based on what audience base your website is targeted at. I cannot possibly make a post on comparison between web-hosting companies. This is one subject that can really drown you - get involved in WebHostingTalk if you're really interested.

When I'm looking for a linux shared-hosting solution for a future non-static website that I intend on developing, there are a couple of points I look out for when browsing through the package-plans' features :

  1. PHP 5.2.x - PHP4 is on its way out - on 13th July 2007, php.net officially announced the PHP 4 end of life announcement. With PHP 6 on the way, its high time new php-projects are written in PHP 5. Moreover, with the new OOP model (inclined towards Java and C#), frameworks are better off in PHP 5. Also, something known as phar has sprung up. Its on lines with Java's WAR format where you can distribute your application as a single archive file - though this is yet to be fully implemented.
    As for specifically PHP 5.2.x - many changes were introduced from ver 5.1.0 to 5.2.0 - there's even a migration documentation from 5.1.0 to 5.2.0 ! One of the major additions are the JSON and ZIP (using zlib). The JSON extension bridges a big gap - you can now create javascript JSON variables directly from php arrays !

  2. MySQL 5.0.x - Stored Procedures, Triggers, Cursors, Views etc which are actually very handy once you get to know to use them. These are available by default in PostgreSQL and MS SQL Server. Four years ago, when my friend was into ASP .NET development and MS SQL Server, he mentioned how stored procedures saved a script-development time. This would be at the cost of using more database resource, but its something we MySQL guys are pretty late into. Another introduction is the maximum length of VARCHAR data-type from 256 to 65,535. Very often I wanted to set the maximum length to 1000 characters and there's no solution to do this in versions 3 and 4 except to make them of TEXT type. The drawback of this was that TEXT fields can't be indexed, which is something I can't settle for. Indexing is important for faster queries even if it requires a whole lot more disk space.
    For example, if I had a field named `URL`, I would want it to set it to atleast 1000 characters variable length. Many URLs are bound to be more than 256 characters. And URLs can really be INDEXed or even UNIQUEd.

  3. Apache 2.0.x - Apache 2.0 has a whole lot more to offer than Apache 1.3. But the only thing I'm interested in is the RegExp part of mod_rewrite which offers more pattern syntax characters like ? (extends the meaning of) character.

  4. SSH - command-line shell access is something developers are more comfortable with. Period.

  5. Control Panel - Only a couple of them are common - either CPanel, Plesk, DirectAdmin or an in-house one. I don't have a preference, but Plesk has the option of changing DNS settings.

  6. (Optional) PostgreSQL - Sometimes, PostgreSQL can be better off then MySQL - you normally PostgreSQL available on hosts providing Plesk, as a lot of other features come with an additional Plesk addon (Plesk Expand) and PostgreSQL support is one of them.

  7. (Optional) mod_python, mod_perl - Perl and Python are enabled by default on most hosts via CGI. For developers, developing on linux PCs, this won't be an issue, but those who develop linux based stuff on Windows will have the problem of constantly updating the shebang-line for each time to upload to update the script. This can be a major headache if VIM is not comfortable enough or too slow to edit on the server side. People who code in Perl wouldn't want mod_perl anyway. When it comes to Python, since Google has the Python creator as their employee and since most of their scripts are based on python (obviously), there are some useful scripts provided by Google that are distributed in Python code. One of them is the Sitemap generator.

  8. Support - and of course, impeccable support - something you should test before hand by asking a couple of smart questions and judging them and also reading reviews of the company. This probably the toughest part, but when you're investing in hosting, allow yourself to estimate that half of that investment goes for support while the other half is for features.

Maybe the reason why many don't do an extensive search for Windows hosting requirements is because there are just a couple of things required enough to built a robust dynamic web-application on Windows :
IIS 6.0 + ASP .NET 1.1, ASP .NET 2.0 and maybe even ASP .NET 3.0 + MS SQL Server 2005
Within a year, it would simply be IIS 7.0 + ASP .NET 2.0, ASP .NET 3.0 and ASP .NET 3.5 + MS SQL Server 2008 !
No doubt that Windows cannot get any simpler than this ! The de-facto standard for web-apps on Windows is C#. And Windows does rock - but its the linux ones that are of low-budget and hence affordable amongst individuals.

Recommended Webhosting Solutions for Indian Individuals

Thursday, January 18, 2007
I've been with a few web-hosts over the last 3 years. Opinions on web-hosting companies will always vary from one individual to another based on a million factors. If you want to swim in the ocean of web-hosting discussions/opinions/views/comments/experiences dive into WebHostingTalk (WBT) - You can't find a better place to research. Here is a list of low-budget quality shared web-hosting solutions that I would recommend for Indian individuals, startups, students, experimenters and developers who want to build a small or medium size dynamic website. I use the first two for my personal websites. The others I've been on, were either my clients' or friend's. Theres no rating and all that - just good ones IMHO. ASmallOrange This is one provider that probably has 0 negative reviews at WBT. The guy behind this, Tim Dorr, has been upfront on everything. The best (and probably most attractive) part of this is that there are only 2 limits on their schemes - space and data transfer. Everything else is unlimited - additional websites using the same package, unlimited FTP users, MySQL databases, subdomains, parked-domains etc etc. For $25/yr for 75MB space is an excellent place to start your site. Upgrading for more space and bandwidth at a later stage is just a matter of extending your limits. Their support team has been prompt on service and even customizes your shared space to your needs on request. For example, SSH is available on requesting for it. I asked to enable whois and on giving the reason to use whois, it got enabled - as long as it does not violate any TOS or abuse the whois server. ASO does look like a soft target for the wrong kind of people though. I don't know how they intend to prevent that. Trust over long-term customer relationship ? Missing : Support for other databases like PostgreSQL
Padberg-ITThis German host did not really receive a very good name at WBT when U2Mike got sold. U2Mike customers were frustrated over the move for various reasons, but the one thing that they were totally pissed off about was that control panels got changed (from DirectAdmin to Plesk) when Padberg-IT's owner decided to get the customers to move all the websites to his server and thrash U2Mike's since he felt the latter were not profitable. Anyway, thats history. What I like about this host is that they keep updating their software version to the latest. Current PHP version running is 5.2.0-7. Even though Peter gave one month notice, non-developers wouldn't have been happy when PHP 5 replaced version 4 long ago. Recently, MySQL got upgraded to version 5.0 was another great move. Also: Apache 2.0, Tomcat 4.1, Firebird/InterBase Support, PostgreSQL 7.4.7, Shared SSL, Apache ASP support, mod_perl, mod_python, fast CGI. For 1GB webspace + 1GB email space at $46 for 2 yrs, this is really a good deal esp for web-developers. Now, the biggest downside is that they update so often that almost every month the tech-guys spend hours updating and as a result the site is down for a couple of hours every month - though I've not faced critical downtimes so far. I've noticed that they've always been very tight on security. And their German to English email-translations is not all that good. This is recommended to only those who are really into web-programming and not blindly dependent on a CMS. If use using a 3rd party script, make sure you know how to tweak it to make it work on PHP5 or get the PHP5 equivalent. Missing : SSH
WebStrikeSolutionsMy friend, who runs his own firm has a number of sites hosted at WebStrikeSolutions and won't even budge from this one. I've seen that their service is of really high quality and provides both Linux and Windows hosting. The costs are a bit on the high-end at $84 a year (or $66/yr for more than 1 website using the same account) even if you intend to use only 100MB of web-space. [ The 1st year's charges are only $30 ] Provides PHP5, MySQL, JSP, SSL, Perl 5 and ASP .NET 2.0 (for the Windows box). MS SQL Server is at an extra cost though they could've included MS SQL Server 2005 Express for free. The Aussies behind this are real good techies so tech support won't be an issue. They have their own in-house control panel which is good in one way as they control the scene. Recommended to .NET developers, or who got clients who require windows-web-applications or really needs that much space and bandwidth. Biggest downside : Just a single pre-defined package for all.
The Site PeopleIf you ever wanted a small single dynamic website and with limited resources, at $20/yr for 500MB space, this should be your best bet. They use RHEL 4.0 OS and their rest of their schemes have unlimited features (except on space and bandwidth) like ASmallOrange. If you're looking to host a lot of websites which requires more space than ASO, this is a better option. But if you're sites gonna be resource intensive, any host will kick you out from a shared space. In such a case, ASO's move to their VPS would be smoother. Both ASO and TSP have very similar features including RubyOnRails support but I would say TSP is best for non-techies and ASO for developers. The best part of TSP is their low-budget reseller plans ! Missing: VPS, Dedicated