Drush can't connect to MySQL server on localhost using WinNMP on Windows

First time I setup and test Drush on my local machine using WinNMP on Windows executing a cache clear on a local Drupal site under Git BASH or cygwin:

drush @webfoobar cache-rebuild

... I get this error:

No Drupal site found, only 'drush' cache was cleared

I excuted the following drush command to investigate the cause of the error:

drush @webfoobar -d st

... got the following output message:

Solution to "The filename, directory name, or volume label syntax is incorrect." error in Drush custom PHP path

It is possible to assign a specific PHP version to execute Drush commands for special Drupal site via Drush aliases configuration file. However in Windows, we can get error:

The filename, directory name, or volume label syntax is incorrect.

… if the we follow the Windows syntax path.

This error is printed from C:\composer\vendor\drush\drush\includes\exec.inc


How to use your custom php.ini in Drush

The following codes shows how can we tell Drush to use our custom php.ini:

$aliases['wf'] = array (
  'uri' => 'http://d8webfoobar.loc',
  'root' => 'C:/WinNMP/WWW/drupal',
  'php' => 'C:/WinNMP/bin/PHP/64bit-php-7.2/php.exe',
  'php-options' => '--php-ini=C:/WinNMP/conf',

To test, execute the following command:

drush @wf status

The screenshot is the output of the command above showing that the custom php.ini is already recognized by Drush:


Synergy server and client wont connect

Synergy is a software that shares a mouse and a keyboard between many computers. Setting this up requires the computer that shares the mouse and keyboard configured as server and the rest of the computers that are being controlled will be the clients. The ussual challenge in setting this up is making the server and client(s) get connected. One feature of Synergy is the option to use SSL encryption connection. And the common mistake is that the server configured to use SSL encryption connection and the client(s) is(are) not and the following are the logs that will show on server:

Test website google.com as HTTP referrer using Selenium IDE

The following steps are creating an automatic test for a website where the request originated from google.com using Selenium IDE.

  • Open Selenium IDE and create a new project.

  • Add new test named "google.com referrer".

  • Enter "https://www.google.com" on "Playback base URL" field.

  • Enter the following commands:

    1. Command:

How to run Selenium tests repeatedly in infinite loop

We have a series of tests and we need to run them repeatedly for an extended length of time but there is no settings in Selenium IDE that allows infinite loop test run. In this article, will show the workaround to achieve that.

  • Open Selenium IDE and create a new project.

  • Add new test named "infinite loop run".

  • Enter the following commands:

    1. Command:
      execute script
      return 0;