Warning phpMyAdmin Parameter Countable

Al instalar phpMyAdmin con PHP 7.2, nos da el siguiente error en la vista de las tablas:

Warning in ./libraries/sql.lib.php#613 count(): Parameter must be an array or an object that implements Countable

Corregir editando: /usr/share/phpmyadmin/libraries/sql.lib.php

Cambiar: (count($analyzed_sql_results['select_expr'] == 1)

Por: ((count($analyzed_sql_results['select_expr']) == 1)

Webify convertir fuente ttf a woff, eot y svg

Convertir fuente ttf a woff, eot y svg:

Instalar Webify:

https://github.com/ananthakumaran/webify

 

Binario:

https://ebustos.com/download/webify-linux-x86_64

 

Uso:

webify fontname.ttf

 

CSS @font-face código

@font-face {
    font-family: 'my-font-family';
    src: url('my-font-filename.eot');
    src: url('my-font-filename.eot?#iefix') format('embedded-opentype'),
    url('my-font-filename.svg#my-font-family') format('svg'),
    url('my-font-filename.woff') format('woff'),
    url('my-font-filename.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

Remplazar texto con recursividad y SSH

Bash script para remplazar con recursividad una cadena por otra.

#!/bin/bash

# Configurar (replace.sh):
#   - oldstring
#   - newstring
#   - /path/to/folder

oldstring=$"texto_a_remplazar"
newstring=$"texto_nuevo"
grep -rl $oldstring /path/to/folder | xargs sed -i s@$oldstring@$newstring@g

chmod +x replace.sh
./replace.sh

EasyEngine: WordPress Multisitios con PHP 7, Let’s Encrypt y Nginx cache

Requisitos (Debian):

apt-get install sudo

 

ERROR: El certificado de “raw.githubusercontent.com” no es confiable.

apt-get install ca-certificates

 

Instalar EasyEngine:

wget -qO ee rt.cx/ee && sudo bash ee # install easyengine

 

Desconectar sesión SSH y logear de nuevo:

exit

SSH root@mi-ip

 

Instalar Packages:

ee stack install

 

Crear:

PHP7 + MySQL + SSL Website:

ee site create example.com --php7 --mysql --letsencrypt

 

WordPress Multisitios en sub-directorios Nginx Fastcgi Cache PHP 7 + SSL

ee site create example.com --wpsubdir --wpfc --user=admin --pass=micontraseña --email=info@exemple.com --php7 --letsencrypt

 

Actualizar certificado SSL Let’s Encrypt

ee site update example.com --letsencrypt=renew

 

Eliminar sitio:

ee site delete example.com

 

Instalar Composer:

https://ebustos.com/linux/instalacion-global-de-composer-dependency-manager-para-php/

 

Instalar PhpMyAdmin:

ee stack install --phpmyadmin

cd /var/www/22222/htdocs/db/pma/
composer install --no-dev

 

Administrar PhpMyAdmin:

https://misitio.com:22222

 

Recuperar contraseña administrador EasyEngine:

ee secure --auth

 

Recuperar contraseña root MySQL:

cat /etc/mysql/conf.d/my.cnf

 

 

Consultar:

https://easyengine.io/

https://letsencrypt.org/