Wednesday, January 27, 2016

How to Install WampServer on Windows — Step-by-Step Guide

WAMP (Windows, Apache, MySQL, PHP) is an all-in-one package that installs the basic programs required to run a localhost and build PHP applications. Once installation completes, WampServer provides a tray icon for managing services and settings.

Prerequisites

  • A Windows machine (choose the appropriate 32-bit or 64-bit package depending on your OS).
  • Internet access to download the installer.

Download

Download WampServer from the official site:

Step-by-step installation

  1. Select the correct installer (32-bit or 64-bit) for your Windows installation and download the package. You will see a WampServer installer file at your download location.

  2. Double-click the installation package. Windows may show a security warning — this is expected when running third-party installers. Click Run to proceed.

WampServer installer icon

  1. You will see the standard Windows setup wizard. Proceed through the initial dialogs.

Setup wizard screenshot

  1. Agree to the WampServer license to continue.

License agreement screenshot

  1. Choose the installation location. The author recommends installing WampServer on a drive other than the Windows system drive (for example, D: or E: instead of C:). After selecting the folder, click Next.

Choose installation location

  1. Select additional tasks (optional):
  • Create a Quick Launch icon
  • Create a Desktop icon

Select additional tasks

  1. Click Install to begin the installation.

Installing WampServer progress

  1. The installer copies files and configures bundled services (Apache, MySQL, PHP, phpMyAdmin, SqlBuddy).

Installation progress screenshot

  1. During installation you may be prompted to select a default browser for WampServer (used by some WampServer utilities). If unsure, click Open; Internet Explorer will be the default choice if none is selected.

Choose default browser dialog

  1. After the installer finishes copying files, setup continues with Apache configuration. Windows Firewall may prompt for access. Leave the default options and click "Allow Access" so Apache can accept local connections (this dialog may not appear if Windows Firewall is disabled).

Windows Firewall allow access dialog

  1. You will be prompted for SMTP settings used by PHP's mail() function. The author recommends the following default values during installation:
SMTP: localhost
Email: your-email@example.com

(You can change these later to point to a real SMTP server if required.)

SMTP configuration dialog

  1. Finish the installation and leave "Launch Wamp Server now" checked to start the services immediately.

Installation finished - click Finish

WampServer tray icon states

WampServer adds a tray icon that reflects service status:

  • Red: WampServer is offline; Apache, PHP and MySQL services are not started.
  • Yellow: WampServer is partially offline; one or more services failed to start.
  • Green: All services are running and the development server is ready to use.

WampServer icon states

Yellow state screenshot

Green state screenshot

Testing WampServer

  1. Ensure the WampServer tray icon is green.
  2. Open your web browser and navigate to:
http://127.0.0.1/

or

http://localhost/
  1. If the installation was successful you will see the WampServer welcome screen and server configuration options.

WampServer welcome screen

Final notes

  • After successful installation you will have Apache, MySQL, PHP, phpMyAdmin and SqlBuddy available locally.
  • You are now ready to develop PHP/MySQL applications on your machine.

If you maintain other tutorials on this blog, link from here to:

  • a phpMyAdmin guide,
  • a first PHP page tutorial using localhost,
  • a troubleshooting guide for WampServer service start failures.

These help readers go from installation to practical usage without leaving the site.

Saturday, January 23, 2016

How to Add a Popup Inquiry Form to a Joomla Site (jQuery Ajax Quick Contact)

Greetings of the Day,

TL;DR

Install the free "jQuery Ajax Quick Contact for Joomla with Popup Function" module, configure it as a pop-up module, set the recipient email, assign module positions/pages, publish it — then test the popup on the site.

Prerequisites

  • Administrator access to your Joomla site's backend
  • The module ZIP file downloaded from the vendor
  • Confirm module compatibility with your Joomla version
  • Take a quick backup before installing new extensions

Overview

I was working on a website development for one of my customers. The requirement was: apart from the contact form, they wanted an inquiry form on the home page and side bars — a popup contact form when users click the button.

Instead of developing this from scratch I searched for available extensions and found a suitable free extension: jQuery Ajax Quick Contact for Joomla with Popup Function from JExtentions.

Steps

1. Download the module

First download the extension from the JExtentions Downloads page:

http://jextensions.com/jquery-ajax-quick-contact-module/

2. Login to Joomla administrator

Login to the administrative panel of your Joomla site.

Admin login screenshot

3. Go to Extensions > Manage

Select Extensions in the main menu and click Manage.

Extensions Manage screenshot

4. Install the module

Use the Upload & Install option, choose the downloaded ZIP file and upload.

Upload & Install screenshot

You should get an installation successful message.

Install successful screenshot

5. Open Modules (Extensions > Modules)

Go to Modules in the Extensions menu to find the newly installed JE Quick Contact module.

Modules list screenshot

Open the JE Quick Contact module and configure it.

JE Quick Contact module screenshot

6. Configure the module

  • Select Enable in the jQuery dropdown.
  • Select "Pop Up" as the display type.
  • Enter the pop up button text as desired.
  • Update other configuration values as needed (see the screenshot below for the example configuration).

Module configuration screenshot

Important: Enter the recipient's email address in the module settings. Without a valid recipient email the popup form will not send messages.

Recipient email screenshot

7. Position and publish

  • Select the module position where you want the popup button to appear.
  • Set the module Status to Published.
  • Use the Menu Assignment tab to choose which pages should display the button.

Position & menu assignment screenshot

Save & Close the module.

8. Verify on the frontend

Go to your website and confirm the popup button appears in the chosen position. Click the button to open the popup inquiry form.

Frontend button screenshot

Popup form screenshot

That's it. Happy Coding !

Troubleshooting (short)

  • If installation fails: check file upload limits, folder permissions, and Joomla error logs.
  • If emails are not received: verify the recipient email, check spam folder, and confirm Joomla email settings or SMTP configuration.
  • If the popup button doesn't show: confirm module position, menu assignment, and that the module is published.

Notes and next steps

  • Verify the module is compatible with your Joomla version before installing.
  • Consider compressing or rehosting large images to improve page speed.
  • Add alt text to each image for accessibility and SEO.

References:

Friday, January 22, 2016

Joomla: Fix "Allowed memory size exhausted" PHP error (increase memory_limit safely)

I hosted my website on a Linux server. While I accessed the Contact us page of the site I got the error below:

"Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php"

The error message included the full path to the PHP file, for example: public_html//plugins/system/xyz.php and the line number where the error occurred (in my case it was line 79).

What this error means

PHP enforces a memory limit per process (memory_limit). The message "Allowed memory size of 33554432 bytes exhausted" means a PHP script tried to use more than the configured limit (here 33554432 bytes = 32M).

Common causes:

  • Large data processing (big arrays, large file handling, image processing).
  • A plugin or extension requiring more memory.
  • A bug or infinite loop that consumes memory.
  • A default server-level limit (especially on shared hosting).

Quick, safe fixes (in recommended order)

1) Diagnose first

  • Check the file and the reported line number (e.g., public_html//plugins/system/xyz.php line 79). Look for obvious loops, large allocations or file reads.
  • Temporarily enable error reporting or check logs for fuller stack traces.
  • Use phpinfo() (create a small PHP file with ) to see the configured memory_limit.

2) Increase memory for a single script (temporary)

If you need a quick temporary increase for debugging, you can add an ini_set call near the top of the script that triggers the error. Example (original author snippet):

ini_set('memory_limit', '-1');

Warning: iniset('memorylimit', '-1') removes the limit entirely. This is not recommended on production systems because it can allow runaway processes to consume all server RAM. Prefer setting a specific larger limit, for example:

ini_set('memory_limit', '128M');

Place the iniset line just before the memory-intensive operation or near the top of the plugin file reported in the error (for example, just above line 79 in publichtml//plugins/system/xyz.php). This change affects only the running PHP process executing that file.

3) Make a permanent server-level change (preferred when you control the server)

  • php.ini (global change):

Open your php.ini and change or add:

memory_limit = 128M

Restart the web server (apache/nginx + php-fpm) after changing php.ini.

  • .htaccess (if PHP runs as an Apache module and your host allows it):
php_value memory_limit 128M
  • Joomla configuration (depending on setup):

If you cannot change system files, you can try adding iniset calls in a central place that runs early (but be cautious). On some hosts iniset is disabled.

4) Contact your hosting provider

If you are on shared hosting, the host may enforce a hard limit. Contact support to request a memory increase or upgrade your plan.

Diagnostic steps to avoid simply raising the limit

  • Review the plugin code (here: plugins/system/xyz.php). Try disabling the plugin temporarily to confirm it is the source.
  • Search for large data structures or excessive recursion.
  • Update the extension or check for known bugs.
  • If the operation is intended (e.g., processing very large files), consider reworking the code to use streaming, chunked processing, or temporary files instead of keeping everything in memory.

Example: where to insert ini_set in a plugin file

Open the PHP file referenced in the error (e.g., publichtml//plugins/system/xyz.php) and add an iniset line near the top, before the memory-intensive code runs. For example:

<?php
// plugins/system/xyz.php

// Temporary increase - prefer specific value over -1
ini_set('memory_limit', '128M');

// rest of the plugin code ...

Again: prefer a specific limit (e.g., 128M) over '-1'. Use '-1' only for controlled debugging on a development machine.

Safety and rollback

  • Always make a backup of any file before editing.
  • Test changes on a development or staging site first.
  • If you added ini_set and the page works, use that as a temporary measure while you find the root cause. Remove or reduce the override once you address the memory usage.

Summary checklist

  • Verify file and line number from the error message.
  • Inspect code for loops or big allocations.
  • Try a temporary iniset('memorylimit', '128M') if you control the environment.
  • Prefer changing php.ini or .htaccess for permanent needs.
  • Contact your host if limits are enforced at the server level.
  • Fix the root cause (optimize code, update plugin) rather than permanently removing limits.

That's it. Happy Coding

Thursday, January 21, 2016

How to Enable Google's reCAPTCHA in Joomla — Step‑by‑Step

Introduction

Captcha’s are parts of a website where you sometimes need to type in a word or recognize the images to prove you're a human. Captchas are a great way to prevent spam activity on your website because most "bots" that attempt to post spam cannot read the letters contained in the captcha image.

For years, using Captcha sites prompted users to confirm they aren’t robots by asking them to read distorted text and type it into a box.

Example of a text-based CAPTCHA

But Google released a new API that simplifies the reCAPTCHA experience by just directly asking the users whether or not they are robots. They called it "No CAPTCHA reCAPTCHA". This is how it looks:

No CAPTCHA reCAPTCHA checkbox example

In this article we're going to walk you through the steps for enabling CAPTCHA / reCAPTCHA (Google) in Joomla.

Prerequisites

  • A Joomla administrator account with access to Extensions > Plugin Manager and System > Global Configuration.
  • A Google account to create reCAPTCHA keys (Site key and Secret key).

Obtain your reCAPTCHA keys

  1. Sign in with your Google account at the Google reCAPTCHA admin panel and register your site to obtain Site and Secret keys:

Create a reCAPTCHA key: https://www.google.com/recaptcha/admin#list

  1. When registering, add your website domain and choose the appropriate reCAPTCHA type (the article refers to the No CAPTCHA checkbox flow; Google now offers v2/v3 and Invisible reCAPTCHA — confirm the current choice in Google's admin).

Step-by-step: Enable reCAPTCHA in Joomla

  1. Log in to your Joomla administrator back-end.

  2. Go to Extensions > Plugin Manager (or find Plugin Manager from the Control Panel).

Joomla Plugin Manager screenshot

  1. Edit the "Captcha - ReCaptcha" plugin.

Edit Captcha ReCaptcha plugin screenshot

a) Set Status to "Enabled".

b) Copy and paste the Site Key and Secret Key from the Google reCAPTCHA admin into their appropriate fields in the plugin settings.

  • You will get the Site and Secret keys by signing in with your Google account here: https://www.google.com/recaptcha/admin#list
  • Once you have registered your website domain, Google will provide your reCAPTCHA keys.

c) Click Save & Close.

Configure Global settings (Contact forms and Registration)

  1. To enable reCAPTCHA for Contact forms and Registration:

a) Go to System > Global Configuration and select the "Site" tab.

Global Configuration - Site tab screenshot

b) In the Default Captcha field choose "Captcha - ReCaptcha".

Default Captcha selection screenshot

c) Click Save & Close.

Configure Registration form-specific behavior

  1. To control reCAPTCHA behavior specifically for user registration (if you need different behavior from the Global Configuration):

a) Go to Users > User Manager.

User Manager screenshot

b) Click "Options" and open the Component tab.

User component options screenshot

c) In the Component tab choose one of the Captcha options:

  • Use Default — follows the Default Captcha setting in Global Configuration.
  • None Selected — ignores the Default Captcha; use this if you want reCAPTCHA in Contact forms but not in Registration.
  • Captcha - ReCaptcha — forces reCAPTCHA for registration even if Global Configuration is set to None.

User component captcha choices screenshot

Click Save & Close.

Troubleshooting and verification

  • Verify the Site and Secret keys are correct and correspond to the registered domain in the Google admin panel.
  • Clear Joomla cache and browser cache after saving plugin/global settings.
  • If reCAPTCHA does not appear, confirm the Captcha plugin is "Enabled" in Plugin Manager and that another extension is not conflicting.
  • Test your Contact form and the Registration form to ensure the reCAPTCHA widget displays and submission succeeds.

Notes

  • The article refers to Google's "No CAPTCHA reCAPTCHA" (checkbox flow). Google offers multiple reCAPTCHA variants (v2 checkbox, Invisible reCAPTCHA, and v3). Confirm the reCAPTCHA type you registered in the Google admin panel before copying keys.

  • Official Google reCAPTCHA admin: https://www.google.com/recaptcha/admin#list

That's it!

Wednesday, January 20, 2016

Android Studio Installation — Setup Guide for Windows, macOS & Linux

Earlier I used to develop android applications using Eclipse IDE. Recently Google has released their own android IDE called as Android Studio. This is now the official Android IDE. So I installed Android Studio and thought of recording and sharing the steps. Here we go.

Android Studio welcome image

Table of Contents

Why Android Studio

Code editor screenshot

At the core of Android Studio is an intelligent code editor capable of advanced code completion, refactoring, and code analysis. The powerful code editor helps you be a more productive Android app developer.

  1. Intelligent code editor

Project templates and GitHub integration

  1. Code templates and GitHub integration

New project wizards make it easier than ever to start a new project. Start projects using template code for patterns such as navigation drawer and view pagers, and even import Google code samples from GitHub.

  1. Multi-screen app development

Multi-screen layout editor

Build apps for Android phones, tablets, Android Wear, Android TV, Android Auto and Google Glass. With the new Android Project View and module support in Android Studio, it's easier to manage app projects and resources.

  1. Virtual devices for all shapes and sizes

AVD Manager and emulator screenshot

Android Studio comes pre-configured with an optimized emulator image. The updated and streamlined Virtual Device Manager provides pre-defined device profiles for common Android devices.

  1. Android builds evolved, with Gradle

Gradle build system screenshot

Create multiple APKs for your Android app with different features using the same project. Manage app dependencies with Maven. Build APKs from Android Studio or the command line.

More About the Studio

  • Built on IntelliJ IDEA Community Edition, the popular Java IDE by JetBrains.
  • Flexible Gradle-based build system.
  • Build variants and multiple APK generation.
  • Expanded template support for Google Services and various device types.
  • Rich layout editor with support for theme editing.
  • Lint tools to catch performance, usability, version compatibility, and other problems.
  • ProGuard and app-signing capabilities.
  • Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine.

System Requirements

Windows

  • Microsoft® Windows® 8/7/Vista (32 or 64-bit)
  • 2 GB RAM minimum, 4 GB RAM recommended
  • 400 MB hard disk space
  • At least 1 GB for Android SDK, emulator system images, and caches
  • 1280 x 800 minimum screen resolution
  • Java Development Kit (JDK) 7
  • Optional for accelerated emulator: Intel® processor with support for Intel® VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality

Mac OS X

  • Mac® OS X® 10.8.5 or higher, up to 10.9 (Mavericks)
  • 2 GB RAM minimum, 4 GB RAM recommended
  • 400 MB hard disk space
  • At least 1 GB for Android SDK, emulator system images, and caches
  • 1280 x 800 minimum screen resolution
  • Java Runtime Environment (JRE) 6
  • Java Development Kit (JDK) 7
  • Optional for accelerated emulator: Intel® processor with support for Intel® VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality

On Mac OS, run Android Studio with Java Runtime Environment (JRE) 6 for optimized font rendering. You can then configure your project to use Java Development Kit (JDK) 6 or JDK 7.

Linux

  • GNOME or KDE desktop
  • GNU C Library (glibc) 2.15 or later
  • 2 GB RAM minimum, 4 GB RAM recommended
  • 400 MB hard disk space
  • At least 1 GB for Android SDK, emulator system images, and caches
  • 1280 x 800 minimum screen resolution
  • Oracle® Java Development Kit (JDK) 7

Installing Android Studio

Android Studio provides everything you need to start developing apps for Android, including the Android Studio IDE and the Android SDK tools. If you didn't download Android Studio, go download Android Studio now, or switch to the stand-alone SDK Tools install.

Before you set up Android Studio, be sure you have installed JDK 6 or higher (the JRE alone is not sufficient)—JDK 7 is required when developing for Android 5.0 and higher. To check if you have JDK installed (and which version), open a terminal and type:

javac -version

If the JDK is not available or the version is lower than version 6, download the Java SE Development Kit 7: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

General notes before setup

  • Android Studio provides the IDE and manages SDK packages. Individual tools and other SDK packages are saved outside the Android Studio application directory (for example, \Users\\sdk\ on Windows or /Users//Library/Android/sdk/ on macOS).
  • If your launcher script does not find Java on Windows, set the JAVAHOME environment variable to point to your JDK installation (for example C:\Program Files\Java\jdk1.7.021).

To set up Android Studio on Windows:

  1. Launch the .exe file you just downloaded.
  2. Follow the setup wizard to install Android Studio and any necessary SDK tools. I have installed it on Windows 10. Here are the steps as below:

Android Studio installer step

Once you launched Android Studio, it's time to mention JDK path in android studio installer.

JDK path dialog

Below the image initiating JDK to android SDK:

JDK setup screenshot

On some Windows systems, the launcher script does not find where Java is installed. If you encounter this problem, you need to set an environment variable indicating the correct location.

Select Start menu > Computer > System Properties > Advanced System Properties. Then open Advanced tab > Environment Variables and add a new system variable JAVAHOME that points to your JDK folder, for example C:\Program Files\Java\jdk1.7.021.

The individual tools and other SDK packages are saved outside the Android Studio application directory. If you need to access the tools directly, use a terminal to navigate to the location where they are installed. For example:

\Users\<user>\sdk\

Need to check the components, which are required to create applications; below the image has selected Android Studio, Android SDK, Android Virtual Machine and performance (Intel chip).

Component selection

Need to specify the location of local machine path for Android studio and Android SDK, below the image has taken default location.

Paths selection

Specify the RAM for Android emulator (by default it takes 512MB of local machine RAM).

Emulator RAM selection

At final stage, it would extract SDK packages into our local machine; it would take a while to finish the task.

SDK extraction progress

After done all above steps perfectly, you must get finish button and it gonna be open android studio project with Welcome to android studio message as shown below:

Welcome to Android Studio

You can start your application development by calling start a new android studio project. In a new installation frame it will ask Application name, package information and location of the project.

To set up Android Studio on Mac OSX:

  1. Launch the .dmg file you just downloaded.
  2. Drag and drop Android Studio into the Applications folder.
  3. Open Android Studio and follow the setup wizard to install any necessary SDK tools.

If you need to use the Android SDK tools from a command line, you can access them at:

/Users/<user>/Library/Android/sdk/

To set up Android Studio on Linux:

  1. Unpack the downloaded ZIP file into an appropriate location for your applications.
  2. To launch Android Studio, navigate to the android-studio/bin/ directory in a terminal and execute studio.sh.

You may want to add android-studio/bin/ to your PATH environmental variable so that you can start Android Studio from any directory.

  1. If the SDK is not already installed, follow the setup wizard to install the SDK and any necessary SDK tools.

Note: You may also need to install the ia32-libs, lib32ncurses5-dev, and lib32stdc++6 packages. These packages are required to support 32-bit apps on a 64-bit machine.

Troubleshooting and notes

  • If the launcher script does not find Java on Windows: set the system-level JAVA_HOME environment variable pointing to your JDK.
  • Emulator acceleration: to get best performance install Intel HAXM on Intel machines or use the platform hypervisor supported by your OS. (Follow official docs for current steps.)
  • SDK path: the SDK is installed outside Android Studio; note the path when you accept defaults.

Reference

Reference: developer.android.com