• install php sqlsrv driver on ubuntu 20.04

    Suppose you want to access a data source that lies on microsoft sql server dbms — most probably installed on a windows server machine, although mssql server is now a well fit also on linux machines (see: Ubuntu: Install SQL Server on Linux – SQL Server | Microsoft Docs, btw, this guide is tested a […]

  • repost: php w/c api, simple http request using guzzle

    composer require guzzlehttp/guzzle woocommerce api <?php require_once “vendor/autoload.php”;   use GuzzleHttp\Client;   define(‘WC_CONSUMER_KEY’, ‘PASTE_CONSUMER_KEY_HERE’); define(‘WC_CONSUMER_SECRET’, ‘PASTE_CONSUMER_SECRET_HERE’);   $client = new Client([ ‘base_uri’ => ‘YOUR_DOMAIN_BASE_URL’, ]);   try { $response = $client->request(‘GET’, ‘/wp-json/wc/v3/products/PRODUCT_ID_HERE’, [ ‘headers’ => [ “Authorization” => “Basic “. base64_encode(WC_CONSUMER_KEY.’:’.WC_CONSUMER_SECRET) ], ‘verify’ => false, //only needed if you are facing SSL certificate issue ]); […]

  • reveal wifi password on windows 10

    If your user profile has administrative privileges, open command prompt and type: netsh wlan show profile name=”nice hotspot” key=clear

  • how to solve freepbx upgrade failed: Class ‘Whoops\Util\TemplateHelper’ not found

    Although freepbx upgade processes are typically well designed and tested, there might be specific configurations in some installations that could lead into failures. One of these failures occured into one of our freepbx 12 installations while we were upgrading it into version 13 of freepbx. We’ve initiated the upgrade process from the freepbx web gui […]

  • composer update: mmap() failed: [12] Cannot allocate memory PHP Fatal error: Out of memory

    proc_open(): fork failed errors# If composer shows proc_open() fork failed on some commands: PHP Fatal error: Uncaught exception ‘ErrorException’ with message ‘proc_open(): fork failed – Cannot allocate memory’ in phar This could be happening because the VPS runs out of memory and has no Swap space enabled. To enable the swap you can use for […]

  • npm to add sb-admin-2 to laravel

    First of all make sure you have node.js installed. If you haven’t so, install it: https://nodejs.org/en/ Change directory to your laravel project and use npm to install sb-admin-2 like this: npm install –global startbootstrap-sb-admin-2 If it compains for popper or other packages, use npm again to install them, like this: npm install –global popper Now, […]

  • existing code to bitbucket (git)

    Let’s assume you ‘ve got setup a small project locally and it’s time to add it to bitbucket. All you need to know is: https://confluence.atlassian.com/bitbucketserver/importing-code-from-an-existing-project-776640909.html There are a couple of details though that could make your life difficult if you don’t pay the proper attention: Bitbucket. Login to your bitbucket account, create a repo (but […]

  • Sleep Sort


  • How to merge two zimbra mailboxes

    If you want to merge 2 zimbra mailboxes, you can simply export the source mailbox and import it to the target mailbox. This can be easilly achieved with a couple of zimbra commands. SSH into your zimbra server. Change to zimbra server:su – zimbra Now type:/opt/zimbra/bin/zmmailbox -z -m [email protected] getRestURL “//?fmt=tgz” > /tmp/temp.tgz && /opt/zimbra/bin/zmmailbox […]

  • xampp + php + curl + ssl = fatal_error

    If you use xampp with php and curl you might encounter an error like this: Fatal error: Uncaught exception ‘HttpClientException’ with message ‘cURL Error: SSL certificate problem: unable to get local issuer certificate’ in HttpClient.php If this is the case the solution is easy: Download cacert.pem from official curl page https://curl.haxx.se/docs/caextract.html Copy cacert.pem to c:\xampp\cacert.pem […]