Category: Problem Solved

  • Switching from Hosted to Self-hosted WordPress

    Today was moving day. I started blogging in 2012 at the very beginning of my career as a developer (though it only lasted about 8 months the first time). It was fun and a good way to keep track of what I was working on. I had no experience working with server admin, so I…

  • Git Undo Delete or Removal of Files

    So, silly me. I wanted to remove a single directory from my changes. It was the only change made. I tried git rm . Git told me I needed to use -r to recursively delete files. I figured that meant it would delete recursively delete the files in that directory. NOT SO! It deleted all…

  • AWS Git Push Rejected – remote: error: Unable to create application version: null

    I was trying to push to AWS through their CLI, and I got this error: remote: error: Unable to create application version: null … ! [remote rejected] HEAD -> master (hook declined) error: failed to push some refs to … I doubted that the issue was common enough that I would find a useful answer…

  • Could not convert javascript argument arg 0 — Solution

    I got this error when I was trying to fill in a DOM node called cartDiv that would eventually be appended to the body with .appendChild(). It was working fine until I replaced the argument in   cartDiv.appendChild(cartDetails);   with a different variable. It had been working fine when cartDetails was the argument. Summary: .appendChild()…

  • jQuery and Other Libraries Conflict

    Summary: Use jQuery.noConflict() to make jQuery play nice with other JS libraries.   I’ve been working on a project that runs a script within a site. I don’t have any control over that site. That site uses Prototype. When I first tried to run a jQuery function in the script, I got an error. From…

  • PHP: The difference between the sqlsrv (Windows) and mssql (Linux) drivers

    Summary: sqlsrv is the PHP driver for Windows environments, mssql is for Linux. The mssql driver and functions used to exist in PHP on Windows but are now deprecated. Connection settings/syntax used with the sqlsrv driver may not work with mssql. We had to change the hostname from “hostname,\port_number”; to “hostname:port_number”;   Lesson # 1:…

  • This Is an Easy One: Fixing Invalid S3 location Bucket Error

    I was getting this message (or something like it) when I tried to upload my application on AWS Elastic Beanstalk: “Invalid S3 location Bucket: elasticbeanstalk-**-**-******** Key: ******* 2012-11-3 filename.zip.” The problem was that I had dashes “-” in the name of the file I was uploading. I took them out (and the spaces, just to…

  • Getting the Value of a count(*) Query in SimpleDB

    Summary: AWS SimpleDB queries return a multidimensional object, not a simple value. Look at the returned object to see which property you need and how to reference it.   When my app creates users, it firsts checks to see if the username entered by the new user is already in use. I do that with…

  • AWS SimpleDB and Auto Incrementing Primary Keys

    I wanted some of my items in simpledb to have unique identifiers. SimpleDB does not provide this function natively because it’s not an RDBMS. Here’s my solution: Before inserting a new item, get the id from the last item in the domain with this select: $query = $sdb->select(“select id from `domain` where id is not…

  • Explicitly Setting an AWS SimpleDb Region in PHP

    I am experimenting with AWS SimpleDB on a new PHP project. When I attempted to query a domain, I got no response. I used firephp (firephp.org) to log the result of the query in firebug. The result was a CFResponse object. By looking inside the object, I saw that it produced a “No such domain”…