Skip to content

Instantly share code, notes, and snippets.

View crissanis's full-sized avatar

Cristhian Sanchez crissanis

View GitHub Profile
@crissanis
crissanis / create php log file
Last active November 5, 2019 21:36
create php log error file
//define function name
function m_log($arMsg)
{
//define empty string
$stEntry="";
//get the event occur date time,when it will happened
$arLogData['event_datetime']='['.date('D Y-m-d h:i:s A').'] [client '.$_SERVER['REMOTE_ADDR'].']';
//if message is array type
if(is_array($arMsg))
{
@crissanis
crissanis / install phpMyadmin linux
Last active November 5, 2019 21:34
install phpMyadmin linux
sudo apt-get install phpmyadmin
Then installation begins. When prompted, select “Apache2” from the “Configuring phpMyAdmin” dialogue box.
When asked for MySQL username and password enter “root” for username and YOUR_MYSQL_PASSWORD for password
sudo nano /etc/apache2/apache2.conf
and add the following line at the bottom of the file (you can add it anywhere in the file,
I just choose the bottom here so that you can easily access it for modification):
@crissanis
crissanis / mysql wordpress docker
Created October 10, 2019 19:27
mysql wordpress docker
docker run --name eduxdb -p 3306:3306 -e MYSQL_ROOT_PASSWORD=noloveas -d mysql:5.7
docker run --name some-wordpress -p 8080:80 -e WORDPRESS_DB_HOST=10.16.211.194:3306 \
-e WORDPRESS_DB_USER=root -e WORDPRESS_DB_PASSWORD=noloveas -d wordpress