Blogs

Launching a copy of a Drupal Website locally using Acquia Dev Desktop (DAMP)


The Acquia Developer Desktop enables you test a Drupal installation in a completely virtualized environment.  It is great for building and troubleshooting new features before deploying.  You will need a copy of a Drupal codebase and a SQL Dump File for the corresponding database to follow these steps.

  1. Download and Install Acquia Dev Desktop
    Full installation instructions - works on Windows and Mac
     
  2. Copy an existing Drupal Codebase
    Extract the codebase to a folder on your machine. 
    Default location: C:\Users\{username}\Sites\{drupal installation name}
     
  3. Install Database and Reference Website
    Open Acquia Dev Desktop and choose More... from the sites dropdown


    In the Settings dialog that opens, Click Import...

    In the Import site dialog, Point the Site path to your codebase, point the Dump file to the SQL and provide a new database name and site name.
     
    Click Import and wait a few seconds to a few minutes depending on the size of the SQL.
     
  4. Launch your copy of the website
    On the Acquia Dev Desktop, hit the dropdown below Go to my site and select your site.  Click Go to my Site.

Observations and Roadkill Posters

For anyone interested in helping promote the use of these systems, here are graphics we've started with for Observations and Roadkill online reporting forms.

Observations Roadkill

 

We'd appreciate it if you are using these as web images, that they would link directly to either Observations (https://fishandgame.idaho.gov/ifwis/observations) or Roadkill (https://fishandgame.idaho.gov/ifwis/roadkill)

 

Upload Limits in Drupal/IIS

Modifying your php.ini settings to the following will allow increased file upload limits:

  • upload_max_filesize = 50M
  • post_max_size = 50M

However, if you are using Internet Information Server (IIS), also check that there isn't a requestLimit set in the web.config. Drupal will show that a larger size is allowed via php.ini, but large files won't upload.

Here is the setting to change, on my system it defaulted to 10mbs:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
...
    <security>
<requestFiltering>
            <requestLimits maxAllowedContentLength="10485760" />
        </requestFiltering>
    </security>
...
  </system.webServer>
</configuration>

Changed maxAllowedContentLength to 52428800 and 50mb uploads worked immediately.

Calculating Extents in the Field Calculator

Here's a little shortcut.  You can calculate extents in the Field Calculator dialog using:

dim Output as double
dim pGeom as IGeometry

set pGeom = [shape]
Output = pGeom.Envelope.XMin

Choose advanced, paste what is above and set your field equal to Output. 

NOTE: If you want to add the values in Decimal Degrees or Web Mercator there's an app for that.  Ask Tim Williams how to install his Calculate Extent button.

Serving pptx, docx and xlsx on Apache webservers to IE 6, 7 & 8

Apache Web Servers running on certain versions of Linux may serve the new Microsoft Document Formats incorrectly as zip files in IE6, 7 & 8.  

Chrome, Firefox and Internet Explorer 9 (even when running in IE7 and IE8 testing modes) all will have no problem downloading files.

The solution is to add the following to your .htaccess file to correct the Mime Types:

AddType application/vnd.ms-word.document.macroEnabled.12 .docm AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm AddType application/vnd.openxmlformats-officedocument.presentationml.template potx AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx AddType application/vnd.ms-excel.template.macroEnabled.12 xltm AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx

Source: http://www.webdeveloper.com/forum/showthread.php?t=162526

Simple mySQL Backups on Windows

Quick and easy backups from mySQL on windows courtesy of http://realm3.com/articles/how_to_schedule_regular_mysql_backups_in_windows

The article has everything you need, just archiving the main points here for posterity:

Create mysql-backup.bat:

@echo off
echo Running dump...
"C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqldump" -u[username] -p[password] --result-file="D:\mySQLbackup\content-backup.%DATE:~0,3%.sql" [database]
echo Done!

Add a scheduled task to run nightly, script above creates one file for each day of the week.

Email your backup administrator to add D:\mySQLbackup to their tapes.

Air Conditioner Failure - Servers Down Oct. 3, 2011 6:40AM - 11:20AM MST (-0600 GMT)

Air conditioners in Idaho Fish and Game's Server Room failed late Sunday resulting in shutdown of the Fish and Game servers and network at 6:40AM on Monday October 3.

The network and all servers are now back online.  If you experience any issues with our applications please let us know.

We apologize for the outage and any inconvenience this may have caused. 

Funding is short. If you've come to rely on our services and would like to contribute towards a redundant system/cloud hosting to avoid outages like this in the future we're all ears.

Preventing Schema Locks in ArcSDE from ArcGIS Server 10.1.

By default, ArcGIS Server creates a schema lock on all layers and tables in a Map Service while the service is running.  This will prevent adding or deleting fields or records. 

At 10.1 this and a lot of other admin tasks can be done directly on the rest endpoint as described below.

By default, ArcGIS Server map services use schema locking to prevent other users from altering the geodatabase schema while the service is running. If the schema locks are impeding your workflow, you can disable them by using the ArcGIS Server Administrator Directory.

To disable schema locking for a service, perform the following steps:

  1. Navigate to http://<server name>:6080/arcgis/admin.
  2. Click services.
  3. Click the service for which you want to disable schema locking.
  4. Click edit.
  5. Add the "schemaLockingEnabled" = "false" property within the service JSON, as in the following example:

    …………………………………………………..

    "maxImageHeight": "2048",

    "schemaLockingEnabled": "false",

    "maxRecordCount": “1000",

    …………………………………………………..

  6. Click Save Edits.

This has been reblogged from

http://djmapper.tumblr.com/post/25068172061/prevent-arcgis-server-10-1-s...

 

NHD_LLID Tools for Creating Whole Stream LLID Routes Based on NHD

The NHD LLID Tools are an ArcMap 10 Add-in programmed in ArcObjects VB.net.  The purpose is to transfer the LLID whole stream route identifiers from our existing 1:100,000 whole stream route system to a whole stream route system based on the 1:24,000 NHD Hydrography, and to identify and resolve stream name conflicts between the two systems.  

The tool has three main components, organized into tabs on the ArcMap Add-in dockable window.  The first tab contains a tool to initiate an algorithm which assigns LLIDs to NHD ComID segments based on matching stream names.  The second tab provides a set of tools for assigning LLIDs to ComID segments for individual streams.  This tab also provides a tool for creating new LLID routes. The third tab provides a tool for identifying the location of stream name conflicts, as well as the nature of the conflict, how the stream was routed, why the stream was routed in this way, and what further action is required.  This portion of the application can be used without the LLID assignment functionality.

Click the following link to download the application, instructions,sample data, and sample map documents.  https://fishgame.idaho.gov/ifwis/download/NHD_LLID/NHD_LLID_Routing.zip

Unzip the LLID_RoutingTools file to C:\ .  This will create the directory C:\ NHD_LLID_Routing which includes the geodatabase NHD_LLID_Routing.mdb.  This file must be in this location for the program to function.  If you need to put the directory in another location contact tim.williams@idfg.idaho.gov

The NHD_LLID_Routing.zip contains the following:

- NHD LLID Routing Tools Instructions.doc. This document outlines how to use the tools to assign LLIDs to lines in the NHDFlowline layer and how to create a measured route system from these lines.

- The NHD LLID Routing Tools ArcMap 10 Add-in.

- A sample map document with no LLIDs assigned and the NHDFlowline layer unsymbolized. Start with this mxd if you would like to try out all the features of the NHD_LLID Tools. (NHDSampleUnrouted.mxd)

- A sample map document with LLIDs assigned. The State LLID route layer and the NHDFlowline layer are symbolized by LLID. The document also contains example IssuePoints highlighting discrepancies between the layers.  A completed NHD_LLID Route layer is also present. (NHDSampleRouted.mxd)

- A sample map document with the State LLID route layer and the NHDFlowline layer symbolized by Name and GNIS_Name. The document also contains example IssuePoints highlighting discrepancies between the layers.  (NHDSampleByName.mxd)

- The NHD_LLID_Routing.mdb geodatabase that supports the application.

- A sample NHD geodatabase where no LLIDs have been assigned (NHD17010304Unrouted).

- A sample NHD geodatabase where LLIDs have been assigned and a route system has been created (NHD17010304Routed).

Create GPX (gps files) from ArcGIS Shapefiles or GoogleEarth KML files

For some, DNR garmin (http://www.dnr.state.mn.us/mis/gis/tools/arcview/extensions/DNRGarmin/DNRGarmin.html) may be enough for converting shapefiles to gpx files but this program may not always work - especially for large files. I have found it easiest to convert ArcGIS shapefiles to KML and then to GPX files.

Shapefile to KML

Depending on the content of your shapefile, there are two different options for creating a KML.

1)      Open-source Shp2kml, available at: http://www.zonums.com/shp2kml.html .  This would be my first choice.  The GUI is very straightforward and gives you quite a few options for customizing your KML, such as: the color scheme, roll-over effect, and which attributes are displayed.  NOTE: The list of acceptable Datums is kind of short.  Found it easiest to just re-project shapefiles to WGS84.  Also, found that this tool would not always work for shapefiles with especially long text attributes and/or multi-part polygons. (This is discussed in more detail in a past blog called Shapefile to Google Earth kml - Customize Symbol Properties and Labeling (NO PROGRAMMING REQUIRED!).

2)      Create a layer file of your shapefile and use the ‘Layer to KML’ tool in ArcGIS.  You have less authority over the output with this method.  Limited customization of color scheme can be done in Google Earth (unless you would like to program some fancy customizations).  NOTE: Actually saves the file as a KMZ; resave the KMZ as a KML for conversion to GPX in GoogleEarth.  If you are using this options, delete all of the attribute fields that you do not want to show up in Google Earth – this information pops up when the feature is clicked.

KML to GPX

Lots of options. 

1)      Open-source KML2GPX, available at: http://groups.google.com/group/kml-support-getting-started/msg/ec5e2ae637ed4bfc

3)      Open-source GPSbabel, available at: http://www.gpsbabel.org/

4)      Built-in tool on gpsies.com, available at: http://www.gpsies.com/convert.do

I know that DNR garmin and the tool on gpsies.com are not good for very large datasets.