• info@bizmate.biz

News

update git on ubuntu server

Are you stuck with an old version of git on your ubuntu server? Please continue reading below.

Mysql – enable table logging in general_log

Sometimes in DB used by different applications you might like to monitor what queries are executed and see them directly on your mysql client, like SqlYog or Sequel Pro.

GIT archive files

This is a brief note on how to export the last revision of your git repository to a directory or archive file.

Enable SSL virtual host in apache2 xampp

SSL set up on Apache needs a ssl enabled virtual host configuration with  matching certificate and private key.

Enable PHP Debugging – Eclipse XAMPP Chrome

Please note this article has been changed to be flexible enough to allow set-up of Xdebug for any Xamp environment (Windows/linux/mac). Also it directs you to use the Chrome Xdebug plugin so you can control when Xdebug is enabled for your application straight from Chrome without changing your php configuration and restarting Apache.

These are the different steps required to get the installation working

  1. Install the Xdebug PHP module in your php.ini – download the Xdebug module and enable it in PHP
  2. in eclipse configure the debug options to use Xdebug as default debugging tool
  3. Install and configure Xdebug Chrome Plugin
  4. Test the whole functionality from the browser

Go to the next page for detailed instructions on step 1.

Enable PHP Errors

These following methods can be used to enable display of errors

Add user to group in linux

I have recently installed virtualbox on my ubuntu and I could not get usb devices to work.

This is because in order for virtualbox to use your usb resources it is required that the current user is added to the virtual box user group

Bulk rename files in linux

I had to rename about 200 files that were renamed by an application from MyFile to MyFile.loaded

How to show a column result in a one line comma separated list in MySql

Often I need to extract a list of articles IDs from my MySql databases but getting the result in the default column is not enough and it can be easier to convert the result from a column into a one line list of comma separated results, for instance from

Select id from myTable

ID
64
85
25
63

but your expected output is 64, 85, 25, 63

To concatenate multiple rows results into a single mySql field you can use the group_concat built-in function (to make sure your MySql version has this function you would like to check in the manual).

Let’s see a real life example query where we can apply this function. In my db I have a list of additional information items identified by ID related to a specific website entry/profile. The query below allows me to collect all the IDs of the entries that relate to ‘www.example.com’

SELECT GROUP_CONCAT(additional_information_id)
FROM  `company_profile_additionalinformation`  WHERE  profile_website ='www.example.com' ;

Please note the result is truncated to the maximum length that is given by the group_concat_max_len system variable, which has a default value of 1024. This can be changed. Check the manual for more information .

Enable Mod Rewrite in apache/debian

If you would like to enable mod_rewrite in your apache, for friendly URLs or other redirect requirements, please follow these instructions.