dracoblue.net

Set Sender/Reply-To for sendmail in PHP

Today I tried to configure the sender for sendmail in php. There are some ways how to do it, so I share my solution.

There is a sendmail_from setting in php cli and php fpm, but it is usually empty. So sendmail fallsback to user@hostname (given you are logged in as user and the machine is called hostname).

But I found a better way (maybe even easier to extend). Just change the sendmail_path to something with an extra -f [email protected] at the end.

Continue reading ...

In open source, php, sendmail, ubuntu by DracoBlue @ 09 Jul 2014 | 204 Words

How to enter/ssh into your docker container

If you want to debug or enter your docker container, you might think that you will easily run a sshd server and that's fine. But it's wrong and most of all: it's not necessary.

Like @jpetazzo explained in "Docker SSHD considered evil": containers run with only one executable as main process. So if you want to have a sshd next to your php-fpm, you will need monit or supervisor to launch them. That's already 3 services in total!

That's why: keep your docker image clean!

But how to enter the container? There is a little tool called "nsenter" (available with util-linux >= 2.24)

Continue reading ...

In docker, open source, ubuntu, vm by DracoBlue @ 09 Jul 2014 | 267 Words

HTTP method hints in media types considered harmful

If you are working on a new API for one of your projects, you might consider a media type like HAL or Collection+JSON as an option for structuring your API responses.

First of all, check out api-craft mailinglist or hal-discuss mailinglist for really good ontopic discussions about api architectures and media types.

Common JSON media types do not support a method parameter on relations

In HAL relations are defined in links, like this (e.g. self and http://example.org/rels/appointment/cancel):

{
     "_links": {
       "self": { "href": "/appointment/123" },
       "http://example.org/rels/appointment/cancel": { "href": "/appointment/123" }
     },
     "patient_id": "jsmith"
   }

Even though the relations for a patient appointment are available, it's not clear which http method to use.

Continue reading ...

In api, api-design, hal, hateoas, open source, rest by DracoBlue @ 29 May 2014 | 495 Words

Jsb 2.0.0 released

I finally released a new major version of jsb.

With 2.0 there are two breaking changes (you might still use 1.x series, if you rely on those.

  1. The global JsBehaviourToolkit got removed #20.
  2. A input[hidden] cannot be used as data source anymore #17.

That's it.

But jsb 2.0 comes with some cool additions.

Continue reading ...

In javascript, jquery, jsb, mootools, open source by DracoBlue @ 18 May 2014 | 351 Words

Facebook Api throws unsupported get request

While working with the facebook api (to fetch data about a facebook page), I noticed the following error:

{
  "error": {
    "message": "Unsupported get request.",
    "type": "GraphMethodException",
    "code": 100
  }
}
Continue reading ...

In api, facebook by DracoBlue @ 05 May 2014 | 184 Words

Page 5 - Page 6 - Page 7

Give something back

Were my blog posts useful to you? If you want to give back, support one of these charities, too!

Report hate in social media Campact e.V. With our technology and your help, we protect the oceans from plastic waste. Gesellschaft fur Freiheitsrechte e. V. The civil eye in the mediterranean

Recent Dev-Articles

Read recently

Recent Files

About