In the first part I discussed how to install and configure Docker for PHP based application. In this post, we will be building a full-fledged PHP application that will be communicating with MySQL. Docker Compose In the last post you learned how to install the docker itself and create a Dockerfile. Using command line based tools like docker build and docker run could be tedious in real-world scenarios where you have to run multiple containers. You can consider Compose a batch file that contains a set of instructions, commands to perform operation. Just like you create a Dockerfile to define how your image look like, in docker-compose.yml file you can…
-
-
Getting started with Docker
A step by step tutorial to install docker on your machine and run your first PHP web application in it
-
How to setup PHP7.1, Apache 2.2 on Amazon Linux
OK I had no plan to make this post but recently I spent quite a few time to figure it out so thought to make it as a post for self and others who come across issue to deal with this simply thing otherwise. Alright, let’s proceed! Below is the details of my Amazon Distro: cat /etc/*-release NAME="Amazon Linux AMI" VERSION="2017.09" ID="amzn" ID_LIKE="rhel fedora" VERSION_ID="2017.09" PRETTY_NAME="Amazon Linux AMI 2017.09" ANSI_COLOR="0;33" CPE_NAME="cpe:/o:amazon:linux:2017.09:ga" HOME_URL="http://aws.amazon.com/amazon-linux-ami/" Amazon Linux AMI release 2017.09 Repo setting Before we proceed, first make sure that you are downloading stuff from the right repository. Remove all irrelevant repos, specially remi-safe. wget https://mirror.webtatic.com/yum/el6/latest.rpm sudo yum install latest.rpm sudo vi /etc/yum.repos.d/webtatic.repo 'set…
-
Mbstring not found error while installing mailparse PHP extension
Today I had to install mailparse via PEAR. On installing I came across one of the errors: mbstring not found despite of it was right there. One of the simplest option to fix it is given below. Though I am working on MAMP but it will work with anyone since it’s part of PHP Source. Go to your PHP Source Library. In my case it is: /Applications/MAMP/bin/php/php7.0.8/include/php/ext/mbstring/libmbfl/mbfl and add following lines in mbfilter.h #undef HAVE_MBSTRING #define HAVE_MBSTRING 1 and then run PEAR command again pear install pecl/mailparse If all goes well it should give something like: Build process completed successfully Installing '/Applications/MAMP/bin/php/php7.0.8/lib/php/extensions/no-debug-non-zts-20151012/mailparse.so' install ok: channel://pecl.php.net/mailparse-3.0.1 configuration option "php_ini" is not set to…
-
Develop your first Facebook messenger bot in PHP
(Credit: Independent.co.uk) Facebook recently announced a Bot platform for it’s Messenger which provides businesses and individuals another way to communicate with people. What is a Chat bot? A computer program designed to simulate conversation with human users, especially over the Internet. Chat bot in PHP When I heard of it, my very first thought was to a bot in PHP. I started to find some SDK in this regard released by Facebook but none was present. I headed over to documentation which provided good information for starters. Ok! so without wasting further time, let’s build our first Bot Timebot In order to create an Fb bot you will need two things to…
-
LxD Series: Initial Laravel App design
I am extremely sorry. It took me a while to make this post. I got totally engaged in other things that made me to stay away from this. I am making this post, as a filler to end inertia. ٰIn previous post I discussed how to install and configure Laravel. In this post I am sharing a few screens of the web app we are going to build. First screen will be a dashboard which users will see after logging in. Second is showing list of project while the third is entry form. In next couple of posts I will be discussing MVC basics and how Laravel implemented them. As…