Solution to Error

[SOLVED] ERROR mysqli_real_connect(): (HY000/2002): No such file or directory

If you are getting a wordpress error that starts with “mysqli_real_connect(): (HY000/2002):” and includes “No such file or directory” and ends with “wp-includes/wp-db.php on line 1490”, then here is what resolved the issue for me. In the wp-config.php file, include (or change) this line from define(‘DB_HOST’, ‘localhost’); to define(‘DB_HOST’, ‘127.0.0.1’); I put it near the… Read more [SOLVED] ERROR mysqli_real_connect(): (HY000/2002): No such file or directory

[SOLVED] How to Fix $.ajax() Not Working ie 8, ie 9 and ie 10

  jQuery is an great tool to use for making ajax calls. As usual MS Internet Explorer has to make things that would otherwise be standard — difficult. Setting aside any rants about how much hair one can pull out in the days it takes to accomplish something that should have been easy, here is what… Read more [SOLVED] How to Fix $.ajax() Not Working ie 8, ie 9 and ie 10

SOLVED: /usr/bin/env: node: No such file or directory

While working with NodeJS on an AWS Ubuntu 14 box, I got the following error:

On some Linux distributions, AWS in my case, there is a namespace issue which causes errors at times. The error is a result of some distributions installing NodeJS with the name nodejs as opposed to node. The fix is easy Simply create a… Read more SOLVED: /usr/bin/env: node: No such file or directory

CORS; How To Set HTTP Response Header on IIS Windows Server 2012 R2 to Access-Control-Allow-Origin

When attempting to make an AJAX call are you getting the following error? XMLHttpRequest cannot load (then some path to the remote site). No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://yourAjaxCallingSite.com’ is therefore not allowed access. This means the Server hosting the resource is not set up to be CORS compliant. If… Read more CORS; How To Set HTTP Response Header on IIS Windows Server 2012 R2 to Access-Control-Allow-Origin

Error: listen EADDRINUSE

The npm web server is a very simple web server used in development and testing for delivering static files. While attempting to use start the npm web server you may see an error like this:

One fast way to resolve the issue is:

Or, you may try the following solution to the listen EADDRINUSE… Read more Error: listen EADDRINUSE

Drupal Role Specific Development Feedback

On rare occasions you may have to work on a production site and need some development feedback. If you want to control which role sees your output, this snippet can help. With this logic in place, only appropriate roles will see your working on the site.

Drupal Display PHP Errors on One Domain of Multi Site

When using a multi-site setup, You may want errors only to appear for one site. In that case, use $_SERVER[‘HTTP_HOST’] in an if statement to only display PHP error messages for the domain of your choice:

How To Compress a Directory with the tar Command and Exclude Certain Files, tarball exclude files

When creating a tar-ball (compressing a directory of files), you may exclude certain files by using the –exclude flag. The –exclude flag will also work with a wild card “*”. Here is an example of how to tar-ball a directory from the parent directory and exclude certain files:

IMPORTANT: Be sure to use the… Read more How To Compress a Directory with the tar Command and Exclude Certain Files, tarball exclude files

FIXED: Grunt Dploy Not Pushing Files

I was trying to set up Grunt to deploy to my development server. According to the output in the terminal all went well. However no files were being uploaded.

When setting up the info in my grunt.js file, I had used the full path as output by the “pwd” command like this:

}… Read more FIXED: Grunt Dploy Not Pushing Files