Showing posts with label installing drupal. Show all posts
Showing posts with label installing drupal. Show all posts

Monday, 27 May 2013

Space Hog

http://www.freelock.com/blog/john-locke/2011-10/top-6-reasons-drupal-really-sucks-developer-edition

...teaches me that I'm not alone in finding Drupal a space hog for space cadets who do not pay for their own server space. Apparently this is a bad side to its good side - enough hooks for a knitting machine, each of which can open some memory-based function or other. I also read about its history. Recently a collection of modules which were sometimes supported or sometimes released as a favour to other savvy coders, then transforming into a platform for using Rules and Views modules. I was going to add a picture of a space hog, but that's a distraction and anyway it was mocked-up: the pig did not suffer. Do not send pigs into space.

Space Hog
By the way, why to americans say "sucks" for "bad"? Is this a macho thing? There's a strange convention that you search for X+sucks to find what's wrong with something.

On the same page I discover that a system called Code Igniter with a flexicart add-on is designed for cheapskate shopkeepers who play on their computers. Maybe in a week or two I will find another web page called "why code igniter is bad" (or kicks ass for bums or whatever americans say). Meanwhile there is a Bitnami windows stack of programs to run it so here goes: it should have downloaded by now.

http://bitnami.com/download/files/stacks/wampstack/5.4.15-0/bitnami-wampstack-5.4.15-0-windows-installer.exe?with_popup_signin=1

Oh: an hour later I am still making sense of Bitnami instructions. Apparently Code Igniter is not pre-installed in the same way as Wordpress or Drupal. There is some requirement to understand how these stacks of programs work in order to start it and see what it is, in order to understand how it works. Learning about software by trial and error is slow, sometimes.




Friday, 24 February 2012

Today I learned something new: Drupal on shared hosting OK

Thanks whoever commented on the post below:
  • Overlay
  • Dashboard
  • Context Links (this required by Commerce I think but I can skip the other two)
save a lot of memory if disabled.

Thanks whoever posted on https://drupal.org.uk/node/322
  • Several shared hosts do survive the memory demands of Drupal
  • There's one in North Carolina that specialises in Drupal and one in Purley. The thread attracts some people who want support email or phone support and some who have someone else to pay the bill, so it's hard to compare recommendations.
  • Meanwhile Heliohost.org enable one free account per user if it's active. The server is a testbed rather than a hotbed, with maximim add-ons and minimal constraints but 205 other users - few of them active - which this tool shows on a machine in Sacremento, California, routed via Frankfurt to me here in London.
Thanks to two pieces I've skim-read a bit at the start and still learned from.
  • I discovered caching for Drupal.
    "Shared server - no Varnish, no Memcache or APC" on a "case study disaster" told at Drupaldownunder was the clue. Now I know how a database driven site can be made to work as well as a plain html site: you add a cache so that it becomes almost an html site. I have managed to install Memcache; Varnish might not be ready for novices yet and one called "Boost" requries a snippet of .php added to the settings file. Does this need the opening and closing tags? Best avoided for novices just for a while. Evan as I type this I discover "content delivery networks" from skim-reading parts of the same lecture timetable. If I type ".nyud.net" after the domain part of the host for these apes, they load quicker!
  • I discovered that Drupal doesn't let you delete the settings.php file from a previous installation unless you use an FTP program to do it. Discovered from a blog in Australia - just a glance at the first couple of paragraphs confirmed the problem and its solution.
  • https://drupal.org/node/326504 about scalability looks relevant
So. Lots of little things come right in the world sometimes and I will not try to get a job as a bonobo monkey ape in a zoo.



Tuesday, 21 February 2012

Drupal 7 doesn't work on cheap hosting. (This is a secret designed to annoy people when they discover).

This is the conclusion I have reached after loads of developer videos failed to tell me: they use dedicated servers or their own hard discs.

The problem seems to be memory limits which have risen by mistake for no particular reason. Just as a Ryan Schama talks about "project creep" in his lecture, Drupal 7 has a Server Memory Creep towards needing an expensive host which nobody advertised or planned: it just happened and caught a lot of people out.

For those on the borderline there are three cacheing products

I find this frustrating because I did a bit of research over a year ago, trying to find out how to make a low-magin, loss making business sell more and at the time Drupal 6 / Ubercart was the fastest-loading software and I searched for days to find the fastest cheapest host. Now the calculation is a different one which rules out this host and this whole school of software together, and probably Drupal software altogether. I have spent over a year trying to learn the XYZ thing while shopping carts have forked and re-built themselves. Now I discover that I should have gone with Virtuemart in the first place. Such is life. If you read about an american going crazy and shooting people in a shopping mall, maybe they had just tried to install Drupal. Or maybe it was looking at the awful overpriced stock in TKMAX that did it. One of the two.

What other annoying things are there in life? Youth is wasted on the young? Trades unions let you down when you get an unfair dismissal? Radio station editors don't like news or music? Maybe I should petend to be a Bonobo Monkey and live in a park where zoo keepers will feed me.


Saturday, 10 December 2011

Just in case somebody asks, these are the three ways to install Drupal and reasons they don't work for me. I'm writing this in case I need to brief someone to help.
  1. A one-click install from the control panel of a server.

    (a) Doesn't install the Kickstart version of Drupal Commerce Shopping Cart. This is a bit like a comfort blanket - I think I've learned to do without it - but as the program doesn't work without a lot of tweaking unless you have this installation profile, I'd like to be able to start from the Kickstart version every time I need to.

    (b) Puts too much strain on the server if I need to install extra modules. The program is a bit too big to do this on a middling sized server. So I would have to download it onto my hard disc somehow, do the updates and fixes, and them upload it to the server again. This is in fact what I want to do but starting on the hard disc. It comes to the same thing; I still need to back-up everything to my hard disc, tinker there, and upload again.
  2. Unpack Drupal on my hard disc, follow rather intricate instructions for file transfer to the server, and turning-on a the database to recognise all these files.

    With luck when I upload I get a welcome screen asking questions like "is your database called localhost?" and the thing installs itself. It's a bit of a black art the first few times but I think I've got the hang.

    Unfortunately Drupal 6 could almost work like this but Drupal 7 is just too big, and if I stick to older releases I will be missing-out on a lot of shopping cart modules. When I try to install, the server just says it's out of memory and the helpdesk says this can't be changed.
  3. Unpack a server onto my hard disc - a set of all the programs a server needs - and press the "import" button to import a version of Drupal, which could be Drupal Commerce Kickstart for the first stage of a shopping cart.

    This is the only system that could work and sometimes it does. I have managed once to install Drupal Commerce Kickstart onto a server program called Aquia Drupal Desktop, and from there managed a slightly laborious way of importing the data from its database to the one on my proper server that the world can see.

    Unfortunately my installation doesn't work. It finds error messages in every other thing it does. I guess this is because I should have updated or uploaded a load of files that go with Drupal's database onto the server, and I just deleted them thinking that the ones already there might do. Now I can't repeat the actions which worked in the past for this step three.
Even if I could get the thing installed there would be a bit of work laying-out the site using various layout themes or writing one, and I might be quite accident-prone at that.

A confusion is that installation can work one day and not the next. Why?

If I could re-install a Drupal Commerce Kickstart on the Aquia Drupal installer, make sure I don't delete any related files, and then FTP those files up to the server at the same time I move the database content, that would be an excercise completed. I would know if a mismatch of database and surrounding files is making my test site wonky.

According to Drupal 7 Essential Training - Getting a Drupal site up fast the Kickstarter or Drupal files simply uncompress. I find that they don't and any software like 7zip or Pea Zip or windows XP's own unpacker reports a problem or asks for a password just in case that's the trouble. This stage must have worked for me at least once in the past so why now now?

Update 12/12: the same file dowloads, and when I click on it it opens to reveal a folder called Drupal, which is quite different to a couple of days ago. Clicking on this unzips it with Windows XP's built-in unzipper. Unzipping is strangely slow but it works. Meanwhile the old download file won't unzip and won't delete. I googled the error message and found that some people log-on as administrator to delete such stuff, others like me downlowd a program called Unlocker, which worked. You have to steer past several adverts on Softpedia trying to look like your dowload button so that you download other programs as well, but I managed to skip them this time.

Just as in Tom Geller video on Youtube, I can import the Drupal directory into my Aquia Drupal desktop. I deleted my old one and imported the new, giving it the same file name as the one on my server. And this time I didn't delete all the files in the folder after importing to the desktopy thing.


If anyone is interested in Ubercart video tutorials which are meant to be a quick way to get an ecommerce site online, this is a list of some available:

Transcribed videos: -
[Drupal 7 / Ubercart video tutorial 7 of 10 showed how to use the default catalog module]
[Drupal 7 / Ubercart video tutorial 8 of 10 showed an alternative flexible method of showing a catalog]
[Drupal 7 / Ubercart video tutorial 9 of 10 shows how to use product kits, stock, and order states]
[Drupal 7 / Ubercart video tutorial 10 of 10 shows a simple checkout, reports, and suggests a theme]

Tuesday, 29 November 2011

Importing Commerce Kickstarter into Aquia Drupal desktop.

There is a video by Tom Geller of Lynda.com about this, but I lost it and got a 1 week pass on Lynda.com fo
Installing Drupal Commerce using Commerce Kickstart

The free forever video is http://www.youtube.com/watch?v=rubREehi7qY
Install Aquia Drupal desktop, which no mysteriously works. I remember something about using the Zip version on the right and not the more compressed Tar version on the left of the download page because of a windows bug.

Unzip Drupal Commerce Kickstarter, which is a full version of Drupal with an extra shop bit, and name it something nice like "Two Trees" for a fictional Olive Oil Company in California.
Next, open the control panel of Aquia Drupal desktop from the start menu, and click-about on it till you find an "import" button. It's under settings>Sites>Import.

An "Import Site" form pops-up with boxes to fill in:
"codebase": Two Trees
"database" Click the option to create a new database, and name it Two Trees. A spare box dissapears.
"domain server": change "localhost" to "two trees". Ignore the other boxes under "domain server".



On the video, a Drupal install starts at this point with options of plain drupal or this Kickstarter thing.
On my screen, an error message pops-up reading

"hosts file doesn't exist or is not writable/ 'C:\WINDOWS\System32\drivers\etc\hosts' "

Googling for answers I found one on the linked page:

"Windows only" go to:

Posted on July 19, 2010 - 7:48pm by Ouail E..
"Windows only"
go to: C:\windows\system32\drivers\etc
locate the hosts file, right click it, click properties, un-check Read only, create your new site via the Acquia CP.
when all done, go back to the hosts file and check red only.
should work fine.


 Clicking from the My Computer link, I found there really is a file called HOSTS in one called ETC, and right clicking allows a change to writable from read only.



Bizarrely, it works: a set of Drupally forms appears and a site is set-up. I chose not to install a mail server with the Aquia Drupal Desktop, which could be why there's an error message:
  • Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in DefaultMailSystem->mail() (line 76 of C:\temp\veganline\modules\system\system.mail.inc).
  • Unable to send e-mail. Contact the site administrator if the problem persists.

I will pretend I didn't see that because underneith it says Congratulations, you installed Drupal Commerce!  - and has a link to visit the new site on my hard disc.



The new site wants some updates, and knows where to get them. They download straight into the site which swallows them a lot more smoothly than my Drupal experiments crammed onto shared hosting. Those ones often run-out of memory during an update and need a few goes with the alt-backarrow keys and repeated tries before the update works. This manages all the updates at once without a hitch. Except for updating Drupal Core which is more manual. This is a warning transcribed from the video while I still have a free subscription.


Now for you experienced Drupal folks, I want to show you something very quickly about how Drupal Commerce sets things up. It's a little different from how standard Drupal does things, and that means you have to watch out when you update your site. To show you that I'll go back to my [hard disc] and open up my [kickstart] folder.

INCLUDES
MISC
MODULES

PROFILES
-MODULES  
--ADDRESSFIELD
--COMMERCE
--CTOOLS
--ENTITY
--RULES
--VIEWS
SCRIPTS
SITES

-ALL
--MODULES
---- SITES Now normally in Drupal, all the information that's specific to your site is in this Sites folder here....
--THEMES
--readme.txt
-DEFAULT
-TWOTREES
example.sites.php
THEMES



...it would be in Modules, and then "Modules" would contain the modules, but you don't see them here. This is because Kickstart is a profile: All of the information is stored in 
PROFILES

Now I'm talking about the things that are specific to Commerce Kickstart - the modules, and the way that it is set-up - and if we open this PROFILES/MODULES folder, we see all of this extra stuff. In fact the PROFILES/MODULES/COMMERCE folder contains all the stuff that is specific to Drupal Commerce.

I mention this because if you try to update the site the normal way, by just replacing everything except for the SITES folder, you will actually loose all of your commerce functionality, so be careful about that.


The video doesn't say which other folders to keep. Presumably the PROFILES/MODULES/COMMERCE one.