Showing posts with label wamp. Show all posts
Showing posts with label wamp. Show all posts

Friday, April 24, 2015

Prevent accessing XAMPP, Wamp , any server localhost from another local PC by IP



use the commands given in image

1.   insert : $ su
2.   insert password: *******
3.                # cd/etc/apache2/
4.   now there is a file for edit in apache editing
5.   comment the "require all granted "
6    Add "Require ip 127.0.0.1"
7    restart apache 
8                              # sudo service apache2 restart



Happy coding :)

nobody can check your directory by your IP

Thursday, January 8, 2015

How to login without password in phpMyAdmin

How to login without password in phpMyAdmin 



paswordless root login for MySQL. phpMyAdmin however is by default set to not allow that.

If disabled, you'll get the following error when trying to log in without entering the password;


location



/etc/phpmyadmin/config.inc.php


 To enable the option, uncomment or add the following line;
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

there is two times this line  remove comment 
 

The line above need to be added twice; once within within the
if (!empty($dbname)) 
{ statement, and another one outside of it
 (probably towards the end of the configuration file). 

install LAMP in ubuntu (Linux)

LAMP is used to create web project in linux 14.4



LAMP 

Linux Apache MySql Phpmyadmin

use the basic 6 step and Enjoy :)


1. Install Apache
sudo apt-get install apache2


2. Install MySQL
To install MySQL you must install the Metapackage mysql-server. This can be done by searching for and installing in the Software Centre, or by running the following command.
sudo apt-get install mysql-server

3. Install PHP
install the Metapackages php5 and libapache2-mod-php5.sudo apt-get install php5 libapache2-mod-php5

4. Restart Server
sudo /etc/init.d/apache2 restart

5. Check Apache
Open a web browser and navigate to http://localhost/. You should see a message saying It works!

6. Check PHP
php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";'


Congratulations, you have just Installed a Ubuntu LAMP Server!

Thursday, December 11, 2014

Register Confirm Using Mail

create 4 page

1. login.php
2. register.php
3. verify.php
4. Confirm.php


Login.php                                                                                                          
                                                                                                                                

 <html>


</html> 



register.php                                                                                                          
                                                                                                                                  

<?php 
if(isset($_POST['submitform'])){

$name = trim(mysql_escape_string($_POST['name']));
$email = trim(mysql_escape_string($_POST['email']));
$passwords = trim(mysql_escape_string($_POST['pwd']));
$password = md5($passwords);

$query_verify_email = "SELECT * FROM register WHERE email ='$email' and isactive = 1";
$verified_email = mysqli_query($con,$query_verify_email);
if (!$verified_email) {
echo ' System Error';
}
if (mysqli_num_rows($verified_email) == 0) {
// Generate a unique code:
$hash = md5(uniqid(rand(), true));
$query_create_user = "INSERT INTO `register` ( `name`, `email`, `password`, `hash`) VALUES ( '$name', '$email', '$password', '$hash')";
$created_user = mysqli_query($con,$query_create_user);
if (!$created_user) {
echo 'Query Failed ';
}

if (mysqli_affected_rows($con) == 1) { //If the Insert Query was successfull.

$subject = 'Activate Your Email';

$headers = "From: admin@php999.com \r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$url= BASE_PATH . '/verify.php?email=' . urlencode($email) . "&key=$hash";

$message ='<p>To activate your account please click on Activate buttton</p>';
$message.='<table cellspacing="0" cellpadding="0"> <tr>';
$message .= '<td align="center" width="300" height="40" bgcolor="#000091" style="-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;

color: #ffffff; display: block;">';

$message .= '<a href="'.$url.'" style="color: #ffffff; font-size:16px; font-weight: bold; font-family: Helvetica, Arial, sans-serif; text-decoration: none;

line-height:40px; width:100%; display:inline-block">Click to Activate</a>';
$message .= '</td> </tr> </table>';

mail($email, $subject, $message, $headers);

echo '<div>A confirmation email
has been sent to <b>'. $email.' </b> Please click on the Activate Button to Activate your account </div>';
} else { // If it did not run OK.
echo '<div>You could not be registered due to a system
error. We apologize for any
inconvenience.</div>';
}
}
else{
echo '<div>Email already registered</div>';}
}

?>


verify.php                                                                                                          
                                                                                                                           


<?php
$email = trim(mysql_escape_string($_GET['email']));

$key = trim(mysql_escape_string($_GET['key']));

$query_verify_email = "SELECT * FROM register WHERE email ='$email' and isactive = 1";
$result_verify_email = mysqli_query($con,$query_verify_email);

if (mysqli_num_rows($result_verify_email) == 1)
{
echo '<div>Your Account already exists. Please <a href="login.html">Login Here</a></div>';

}
else
{

if (isset($email) && isset($key))

{

mysqli_query($con, "UPDATE register SET isactive=1 WHERE email ='".$email."' AND hash='".$key."' ") or die(mysql_error());

if (mysqli_affected_rows($con) == 1)
{
echo '<div>Your Account has been activated. Please <a href="login.html">Login Here</a></div>';

} else
{
echo '<div>Account couldnot be activated.</div>';

}
}
mysqli_close($con);

}?>


Monday, October 13, 2014

wamp server not work



wamp server not work but server is online my wamp server 2.4

Step1

 



1.Quit your skype and then again restart your wamp


Problem Not solved ? 

Follow 

step 2

Solution for MSVCR100.dll is missing when WAMP server install

This MSVCR100.dll is missing when WAMP server install problem mostly happen when you install new ‘Operating system’. It’s a general problem but its soved easily  follow the next steps
Step 1.
That MSVCR100.dll file is one part of Microsoft Visual C++. IF this component is missing means, ‘Apache Server’ won’t run. So, download following exe file and just install that. It’s enough for MSVCR100.dll is missing when WAMP server install problem.
For Windows 32 bit OS:
Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)

Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)

Here just select your Language and click ‘Download’ Button. You will get ‘vcredist_x86.exe’ file. Just Download that file and install as usual( double click ).
windows 64

restart PC and check
If the problem is not solved yet the follow step 3

Stp3

3 changeWampServer port



Sometimes wamp server

WampServer is a Windows web development environment. It allows you to createweb applications with Apache2, PHP and a MySQL database. This post basically explain how to change WampServer Port. The reason we need to changeWampServer port to avoid the same port used for IIS (Internet Information Services) or Xampp which results in failure of installation or running the application perfectly.

Here is steps taken to change the port for WampServer

1. After installation, left click the wamp icon
2. Go to “apache” and choose “httpd.conf”
3. Find the word “Listen 80″ 
4. Replace with “Listen 8080″.

Take note that 8080 is an example of port number. Feel free to pick any number to be the port number for WampServer.

5. Save the file and restart the application

6. Use http://localhost:8080 to access the WampServer

Thank You


How to Host a Laravel Project on Hostinger’s hPanel: A Step-by-Step Guide

How to Host a Laravel Project on Hostinger’s hPanel: A Step-by-Step Guide If you're looking to host a Laravel project on Hostinger’s hPa...