{"id":2079,"date":"2012-06-01T13:56:09","date_gmt":"2012-06-01T11:56:09","guid":{"rendered":"http:\/\/blog.unelink.es\/?p=2079"},"modified":"2019-11-15T10:49:19","modified_gmt":"2019-11-15T09:49:19","slug":"activar-extension-mcrypt-de-php-en-un-servidor-o-hosting-windows","status":"publish","type":"post","link":"https:\/\/hosting.airetech.es\/blog\/wiki\/activar-extension-mcrypt-de-php-en-un-servidor-o-hosting-windows\/","title":{"rendered":"Activar extensi\u00f3n mcrypt de PHP en un servidor o hosting Windows"},"content":{"rendered":"<p>Puede que en nuestro <a title=\"Servidores dedicados\" href=\"https:\/\/www.unelink.es\/servidores-dedicados-32.html\" target=\"_blank\" rel=\"noopener noreferrer\">servidor dedicado<\/a>, <a title=\"hosting\" href=\"https:\/\/www.unelink.es\/hosting-3.html\" target=\"_blank\" rel=\"noopener noreferrer\">hosting<\/a> o en nuestra estaci\u00f3n de trabajo tengamos corriendo PHP bajo Windows y necesitemos usar la extensi\u00f3n <a title=\"mcrypt\" href=\"https:\/\/secure.php.net\/manual\/es\/book.mcrypt.php\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">mcrypt<\/a> de PHP. Esta extensi\u00f3n nos permite encriptar datos sensibles de nuestra aplicaci\u00f3n para guardarlos encriptados y as\u00ed aumentar su seguridad.<\/p>\n<p>Para activar la extensi\u00f3n seguiremos los siguientes pasos (pueden haber diferencias dependiendo del servidor PHP utilizado. Para este ejemplo se ha usado Apache incluido en AppServ):<\/p>\n<p>1. Lo primero que tenemos que hacer es <a title=\"Localizar el archivo php.ini\" href=\"https:\/\/hosting.airetech.es\/blog\/wiki\/php\/donde-esta-mi-archivo-php-ini\/\" target=\"_blank\" rel=\"noopener noreferrer\">localizar el archivo php.ini<\/a> que PHP est\u00e1 cargando. Para ello <a title=\"Crear un archivo phpinfo\" href=\"https:\/\/hosting.airetech.es\/blog\/wiki\/php\/crear-un-archivo-phpinfo\/\" target=\"_blank\" rel=\"noopener noreferrer\">crearemos un archivo phpinfo<\/a> y veremos qu\u00e9 archivo de configuraci\u00f3n es el que est\u00e1 cargando.<\/p>\n<div id=\"attachment_2080\" style=\"width: 611px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2012\/06\/php.ini_.gif\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2080\" class=\" wp-image-2080 \" title=\"php.ini\" src=\"https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2012\/06\/php.ini_.gif\" alt=\"php.ini\" width=\"601\" height=\"529\" srcset=\"https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2012\/06\/php.ini_.gif 616w, https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2012\/06\/php.ini_-300x263.gif 300w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/a><p id=\"caption-attachment-2080\" class=\"wp-caption-text\">php.ini<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>2. Una vez localizado el archivo php.ini , lo abrimos con el bloc de notas, localizamos la l\u00ednea \u00a0\"extension=php_mcrypt.dll\"\u00a0y la descomentamos (quitamos el punto y coma inicial) y guardamos los cambios.<\/p>\n<div id=\"attachment_2082\" style=\"width: 410px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2012\/06\/descomentamos-extension-mcrypt.gif\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2082\" class=\" wp-image-2082\" title=\"Descomentamos extensi\u00f3n mcrypt\" src=\"https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2012\/06\/descomentamos-extension-mcrypt.gif\" alt=\"Descomentamos extensi\u00f3n mcrypt\" width=\"400\" height=\"561\" srcset=\"https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2012\/06\/descomentamos-extension-mcrypt.gif 326w, https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2012\/06\/descomentamos-extension-mcrypt-214x300.gif 214w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><p id=\"caption-attachment-2082\" class=\"wp-caption-text\">Descomentamos extensi\u00f3n mcrypt<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>3. De esta forma habilitamos en PHP el uso de la librer\u00eda, pero falta que Windows pueda encontrar la dll necesaria para su funcionamiento. Para ello accedemos al directorio donde tenemos instalado PHP, por ejemplo \"C:\/AppServ\/php5\/\" y localizamos el archivo \"libmcrypt.dll\". Lo copiamos y lo pegamos en la carpeta \"system32\" de Windows, normalmente localizada en \"C:\/WINDOWS\/system32\".<\/p>\n<p>4. Una vez copiada la dll en system32, Windows ya podr\u00e1 encontrarla y lo \u00fanico que necesitamos es reiniciar el servidor PHP para que el sistema detecte los cambios y sea capaz de cargar la extensi\u00f3n. Una vez reiniciado, usaremos el archivo phpinfo que hemos creado en el punto 1, para verificar que mcrypt se ha cargado correctamente. Para ello, tenemos que localizar algo similar a:<\/p>\n<div id=\"attachment_2083\" style=\"width: 659px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2012\/06\/mcrypt-cargada.gif\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2083\" class=\" wp-image-2083 \" title=\"Extensi\u00f3n mcrypt cargada\" src=\"https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2012\/06\/mcrypt-cargada.gif\" alt=\"Extensi\u00f3n mcrypt cargada\" width=\"649\" height=\"215\" srcset=\"https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2012\/06\/mcrypt-cargada.gif 626w, https:\/\/hosting.airetech.es\/blog\/wp-content\/uploads\/2012\/06\/mcrypt-cargada-300x99.gif 300w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><\/a><p id=\"caption-attachment-2083\" class=\"wp-caption-text\">Extensi\u00f3n mcrypt cargada<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>Con estos pasos ya podemos usar la extensi\u00f3n mcrypt bajo Windows.<\/p>\n<p>\u00a1Esperamos que os sirva de ayuda!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"Puede que en nuestro servidor dedicado, hosting o en nuestra estaci\u00f3n de trabajo tengamos corriendo PHP bajo Windows y necesitemos usar la extensi\u00f3n mcrypt de PHP. Esta extensi\u00f3n nos permite encriptar datos sensibles de nuestra aplicaci\u00f3n para guardarlos encriptados y as\u00ed aumentar su seguridad. Para activar la extensi\u00f3n seguiremos los siguientes pasos (pueden haber diferencias dependiendo del servidor PHP utilizado.&nbsp;<a href=\"https:\/\/hosting.airetech.es\/blog\/wiki\/activar-extension-mcrypt-de-php-en-un-servidor-o-hosting-windows\/\" class=\"read-more\">Seguir leyendo<\/a>","protected":false},"author":1,"featured_media":2083,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[491,13,39,7,6,122,511],"tags":[217,218,213,222],"class_list":["post-2079","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cuentas-hosting","category-hosting","category-php","category-servidores-dedicados","category-wiki","category-windows","category-windows-servidores-dedicados","tag-hosting","tag-php","tag-servidores-dedicados","tag-windows","cat-491-id","cat-13-id","cat-39-id","cat-7-id","cat-6-id","cat-122-id","cat-511-id"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/posts\/2079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/comments?post=2079"}],"version-history":[{"count":9,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/posts\/2079\/revisions"}],"predecessor-version":[{"id":9024,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/posts\/2079\/revisions\/9024"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/media\/2083"}],"wp:attachment":[{"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/media?parent=2079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/categories?post=2079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/tags?post=2079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}