How to Set a Domain name for xampp server project like: example.com

If you want to give a domain name for your Xampp Project, YES! Here you Can do it easily… Just Follow the Below Steps-

Step-1:

Open Your XAMPP Folder, Where You Have Installed.

Then, Go to folder apache,

Then, Open Folder conf,

Then, Open Folder extra.

The Full Path is Like,

PATH::    C:\xampp\apache\conf\extra

Now, Open “httpd-vhosts.conf” in an Editor

FILE NAME:: httpd-vhosts.conf
open file named – httpd-vhosts.conf

Here, You can see the line of code, Like-


#Virtual Hosts
#
#Required modules: mod_log_config
#If you want to maintain multiple domains/hostnames on your
#machine you can setup VirtualHost containers for them. Most configurations
#use only name-based virtual hosts so the server doesn't need to worry about
#IP addresses. This is indicated by the asterisks in the directives below.
#
#Please see the documentation at

#for further details before you try to setup virtual hosts.
#
#You may use the command line option '-S' to verify your virtual host
configuration.
#Use name-based virtual hosting.

#NameVirtualHost *:80
#VirtualHost example:
#Almost any Apache directive may go into a VirtualHost container.
#The first VirtualHost section is used for all requests that do not
#match a ##ServerName or ##ServerAlias in any block.
#

##ServerAdmin [email protected]
##DocumentRoot "C:/xampp/htdocs/dummy-host.example.com"
##ServerName dummy-host.example.com
##ServerAlias www.dummy-host.example.com
##ErrorLog "logs/dummy-host.example.com-error.log"
##CustomLog "logs/dummy-host.example.com-access.log" common


##ServerAdmin [email protected]
##DocumentRoot "C:/xampp/htdocs/dummy-host2.example.com"
##ServerName dummy-host2.example.com
##ErrorLog "logs/dummy-host2.example.com-error.log"
##CustomLog "logs/dummy-host2.example.com-access.log" common


Here, at the End of file just add the below code. here example.com is your project domain name. You Can change it as you want..


ServerAdmin [email protected]
DocumentRoot "C:/xampp/htdocs/example.com"
ServerName example.com
ErrorLog "logs/example.com-error.log"
CustomLog "logs/example.com-access.log" common

Step-2:

Now, Open your C drive’s – Windows Folder,

Then, Open System32 Folder,

Then, Open drivers folder,

Then, Open etc folder,

Here, you can find many files. From here Open “hosts” file in an Editor.

PATH::    C:\Windows\System32\drivers\etc
FILE NAME:: hosts

The hosts file content look like – 

Copyright (c) 1993-2009 Microsoft Corp.
#This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names.
#Each entry should be kept on an individual line.
#The IP address should be placed in the first column followed by the corresponding host name.
#The IP address and the host name should be separated by at least one
space.
#Additionally, comments (such as these) may be inserted on individual
lines or following the machine name denoted by a '#' symbol.

#For example:
#102.54.94.97 rhino.acme.com # source server
#38.25.63.10 x.acme.com # x client host

#localhost name resolution is handled within DNS itself.
#127.0.0.1 localhost
#::1 localhost

# Newly Added Project Domain
127.0.0.1 example.com

Here, you can see newly added domain. It is the project domain which we have created in xammp folder in Step-1


127.0.0.1 example.com

Now, Restart your xampp,

Now you can access the project using the domain name.

Now , Just type your given domain name or example.com, the project fill will open.

Finally Done. 

Please enter a valid value. The two nearest valid values are 499.999 and 500.999

 

When Typeing and Click its Showing for Number Field as

“Please enter a valid value. The two nearest valid values are 499.999 and 500.999”

 

And the Data Not Saving?

 

Solution:

Here, You need to use step=”any” as an attribute when working with type=”number” input fields.

Like:

 

<form>
        <input step="any" type="number" name="price" maxlength="5" value="" />
</form>

How to check installed cakephp version?

How to check installed cakephp version?

Project Structure::

-- app
-- lib
     --Cake
          --VERSION.txt
-- plugins
-- vendors
-- index.php

Open The VERSION.txt file. There You will find Like below. Last line show the version of cakephp
Here, You can see, VERSION is 2.8.0

 

////////////////////////////////////////////////////////////////////////////////////////////////////
// +--------------------------------------------------------------------------------------------+ //
// CakePHP Version
//
// Holds a static string representing the current version of CakePHP
//
// CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
// Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
//
// Licensed under The MIT License
// Redistributions of files must retain the above copyright notice.
//
// @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
// @link http://cakephp.org
// @package Cake
// @since CakePHP(tm) v 0.2.9
// @license http://www.opensource.org/licenses/mit-license.php MIT License
// +--------------------------------------------------------------------------------------------+ //
////////////////////////////////////////////////////////////////////////////////////////////////////
2.8.0

 

 

How to get the version numbers for Cakephp

How to get the version numbers for Cakephp

#Project Structure::

-- app
-- lib
    --Cake
        --VERSION.txt
-- plugins
-- vendors
-- index.php

Open The VERSION.txt file. There You will find Like below. Last line show the version of cakephp
Here, You can see, VERSION is 2.8.0

////////////////////////////////////////////////////////////////////////////////////////////////////
// +--------------------------------------------------------------------------------------------+ //
// CakePHP Version
//
// Holds a static string representing the current version of CakePHP
//
// CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
// Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
//
// Licensed under The MIT License
// Redistributions of files must retain the above copyright notice.
//
// @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
// @link http://cakephp.org
// @package Cake
// @since CakePHP(tm) v 0.2.9
// @license http://www.opensource.org/licenses/mit-license.php MIT License
// +--------------------------------------------------------------------------------------------+ //
////////////////////////////////////////////////////////////////////////////////////////////////////
2.8.0

——————————–
OR, Other ways is::
——————————–

Path for version.txt

#Path for version.txt

For cakephp 1.* : cake/VERSION.txt

For cakephp 2.* : lib/Cake/ VERSION.txt

For cakephp 3.* : vendor/cakephp/cakephp/ VERSION.txt

——————————–
OR, Other ways is::
——————————–

Just Print,

echo Configure::version();

 

EBS – Secure Hash Validation Failed

EBS provides the document for the posted data & other formats.

There, we have to pass that required Credentials. like secure hash.

 

//Pass your Registered Secret Key

$hashData = “Your Secret Key“;

$hash = “ebskey”.”|”.urlencode($_POST[‘account_id’]).”|”.urlencode($_POST[‘amount’]).”|”.urlencode($_POST[‘reference_no’]).”|”.$_POST[‘return_url’].”|”.urlencode($_POST[‘mode’]);

$secure_hash = md5($hash);

// now pass $secure_hash secure hash to ebs .

// now pass $secure_hash secure hash to ebs .

 

how to make secure hash to send in ebs payment gateway

Click here: Ebs Invalid Hash