I was using mcrypt to encrypt json_encoded data. On other side, mycrypt was able to decrpyt data but json_decode was not working. It would throw JSON_ERROR_CTRL_CHAR error. However, without mcrypt, json_decode worked flawlessly. After some trial and error, I found that applying trim function after decrypting data would let me use json_decode without any issues.
I usually run it from under a partition which is running out of space. It can take a while. du -g | sort -n -r
Playing with Cordova, I was getting this error when building iOS version: Even full install of Xcode didn’t fix this error. The solution was to run following command to use full Xcode instead of command line tools version that I had installed earlier: sudo xcode-select –switch /Applications/Xcode-beta.app/Contents/Developer
I followed instructions here: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-ubuntu-18-04 Everything seemed okay but email were not getting delivered. Logs showed me that smtp connections were timing out: However, I could ping any of above ip addresses just fine. Next step was to see if ip address of my VPS was blacklisted in RBLs, I used https://mxtoolbox.com/blacklists.aspx. None of my ip addresses… Continue reading Setup Outgoing Email on Lightsail Ubuntu VPS
Put enctype=”multipart/form-data” in your form tag.
Without full understanding, I had enabled HSTS on amerkhalid.com with option includeSubDomains. I had a subdomain that was used as “Custom Domain” to SmugMug site. After enabling HSTS, these subdomains started to throw NET::ERR_CERT_COMMON_NAME_INVALID. The fix is of course simple, don’t use includeSubDomains. But that opens up your top level domain to man in middle attacks. For now, I decided… Continue reading hsts Neterr_cert_common_name_invalid
While playing with https://github.com/alexa/interactive-adventure-game-tool, I ran into following error: The solution was to update require-dir to version 0.3.2 in package.json and run npm install again.
I tried to do this all by myself but got stuck, ended up transpiling this solution in PHP.
Here is my solution to this problem in PHP: