Thursday, 5 November 2015

Enable Fast and unsecure Ciphers on Recent Versions of OpenSSH

When trying to use webdrive and turnkey lamp I couldn't connect over SFTP. It turns out this is because by default turnkey lamp 14.0 has secure ciphers and webdrive does not support these.
So I added this to /etc/ssh/sshd_config:
Ciphers 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,arcfour128,arcfour256,aes128-cbc,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com

Friday, 16 October 2015

How to change composers install path


If you need to install composer modules to a custom install path other than vendors, then add the following to your config substituting XXXX/XXXXX to the custom install path that you require.

"config": {
        "vendor-dir": "XXXX/XXXXX"

},

Thursday, 10 September 2015

Zend Server Optimizer+ cache problems

If Zend Optimizer is caching your files and new changes are not reflected when the code is running, in PHP you can call:

accelerator_reset()

This will clear the Optimizer cache.
http://files.zend.com/help/Zend-Server-5/zend_optimizer+_-_php_api.htm

Debugging PHP constants

Handy tip:
If you'r bodded down in old legacy PHP code and you need to know what constants are defined at any point during execution, simply call:

get_defined_constants(true)

You can either add this to Zend Debugger as an expression or error_log with print_r it.