Category

PHP

Category

Add below code within .htaccess file RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.in [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.domain.in/$1 [R,L] $ sudo nano /etc/apache2/sites-enabled/000-default.conf <Directory /var/www/html> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> <VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName #…

https://www.rosehosting.com/blog/how-to-install-php-7-2-on-ubuntu-16-04/ apt-get update apt-get upgrade Step 2: Install a Web Server To install the Apache web server, run the following command on your server: sudo apt-get install apache2 After the installation is complete, you should start Apache: systemctl start apache2 Also, you can enable Apache to start automatically on server boot: systemctl enable apache2 To check the status of the Apache web server and make sure it is up and running, you can use the…

sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf sudo a2enconf phpmyadmin sudo service apache2 reload sudo apt update sudo apt install phpmyadmin php-mbstring php-gettext sudo phpenmod mbstring sudo systemctl restart apache2 sudo mysql -u root -p; CREATE USER ‘siddharth’@’localhost’ IDENTIFIED BY ‘admin1818’; GRANT ALL PRIVILEGES ON *.* TO ‘siddharth’@’localhost’ WITH GRANT OPTION; exit

STEP 1: INSTALL APACHE Update package list from repositories for packages that needs upgrading. sudo apt-get update Upgrade packages that needs upgrading. sudo apt-get upgrade Install Apache2 sudo apt-get install apache2 After installing Apache2 use below commands to stop, start and enable apache2 to run as a service so that it can start automatically after server reboots. sudo systemctl stop apache2.service sudo systemctl start apache2.service sudo systemctl enable apache2.service STEP 2: INSTALL PHP7.2 AND OTHER…

<form action=”” class=”contact_form” id=”comment”> <center> <div id=”result”> </div> </center> <div class=”form-group”> <label for=”name”>Name* </label> <input type=”name” class=”form-control” name=”name” placeholder=”Type Here”> </div> <div class=”form-group”> <label for=”organization”>Organization name </label> <input type=”text” class=”form-control” name=”organization_name” placeholder=”xyz”> </div> <div class=”form-group”> <label for=”email”>Email* </label> <input type=”email” class=”form-control” name=”email” placeholder=”[email protected]”> </div> <div class=”form-group”> <label for=”sel1″>Service you provide </label> <select class=”form-control” name=”service_provider”> <option>Sell </option> <option>2 </option> <option>3 </option> <option>4 </option> </select> </div> <div class=”checkbox”> <label> <input type=”checkbox”> <span class=”label_span”>I accept the terms and…

Installing PHP 7.2 on Mac using Homebrew Check version php -v check brew is up to date brew update brew upgrade Unlink php version which is installed in the system brew unlink php71 Now final step to download** brew install php72 export PATH=/usr/local/php5/bin:$PATH

<?php $servername = “localhost”; $username = “username”; $password = “password”; $database_name = “databasetesting”; // Create connection $conn = mysqli_connect($servername, $username, $password, $database_name); // Check connection if (!$conn) { die(“Connection failed: ” . mysqli_connect_error()); } echo “Connected successfully”; ?>

Installing PHP 7.2 on Mac using Homebrew Check version php -v check brew is up to date: brew update brew upgrade Unlink php version which is install in the system brew unlink php71 Now final step to download brew install php72 export PATH=/usr/local/php5/bin:$PATH