Skip to content

Instantly share code, notes, and snippets.

View Whip's full-sized avatar

Vipul Kapoor Whip

View GitHub Profile
@Whip
Whip / https-on-localhost.md
Last active November 5, 2024 09:43 — forked from adnan360/https-on-localhost.md
Here's a step by step plan to setup HTTPS on Xampp localhost. This has been tested on Windows and Mac system. Both instructions are mentioned below.

This has been tested with XAMPP (PHP 8.2) on Windows 11 and Mac Sequoia.

STEP 1: Editing Configs

Open php.ini by clicking Config button on the Xampp control panel

In this ini file semi colon (;) is used to comment a line. We want to use openssl library, so we have to make sure the line for openssl is not commented.

Remove semi colon (;) in front of this line, if there is any:

@joashp
joashp / openssl_encrypt_decrypt.php
Created September 4, 2015 15:59
Simple PHP encrypt and decrypt using OpenSSL
<?php
/**
* simple method to encrypt or decrypt a plain text string
* initialization vector(IV) has to be the same when encrypting and decrypting
*
* @param string $action: can be 'encrypt' or 'decrypt'
* @param string $string: string to encrypt or decrypt
*
* @return string
*/
@djandyr
djandyr / gist:c04950a1375e96814316
Last active November 5, 2024 13:26
MacOS XAMPP PHP Installation

Change default Mac OS X PHP to XAMPP's PHP Installation and Install Composer


Find out what version of PHP is running

which php

This will output the path to the default PHP install which comes preinstalled by Mac OS X, by default