3ENGINE

Programación y otros cachivaches

Categoría: Tecnologia

Página 16/45

English, Tecnologia

How to retrieve email sent from outlook


You can retrieve a email missing of the outbox if the person to which the mail is addressed has not read.

1. You go to the outbox and search the message to recover. Open it and select «Other action > recover message…»:

retrieve email sent from outlook

2. If successful, you will receive a message like this:

retrieve email sent from outlook




English, Tecnologia

How to fix the WordPress error «Fatal error: Allowed memory size»


If WordPress show a message error “Fatal error: Allowed memory size”, for example to add a picture or installing a new plugin in your wordpress account. This is because you are exceeded memory limit reserved to PHP and you need increase it. I propose different solutions.

Wordpress error "Fatal error: Allowed memory size"

Solution at WordPress error «Fatal error: Allowed memory size»

Login via FTP client (Filezilla for example) to your hosting account and try to solve the problem
with one of the following solutions:

  1. Edit wp-config.php file, the file is in the blog root folder and add at the end define(‘wp_memory_limit’,’XXM’); where XXM is the amount of memory you need:
    /** WordPress absolute path to the WordPress directory. */if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');
    /** Sets up WordPress vars and included files. */require_once(ABSPATH . 'wp-settings.php');
    
    define('wp_memory_limit','80M');

    If you don’t solve the problem, try with define(‘WP_MAX_MEMORY_LIMIT’, ‘XXM’)

    /** WordPress absolute path to the WordPress directory. */if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');
    /** Sets up WordPress vars and included files. */require_once(ABSPATH . 'wp-settings.php');
    
    define('WP_MAX_MEMORY_LIMIT', '80M');
  2. Edit .htaccess file, this file is in the blog root folder (probably hidden)
    and add the code line php_value memory_limit XXM:
    <IfModule mod_rewrite.c>
    php_value memory_limit 64M
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
  3. Try to increase a memory specified in the default-constants.php file,
    this file find it in wp-includes folder. Edit line 9 where in the example
    is define(‘WP_MEMORY_LIMIT’, ’48M’); and especified increasing the memory you need:
    function wp_initial_constants() {
    global $blog_id;
    
    // set memory limits
    if ( !defined('WP_MEMORY_LIMIT') ) {
    if( is_multisite() ) {
    define('WP_MEMORY_LIMIT', '64M');
    } else {
    define('WP_MEMORY_LIMIT', '48M');
    }
    }
    
    if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) {
    define( 'WP_MAX_MEMORY_LIMIT', '256M' );
    }

    If your wordpress install is multisite, then modify line 7 where in the example is define(‘WP_MEMORY_LIMIT’, ’64M’);




Tecnologia

Plugin para comparar código en Notepad++


Notepad++ es un editor de texto y código fuente ligero y robusto muy utilizado hoy en día que desafortunadamente sólo está disponible para Windows. Aunque los linuxeros tenemos gedit que puede hacer lo mismo e incluso mas!.

Cómo instalar el plugin para comparar código en Notepad++

Notepad++ dispone de infinidad de plugins. Si necesitamos comparar archivos y no nos apatece instalar mas aplicaciones, podemos instalar el plugin npp compare. Hay dos modos de instalar el plugin, o bien mediante el gestor de plugins que se encuentra en Plugins >> Plugin Manager o bien descargar directamente el plugin de la web del autor

Si optamos por descargar el plugin de la web del autor, tendras que descomprir el zip y copiar el contenido en una carpeta llamada plugins que se encuentra dentro de la carpeta donde tienes instalado Notepad++ (normalmente esta carpeta se encuentra en /Archivos de programa/Notepad++)

Una vez instalado el plugin, aparecerá una nueva opción Compare dentro de la opción de menú Plugins

comparar código en Notepad++

Ahora abrimos los dos archivos y seleccionamos la opción Compare

comparar código en Notepad++

Por defecto vemos que el plugin tambíen resalta las líneas de texto donde hay diferencias en el número de espacios. En mi opinión, si los que queremos comparar es código fuente, normalmente esta opción mas que ayudar, molesta. Por suerte es posible desactivar esta opción. Para ellos vamos a la opción Compare deseleccionamos la opción Ignoring Spacing:

comparar código en Notepad++




Tecnologia

Solución al error “Fatal error: Allowed memory size» de WordPress


Si te aparece un error “Fatal error: Allowed memory size» en WordPress, por ejemplo, al añadir una imagen o al instalar un nuevo plugin en tu cuenta wordpress. Es debido a que has superado el limite de memoria reservada para PHP y necesitarás aumentarla. Te proponemos distintas soluciones.

error “Fatal error: Allowed memory size ... exhausted"

Soluciones al error “Fatal error: Allowed memory size»

Conectate mediante un cliente FTP (por ejemplo Filezilla) a tu cuenta de hosting y prueba con alguna de las siguientes soluciones:

  1. Edita el archivo wp-config.php que se encuentra en la carpeta raíz de tu blog y añade al final define(‘wp_memory_limit’,’XXM’); donde XXM es la cantidad en MB de memoria que necesitas:
    /** WordPress absolute path to the WordPress directory. */if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');
    /** Sets up WordPress vars and included files. */require_once(ABSPATH . 'wp-settings.php');
    
    define('wp_memory_limit','80M');

    Si no se soluciona, prueba con define(‘WP_MAX_MEMORY_LIMIT’, ‘XXM’);

    /** WordPress absolute path to the WordPress directory. */if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');
    /** Sets up WordPress vars and included files. */require_once(ABSPATH . 'wp-settings.php');
    
    define('WP_MAX_MEMORY_LIMIT', '80M');
    
  2. Edita el archivo .htaccess que se encuentra en la carpeta raíz de tu blog (es posible que esté escondido) y añade la línea php_value memory_limit XXM :
    <IfModule mod_rewrite.c>
    php_value memory_limit 64M
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
  3. Prueba a aumentar la memoria especificada en el archivo default-constants.php que se encuentra en la carpeta wp-includes. Edita la línea 9 marcada donde, en el ejemplo, pone define(‘WP_MEMORY_LIMIT’, ’48M’); aumentando la memoria por la que necesites:
    function wp_initial_constants() {
    global $blog_id;
    
    // set memory limits
    if ( !defined('WP_MEMORY_LIMIT') ) {
    if( is_multisite() ) {
    define('WP_MEMORY_LIMIT', '64M');
    } else {
    define('WP_MEMORY_LIMIT', '48M');
    }
    }
    
    if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) {
    define( 'WP_MAX_MEMORY_LIMIT', '256M' );
    }
    

    Si tu wordpress es multisite, entonces tendrás que modificar la línea 7 donde pone define(‘WP_MEMORY_LIMIT’, ’64M’);