The Linux Page


REST hook trigger needs a polling url (ZSE007)

As I'm working on a Zap application (see Zapier). I got this error about my triggers:

REST hook trigger needs a polling url (ZSE007)

So... I understand that they want to have a URL to do a poll and they even have documentation that explains why they want to poll in case of a REST hook Zap: Whenever the user wants to test the Zap, the application will get some data using the polling method. That way they can get that data specifically for one test and not force you to generate an trigger. One problem with testing with an actual trigger is that any other Zap listening to the same trigger ...

Turning sites and modules on and off in Apache2

I always have to looks for the command line option to turn sites and modules on and off (really it is said to be enabled or disabled.)

The commands are as follow:

  • a2ensite -- enable one site
  • a2dissite -- disable one site
  • a2enmod -- enable one module
  • a2dismod -- disable one module

When you use one of the commands in the command line terminal without specifying which site or module to enable, then you are given a list of the sites or modules you can enable or disable. Note that the configuration files have to end with .conf for this mechanism to work as expected.

xhtml2pdf generating an error under 14.04+

Note: This bug is fixed in Ubuntu 16.04

Working on a website I have to convert invoices to PDF so end users have the ability to print and share the invoices from the website.

In order to do that, I generate an HTML page with the invoice which also gets displayed in the website, and then convert that HTML to PDF with xhtml2pdf. I use that tool instead of whtmltopdf because it does not require X11 to work. The other tool is said to require Qt and X11 and we do not want those things on our backend servers.

So... I upgraded to 14.04 and the tool stopped working with an ugly error:


List ciphers currently used by Apache2

If you are using Apache and e-Commerce, you probably want to know all the details of the ciphers used by the Apache SSL module.

So listing Apache supported ciphers is done using nmap as follow:

nmap --script ssl-cert,ssl-enum-ciphers -p 443

This call gives you a complete list of all the ciphers currently accepted by your running version of Apache. For example, the list may look like this:

| ssl-enum-ciphers:
|   SSLv3:
|     ciphers:
|       TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA - strong
|       TLS_DHE_RSA_WITH_AES_128_CBC_SHA - strong
|       ...

Bad move for PHP unpack()! So unpack() stopped working?

Today I noticed many errors on one of my websites. Looking closer into it, I noticed that the code for the mo_references Drupal module stopped working.

It took me some time, especially because the code seemed to work just fine as all the files could easily be displayed.

Actually, that was not the case. The unpack() character 'a', which I used, was transformed from a simple string that gets trimmed, to all the characters, including the NULL characters. Ouch! Now we have to use the 'Z' character instead.

I use it to unpack() a tar file by loading 512 bytes of data in a ...

Why would Redirect and RedirectMatch in Apache2 not work?

As we are working on a new website, we had a problem where a redirect would not work. I tried both: a simple Redirect and a RedirectMatch as follow:

Redirect /
RedirectMatch permanent ^(.*)$$1

Both of these entries would not work at all.

I verified, to make sure, that the alias module was turned on. It was.

ls -l /var/apache2/mods-enabled

This did list the alias.conf and alias.load entries as expected.

So? What else?

Well... This was installed on a new server and we left the default entry in there:

ls -l ...

Getting username or computername with MS-Access


These are common questions for MS-Access users:

  • How can I get the name of the currently logged on user?
  • How can I get the name of the computer the user is working on?

Both names are available in the Kernel and we can make use of a function declaration to access those names.

MS-Access Functions

To determine the name of the current user:

Private Declare Function GetUserName Lib "advapi32.dll" _
    Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Public Function GetLogonName() As String
    Dim lpBuf As ...

Drupal blocks all disappeared!

Today I had an interesting experience... all of a sudden, all the blocks of a given theme disappeared.

It has been working just fine for months, so I really wasn't sure what the heck it could be.

The fact was that the theme was called the same as the module (as I work for a given client, I tend to do that...)

At some point, I must have added a function with a specific name and that would influence the theme. The result being blocks going bye bye!

I checked and the block content is computed just fine, the problem is the theme('block', $block) call. Although the ...

Find Qt version: command line, compile time, run time


The Qt library version can be retrieved in all sorts of ways. There are a few I use:

Command Line Version

The Qt tools will display the version. One of the simplest way is to use qmake as in:

qmake --version

It will tell you which version of the Qt library it is using.

When writing a configuration script, you most certainly want to make use of the pkg-config tool (at least under Linux and Cygwin):

pkg-config --modversion QtCore

The result is just the version of the specified module. To find all the available module look in the ...

Apache misconfiguration: AddType versus AddEncoding

I've been using Drupal for a while and only now started to notice a problem with the cache of JavaScript code. In general, I don't cache the JS since they are not dynamic files. But we do that with Snap!.

The Apache mime module offers two options: AddType and AddEncoding

Both options are used in a similar way meaning that both react on file extensions. When a match is found, the corresponding MIME type or content encoding is attached to the content being sent.

If you install the MIME module, it will attempt encode data properly for the most general case, but not all cases. That is, it does

Syndicate content Syndicate content

SMS From Me Logo

SMS From Me

To automatically start one on one conversations with your online leads.



Terms of Site Index

Find the page/content you are looking for with our index.

  • .dylib
    Dynamic Library--the Mac OS/X naming convention for dynamic libraries. Not too sure why they choose that extension since FreeBSD uses .so just like most other Unices... To confuse people, maybe?
  • Drupal
    Database driven CMS running using PHP.
  • constant
  • float

    float is a type in most software languages referencing an IEEE floating point number. These numbers are generally defined on 32 or 64 bits with three parts: a sign, an exponent and a mantissa. There is also a bias which is not saved in the number. The sign is 0 (positive) or 1 (negative). This means you have a representation of: +0.0 and -0.0. The exponent is about 1/6th the total size in bits. The bias is added/subtracted from the exponent. In the end, it is a signed power of 2 exponent (i.e. exercises a shift on the mantissa.) The mantissa forms the current number.

  • group