Wednesday 14 December 2011


Something is not quite right.

I know that options two and three on my last post overlap; I do not know a nifty way to make a desktop installation turn into a server-hosted one without the use of file transfer with a program like Filezilla.

Drupal being Drupal, there is also a question of where to put certain modules which are packed in an installation but may be better put in a sites/all/modules/ folder (not the "modules" folder: that would be too easy). Looking at the error message below, there is probably still more to learn. 


Requirements problem

Error message

  • Warning: opendir(./profiles/commerce_kickstart/modules/addressfield) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(./profiles/commerce_kickstart/modules/commerce) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(./profiles/commerce_kickstart/modules/ctools) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(./profiles/commerce_kickstart/modules/entity) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(./profiles/commerce_kickstart/modules/rules) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(./profiles/commerce_kickstart/modules/views) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/addressfield) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/commerce) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/ctools) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/entity) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/rules) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/views) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/addressfield) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/commerce) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/ctools) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/entity) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/rules) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/views) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/addressfield) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/commerce) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/ctools) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/entity) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/rules) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
  • Warning: opendir(profiles/commerce_kickstart/modules/views) [function.opendir]: failed to open dir: No error in file_scan_directory() (line 2026 of C:\e\veganline\includes\file.inc).
OK
Web serverApache/2.2.17 (Win32) PHP/5.2.17
OK
PHP5.2.17
OK
PHP register globalsDisabled
OK
PHP extensionsEnabled
OK
Database supportEnabled
OK
PHP memory limit128M
OK
File systemWritable (public download method)
OK
Unicode libraryPHP Mbstring Extension
Error
Required modulesRequired modules not found.
The following modules are required but were not found. Move them into the appropriate modules subdirectory, such as sites/all/modules. Missing modules: Addressfield, Ctools, Entity, Entity_token, Rules, Rules_admin, Views, Views_ui, Commerce, Commerce_ui, Commerce_cart, Commerce_checkout, Commerce_customer, Commerce_customer_ui, Commerce_line_item, Commerce_line_item_ui, Commerce_order, Commerce_order_ui, Commerce_payment, Commerce_payment_ui, Commerce_payment_example, Commerce_price, Commerce_product, Commerce_product_ui, Commerce_product_pricing, Commerce_product_pricing_ui, Commerce_product_reference, Commerce_tax, Commerce_tax_ui
Check the error messages and proceed with the installation.

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]

Thursday 8 December 2011

Idea: upload the .php files by FTP.  Simply find the ones for the Aquia Drupal installation on my hard disc, and upload them. Would that stop the error messages on the server version of my site?

Problem: I can't find the files on my hard disc.
  • I tried logging onto the site. It shows on a browser as http://sitename:8082/  
  • I change something a little. I log out and search all the files changed today, in date order. Only MySQL entries have changed.
  • I go back to the site in the browser, press control+U to view source, and copy the name of a file to the clipboard. It is /themes/bartik/css/layout.css . Then I search for that file on my hard disc. Not found. It is a ghost.

Saturday 3 December 2011

Uploaded a database! 

I used "import" from a phpadmin screen on my server.
Initially I couldn't tell what sort of thing to import; the database on my hard disc had a load of files, but "export" with an option of .sql or .csv was a clue. I exported to the desktop.

My server already has an installation of drupal so the files were already on the server.

Several tweaks to get the server database to accept the one on the hard disc.
  • I had to give the one on the hard disc the same file name as the one already allocated. My host only allows one database per user which might be a reason for this.
  • I had to look at a screenload of database files on the server's phpmyadmin screen, scroll down past the bottom of the screen to find a way of selecting all the tickboxes, then choose delete from a dropdown menu. Textbook writers would probably found some way of saving the old work first.
  • The new data works with complaints and error messages about every third click about this thing changing or that thing not available. phpmyadmin also has a "repair" option for all ticked boxes, which I tried using, possibly in a way that helped.
  • I don't know what all these errors and grumbles mean. One is about keeping temp files in a place called C:/windows/temp which doesn't exist on my server. So the next job is to work out what it should be.
    Meanwhile I see that the repaired database is presented with a single error message next to about a quarter of the lines: " The storage engine for the table doesn't support r... " .
  • Somewhere on one of the Drupal report screens I got a change to change the place it puts temp files. I chose temp and have a way of making that folder not readable by strangers. So all should be well? No. I try the same "repair" command again and still have about a quarter of the database lines reporting error messages.
--------------------------
1/4/2012
Discovered a video on this which is free at the moment Installing Drupal on a Server.
Discovered from docs.aquia.com that you have to turn-on the local install from Windows>Start>Acquia Dev Desktop>Control Panel . Turn it on and it goes. Don't turn it on and there's nothing to find in your browser.

---------------------------
for anyone interested in Ubercart video tutorials that are meant to make Drupal ecommerce relatively quick or possible compared to Magento or whatever a paid-for developer suggests, here are some links.

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]


    Economics courses are sometimes like this


    Part V1

    General Equilibrium and Welfare Economics

    A Simple Exchange Economy  Consider an economic system in which there are two goods, made available to consumers at constant rates per unit of time. There is no production, the goods are simply regularly delivered from the outside. Moreover, let there be only two consumers in this economy. Certain properties of general equilibrium systems may be displayed in terms of this simple exchange economy and its essential aspects can be set out in a diagram. Let the goods with which the economy is endowed be called X and Y, and let us call the two consumers A and B.   In figure 18.1 we measure quantities of X on the horizontal axis and of Y on the vertical. There is a maximum amount of X in the economy, X0, and a maximum amount of Y, 170 , so let us close off the space above and to the right of the axes at these quantities, thus drawing a box. Let us measure the quantity of X available for consumer A (XA) from left to
    right along the horizontal axis and the quantity of Y available to him ( YA ) from bottom to top of the vertical axis. If we do this it is apparent that Xo minus A's consumption of X gives us the amount left over for B to consume, while Yo minus A, consumption of Y gives us the amount of Y left over for B. That is, if we treat the bottom left-hand comer of our box as the origin from which A, consumption is to be measured, the top right-hand corner becomes the origin from which B, consumption can be measured. If we impose the condition that A and B between them will consume all available goo., then we may interpret any point within the box as representing a combination of X and Y consumed by A and a combination of X and Y consumed by B. Thus, if A consumes XA of X and YA of Y, then B will consume Xo—XA and Yo— YA , and the point labelled H represents this joint consumption pattern. Any point within the box — including those on the axes —represents a joint consumption pattern that is feasible given the quantities of X and Y available.   We may draw our two individuals' preference patterns for X and Y as figure 18.2. A's satisfaction increases as we move from bottom left to top right and B, increases as we move from top right to bottom left. If our two individuals trade X and Y on a competitive market, so that X is purchased and paid for in terms of Y, and vice versa, there is a little that we can say about the equilibrium solution to their trading activities. An essential characteristic of a competitive market is that every participant in it trades at the same price for each good. Equally essential as a characteristic of the behaviour of a utility maximising individual is that he equates the marginal rate of substitution between goods to the ratio of their prices. If we combine these two properties with the condition that joint consumption of X and Y must just exhaust the amounts of these goods available, we may deduce that the market for X and Y will be in equilibrium somewhere along a line which passes through all those points at which the two individuals' indifference curves are tangent to each other. This line is known as a contract curve and links up all those points at which A's marginal rate of substitution of X for Y is equal to B's — and hence equal to a common price ratio — and at which their joint consumption just exhausts



    Related:
    International Student Course Satisfaction
    Table of feedback scores for the economics degrees for the universities that take most international students. Most of the courses are at the bottom of the league table for student feedback

    Tuesday 29 November 2011

    Getting a Drupal site up fast - Drupal 7

    Drupal 7 Essential Training—Getting a Drupal site up fast  - Tom Geller 

    You've probably looked at the dozens of videos in this course and said:
    "whoa! wait a second. I just want to get my site up".
    This video gives you only the most bare instructions to get a Drupal site running, and then tells you which other videos to watch for more help.
    There are basically three steps.
    1. 1st, we'll download and install the Aquia Drupal Stack Installer, also known as DAMP. [or "dev desktop"]
    2. 2nd we'll download and install Core Drupal - that's the Drupal you get from Drupal.org -  into that DAMP.
    3. 3rd, we'll run Drupal's browser-based installer. And that's it! Then we'll be ready to add content and administer our site.
    Now, along the way, I'm going to do this very very quickly, and in fact I have already down-loaded some of these files and un-compressed them. If you have any problems with these steps, see the computer literacy course by Garrick Chow, also on Lynda.com.
    1: Stack Installer
    But - let's get started. Our first stop is at http://acquia.com/downloads Here we get started by looking over here for the platform we're on. Here we're on Windows so I just click "download now" and save it. That'll take a few moments. We then go to our download location which in my case is the desktop, and double click the file that's been downloaded there [which shows as a blue droplet]. Your computer may throw-up a message that warns you about installing a program from the internet. In this case, I know we want to do it so I click "yes".

    That launches the Drupal Stack Installer. I'm just going to click through this. You really don't have to change any of the defaults.  I'll explain what they are in a later video about installing the Drupal stack installer.

    Finally we get to the stage where we're finally going to name our site. We're actually going to replace the version of Drupal that's installed by the Acquia Stack installer, so it doesn't matter what we put here. Still, for consitancy, I'll say
    • User name is admin, and
    • Password, as it is throughout this course, is drupal. You of course will use whatever password you prefer. And an email address. And then click next.
    You get a confirmation screen, click next again, and then one more time to install the Stack installer. This process will take a few minutes ... and we're done! Click Finish.
    2: Core Drupal
    That launches the control panel for aquia Drupal. So that's our first step completed. Now we want to grab core Drupal, and import it into this stack. To do that, we go back to our web browser, and go to https://drupal.org/project/drupal Scroll down on this page until you get down to the downloads area. Now: I'm making this video before the official release of [Drupal version]7.0 so I'm going to download this one. However, by the time you see it, you'll probably see a 7.0 or a 7.something version of it up here in the green area, and that's the one that you should download.

    I click here to download. I've already done it, and the download is on the desktop. So I'll go there, and I'll start the import process.

    So there's our Drupal folder after its been un-compressed. If you have any problems with that, watch Garick Chou's videos on computer literacy, also on Lynda.com . I'm going to rename that folder "Two Trees". That goes-along with the name of the site that we'll be building throughout the course, which is about a fictional olive oil company called Two Trees Olive Oil.

    Once we've renamed the folder, I go back into my control panel. Go to Settings. And Sites. And Import. (The button opens a file listing of the hard disc). I find that folder (Drupal, renamed Two Trees) and click OK.

    Create a new database. I'll call that "Two Trees" as well. And call the server "Two Trees". And click Import.
    3: Drupal's Browser-based installer
    Doing so launches our browser, and starts the third stage of our installation process, by opening Drupal's own installer. Click Save and continue, and continue-on. Again, I will go through all these steps individually in a later video. Finally we add a little bit of information about the site, including the primary - what's called the Super User. I'll call this Two Trees Olive Oil. Put in a little bit of other information. Finally click Save and continue. And that takes us to our completely installed Drupal site. Click on Visit your new site, and we are done!

    Now you can start adding content to your new site, changing the design, managing users - basically doing everything it takes to make this site your own.

    If you just need a quick and dirty way to get started, see the video Learning Drupal's Basic Workflow. Then, once your site is ready on your laptop or desktop computer, you can move that installation to a server, which you'll learn about from several videos entitled Installing Drupal on a Server.[note: you need to re-start the program from Windows > Start > Acquia Dev Desktop or such each time you re-start your computer.]