• Writing to files

    Overview PHP operates as a separate user to enhance security across the server. In the event of a hacking event on a client’s site, the attacker only has access to what it can access, which protects sensitive e-mails and SSH keys that reside within the same storage space. Certain applications…

  • Adding npm bin/ path to command search path

    Overview npm installs packages by default under node_modules/ within the current working directory. Binary files, if bundled with a package, are installed under node_modules/.bin/ unless the global (-g) flag is supplied to npm install. This works if only a single version of a particular package is installed, but fails in most…

  • Spawning multiple TCP daemons in a single app

    Overview Node applications may bind to a TCP port using listen(<PORT NUMBER>), provided of course the PORT NUMBER is one allocated to your account. Passenger replaces this listen() method with a built-in method that, instead of listening on a TCP port, creates a local UNIX socket for communication with the web server (see installServer() in source)….

  • Changing Node Versions

    Overview Platforms v6.5+ and beyond support multiple Node versions that may be installed using nvm. Usage Listing nvm is provided automatically. First, to list available node interpreters, execute nvm ls from the terminal: $ nvm ls v4.2.4 v5.5.0 -> system node -> stable (-> v5.5.0) (default) stable -> 5.5 (-> v5.5.0)…

  • Sails Quickstart

    Quickstart Prerequisite: ensure local npm bin paths are in your search path (see KB: Adding npm bin/ path to command search path) Login to terminal Create a folder for your Sails application, in this example, we will use /var/www/sails: cd /var/www mkdir sails cd sails Install Sails from npm: npm…

  • Upgrade npm

    Overview When attempting to install newer packages on v6+ platforms, npm may complain that it is too old to install a package. Sample error: Sails.js Installation – Error ——————————————————– Your npm-Version is too old: Sails require npm >= 1.4.0 (you currently have 1.3.6) Please update the installed npm (Node Package…

  • Stored procedure creation fails

    Overview During a database import, a stored procedure may be included in the backup. Although the backup is complete, restoring it within phpMyAdmin, the control panel, or mysql CLI fails with a similar error: #1227 – Access denied; you need (at least one of) the SUPER privilege(s) for this operation Cause Included…

  • Connecting remotely to MySQL

    Overview By default, MySQL permissions only permit same-server access for clients. This protects your database by preventing external access, but also precludes desktop database utilities like Navicat, MySQL Workbench, and Eclipse from managing your database schema. Solution Create a new MySQL user within the control panel under Databases > MySQL Manager….

  • Resetting MySQL password

    Overview At any time if you lose your MySQL password, it must be reset within the control panel. This can be done via Databases > MySQL Manager > List Users and Databases. Under Edit Users, select the username that you logged into the control panel with, usually the first user listed….

  • Creating a database

    Overview Additional MySQL databases, used for storing application data, may be created quickly within the control panel via Databases > MySQL Manager. When a database is created, grants are automatically setup to permit the primary user access to the database. In multi-user environments, you may wish to create a separate user…