No such file or directory for SSH authorized_keys in Homestead Vagrant VM

When configuring your Homestead VM you may encounter an SSH key issue when booting the Homestead Vagrant VM up /home/vagrant/.ssh/authorized_keys ==> default: : No such file or directory This can be fixed by nesting your mounted directory a level deeper under /home/vagrant/ as that is where the SSH keys of the box itself are stored ...

Use Homebrew PHP with Mac OS X built-in Apache

To use the version of PHP you installed with Homebrew, you will need to change the PHP extension that Apache is loading. If you are using the built-in version of Apache this will use the built-in version of PHP even after you have installed PHP with brew. brew install php56 You need to edit the ...

Show SQL statement from CodeIgniter DB Query Builder

If you need to see (for whatever reason) the SQL being generated by CodeIgniter’s DB Query Builder, you can call last_query() on the helper $sql = $this->db->last_query(); If you are using version 3 however, you should be able to use get_compiled_select() as mentioned in the CodeIgniter documentation

Using strings in SQL select clause in CodeIgniter DB helper

If you need to use literal strings in your select clause (such as a date format) using the CodeIgniter DB helper, you will need to pass false as the second parameter $this->db->select( 'DATE_FORMAT(date, "%Y-%m-%d") as something_date', false );

Icinga Web, Could not send command. Check if your webserver’s user has correct permissions for writing to the command pipe.

If you are getting this error when trying to perform actions on services or hosts in Icinga Web, most forum posts point to the configuration being correct, etc. Firstly make sure that the command pipe referenced in access.xml points to a valid place, and has icinga-cmd:icinga ownership vim /usr/local/icinga-web/app/modules/Api/config/access.xml <!– allowed to be written to ...

Icinga Web, Set correct write permissions for directory “/usr/local/icinga-web/app/cache”

If you have followed the Icinga install procedure through as per the installation documentation, and are having difficulty getting Icinga Web to install, you may eventually get an Agavi error saying that the cache directory is not writable (if you find the PHP errors) AgaviCacheException Failed to write cache file "/usr/local/icinga-web/app/cache/config/config_handlers.xml_production__d98552ff67d2d50d8def4e3ddb970ba8e8e151fc.php" generated from configuration file ...

Add URL query parameters to links using view helper in Zend Framework 2

There are 2 ways to add query parameters using the URL view helper in Zend Framework 2, either using Segment route placeholders, or adding them as normal query parameters (e.g. url?id=1&name=barney) Which one you need to use depends on what route the view helper is being used on; since all URL’s in Zend Framework 2 ...

Install ZeroMQ on Mac with PHP PECL extension

Getting ZeroMQ working on a Mac looks like a pain if you try to compile, but there’s a much easier way to get it up and running, with just a few brew and PECL commands. I’ve been wary of Homebrew for a while, as there were lots of issues with Macports in the past, but ...

Older posts