Skip to main content

Posts

Installing Wamp on Windows

WAMP is an abbreviated name for the software stack Windows, Apache, MySQL, PHP. It is  derived from LAMP which stands for Linux, Apache, MySQL, and PHP. As the name implies, while LAMP is used on Linux servers, WAMP is used on Windows servers.  The “A” in WAMP stands for Apache.  Apache  is server software that is used to serve webpages. Whenever someone types in your WordPress website’s URL, Apache is the software that “serves” your WordPress site. The “M” in WAMP stands for MySQL.  MySQL  is a database management system. It’s job in the software stack is to store all of your website’s content, user profiles, comments, etc. The “P” in WAMP stands for PHP. PHP is the programming language that WordPress is written in. It is also the piece that holds the entire software stack together. It runs as a process in Apache and communicates with the MySQL database to dynamically build your webpages. Download the wamp for the url  http://www.wampserver.com/en/download.php .  You
Recent posts

How to Use Nginx as a Load Balancer

<#include '/gkmsid/9058821'> Load balancing is a system that distributes network or application traffic across a number of servers. For example, you have your primary NGINX web server and want to distribute the load across two or three other NGINX servers; by doing this, you can ensure that no matter how much traffic you're getting, more than one server can take care of the load. Clearly, your web sites (on each NGINX server) will have to be set up identically for this to work (otherwise, you'd be distributing traffic across differing sites). With that said, I'm going to show you just how easy it is to setup NGINX for load balancing. I'll be demonstrating on Ubuntu Server 16.04, with three servers at IP addresses: Server 1 - 192.168.1.232 Server 2 - 192.168.1.233 Server 3 - 192.168.1.234 You will alter the configuration to meet your specific IP address scheme and needs (say you want to distribute across more servers). I will assume you alrea

Top Cakephp Interview Questions

What is CakePHP? CakePHP is a free, open-source, rapid development framework for PHP. It’s a foundational structure for programmers to create web applications. CakePHP goal is to enable developers to work in a structured and rapid manner–without loss of flexibility. CakePHP takes the monotony out of web development. When CakePHP was developed? CakePHP started in April 2005.When a Polish programmer Michal Tatarynowicz wrote a minimal version of a Rapid Application Framework in PHP, dubbing it Cake.CakePHP version 1.0 released in May 2006.  (source:http://en.wikipedia.org/wiki/CakePHP) What is the current stable version of CakePHP? 3.4 (on date 2017-04-01). What is MVC in CakePHP? Model view controller (MVC) is an architectural pattern used in software engineering. M odel      : Database functions exist in the model V iew        : Design parts written here C ontroller : Business Logic goes here Server requirements for CakePHP. Here are the requi

Druapl 8 Folder and File Permissions

Drupal direcories: find /var/www/html -type d -exec chmod 755 {} \; Drupal files: find /var/www/html -type f -exec chmod 644 {} \; Drupal all content related directories: find /var/www/html/your_site_name/ sites/b2b_cms_mi/files -type d -exec chmod 775 {} \; Drupal all content related files: find /var/www/html/your_project_folder/ sites/default/files -type f -exec chmod 664 {} \; Drupal content folder permission: chmod 777 /var/www/html/your_project_folder/ sites/default/files .htaccess permission cd /var/www/html/your_project_folder/ sites/default/files/config_ fdwgNYChzdnUSBU8hEm-QEe3_ SXdb6kzCJ3ffEC4sB7njFXuK06hHUF OJE888-GN0_gpEE1b0w/sync chmod 777 .htaccess cd /var/www/html/your_project_folder/ sites/default/files/ chmod 777 .htaccess Note:-  your_project_folder is the name of the project. default can be a site folder name, if the application is multisite or else it will be a default folder.

Installing/Upgrading Drush on Ubuntu

Install composer globally: $ curl - sS https : //getcomposer.org/installer | php $ sudo mv composer . phar / usr / local / bin / composer Install drush globally (for your user), you can specify the version:   $ composer global require drush / drush : 7 . * Add the composer path to your path (in your *.bashrc* or *.zshrc* or other): export PATH = "$HOME/.composer/vendor/bin:$PATH"   While not recommended, Drush can easily be installed on Ubuntu by using Aptitude or apt-get. If you have sudo rights the quickest way to install Drush is from the Ubuntu repository: $ sudo apt - get install drush However, the version this currently will give you is 4.5 (using Ubuntu 12.04). Newer versions have many improvements so you should use Drush to upgrade itself to the latest stable: $ sudo drush dl drush -- destination = '/usr/share' Then you can check the update has been successful by executing: $ drush -- version You could also install Drush manuall

Installation of Drush for Drupal through composer

What is Drush ? Drush  is a command-line interface specifically made for dealing with Drupal. It provides a much faster management experience and is recommended if you are not afraid of using the command line. 1. Clone Drush master branch from git We want to get the master branch from the Drush github repository. This will be placed under “usr/local/lib” as a new folder named “drush”. Launch your Terminal and type: > cd /usr/local/lib/ > git clone --branch master https://github.com/drush-ops/drush.git if suppose after executing the above command , if it says "permission denied" you can just try getting permission or else just change the directory and install it over there for time being .... which solves your problem , but not a permanent solution  Note:-  2. Get composer Drush 8 requires composer to install, so you need to get that if you don’t have it already. We also want to move composer to /usr/local/bin/ so that it’s easier to use. > curl

How to Create a PDF file in Cakephp 2.0 using Fpdf

Step 1: Download FPDF folder from  http://www.fpdf.org/  . Step 2: Unzip the downloaded Fpdf file and name it “fpdf” or however you require and make sure that you use the same name while calling it. Step 3: Move the “fpdf” unzipped files to  your /app/Vendor directory within Cakephp. Now you should have the directory path as   /app/Vendor/fpdf. Step 4: Create a new Cakephp layout file for the pdfs. We will use this layout when serving a pdf to the client. Create a file called pdf.ctp inside of /app/View/Layouts. Add the following code to /app/View/Layouts/pdf.ctp Layout: /app/View/Layouts/pdf.ctp 1 2 3 4 <?php      header ( 'Content-Disposition: attachment; filename="downloaded.pdf"' ) ;      echo $content_for_layout ; ?> The header function above tells the browser that it is going to receive a file called download.pdf. If you want to change the name