PHP

now browsing by category

 

CURL response is empty; API server running on Docker container

My API endpoint (for example http://localhost:3000) server running on Docker container. Initiated curl session in PHP (vagrant box) and the response was empty. Here is the code sample without proxy.

I then read docker networking docs and solved my problem setting docker ip as curl proxy. Here are the steps:

Step 1: Find your docker ip
1. Find your container ID:

2. Grab your docker ip by container ID:

Here is the final PHP code example:

ImageMagick delegate failed error – Fix

ImageMagick is a great tool to create, edit, compose, or convert images. I was working on converting DNG files into JPG using ImageMagick and convert command was throwing following errors.

After spending several hours I found ImageMagick uses other programs to read some image formats including DNG. One of such program is Unidentified Flying Raw (UFRaw) which is a utility to read and manipulate raw images from digital cameras.

When you can not sort out errors listed above while converting your DNG images then install UFRaw and see the magic of ImageMagick again.. 🙂