<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hosting Al Descubierto &#187; Soporte</title>
	<atom:link href="http://hostingaldescubierto.com/wordpress/category/soporte/feed/" rel="self" type="application/rss+xml" />
	<link>http://hostingaldescubierto.com/wordpress</link>
	<description>Ayuda plesk  hosting, servidores dedicados y virtuales. ¿ problemas con spam, migraciones, installar aplicaciones ? podemos ayudarte</description>
	<lastBuildDate>Thu, 19 Aug 2010 15:48:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>[php] Depurando / Profiling en php ( II )</title>
		<link>http://hostingaldescubierto.com/wordpress/2010/07/28/php-depurando-profiling-en-php-ii/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=php-depurando-profiling-en-php-ii</link>
		<comments>http://hostingaldescubierto.com/wordpress/2010/07/28/php-depurando-profiling-en-php-ii/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 23:42:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Soporte]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[servidores]]></category>
		<category><![CDATA[apd]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://hostingaldescubierto.com/wordpress/?p=371</guid>
		<description><![CDATA[En este caso analizamos un hecho real, una web que tarda en cargar aleatoriamente entre 10 y 12 segundos. El problema es que al medir los tiempos en otro servidor no llega a 2 segundos. Después de revisar conectividad, carga de sistema, carga de apache &#8230; y demás parámetros habituales; todo estaba perfecto. Así que [...]]]></description>
			<content:encoded><![CDATA[<p>En este caso analizamos un hecho real, una web que tarda  en cargar aleatoriamente entre 10 y 12 segundos. El problema es que al medir los tiempos en otro servidor no llega a 2 segundos. Después de revisar conectividad, carga de sistema, carga de apache &#8230; y demás parámetros habituales; todo estaba perfecto. Así que decidimos relizar el profiling de la web para localizar el cuello de botella dentro de los scripts php.</p>
<p>En el artículo anterior <a href="http://hostingaldescubierto.com/wordpress/2010/07/23/php-depurando-profiling-en-php-i/">[php] Depurando / Profiling en php ( I )</a> dejamos instalado el módulo APD para capturar la información necesaria y luego procesarla. Recordamos que hay que usar la función <span style="color: #000000;"> <em>apd_set_pprof_trace();</em></span> para que se generen los datos. En nuestro caso hemos seleccionado la ruta /tmp en donde se almacenarán estos ficheros.</p>
<p>Ejecutamos unos cuantas veces el script php que nos interesa. Generamos una captura de una ejecución en 1-2 segundos (<em>/tmp/pprof.32231.1</em>) y seguimos ejecutando hasta que conseguimos una captura de datos de una ejecución que tardó unos 10-11 segundos (<em>/tmp/pprof.01666.0</em>)</p>
<p>Vamos a comparar la captura de los datos :</p>
<p>La ejecución buena :</p>
<pre># pprofp -R /tmp/pprof.32231.1

Trace for /var/www/vhosts/hostingaldescubierto.com/httpdocs/index.php
Total Elapsed Time = 0.36
Total System Time  = 0.03
Total User Time    = 0.07

Real         User        System             secs/    cumm
%Time (excl/cumm)  (excl/cumm)  (excl/cumm) Calls    call    s/call  Memory Usage Name
--------------------------------------------------------------------------------------
100.0 0.00 0.36  0.00 0.07  0.00 0.03     1  0.0000   0.3589            0 main
96.1 0.00 0.34  0.00 0.08  0.00 0.03     5  0.0000   0.0690            0 require_once
59.1 0.00 0.21  0.00 0.01  0.00 0.00     8  0.0000   0.0265            0 include
58.9 0.00 0.21  0.00 0.01  0.00 0.00     1  0.0000   0.2113            0 call_user_func_array
58.9 0.00 0.21  0.00 0.01  0.00 0.00     1  0.0000   0.2113            0 Pages-&gt;index
58.9 0.00 0.21  0.00 0.01  0.00 0.00     1  0.0000   0.2112            0 Pages-&gt;show
58.9 0.00 0.21  0.00 0.01  0.00 0.00     1  0.0000   0.2112            0 Template-&gt;build
58.8 0.00 0.21  0.00 0.01  0.00 0.00     2  0.0000   0.1054            0 MY_Loader-&gt;view
58.6 0.00 0.21  0.00 0.01  0.00 0.00     2  0.0000   0.1052            0 MY_Loader-&gt;_ci_load
56.8 0.00 0.20  0.00 0.00  0.00 0.00     1  0.0000   0.2038            0 weather_google_api
56.8 0.20 0.20  0.00 0.00  0.00 0.00     1  0.2037   0.2037            0 simplexml_load_file
29.4 0.00 0.11  0.00 0.05  0.00 0.02     1  0.0000   0.1054            0 Pages-&gt;Pages
29.2 0.00 0.10  0.00 0.05  0.00 0.02     1  0.0000   0.1048            0 Pages-&gt;Public_Controller
13.9 0.00 0.05  0.00 0.03  0.00 0.02     1  0.0000   0.0497            0 Pages-&gt;MY_Controller
13.4 0.00 0.05  0.00 0.02  0.00 0.03     2  0.0000   0.0241            0 MY_Loader-&gt;_ci_autoloader
12.2 0.00 0.04  0.00 0.01  0.00 0.00     3  0.0000   0.0146            0 Banners_model-&gt;get_by_section
11.7 0.00 0.04  0.00 0.00  0.00 0.00    25  0.0000   0.0017            0 CI_DB_mysql_driver-&gt;query
11.5 0.00 0.04  0.00 0.01  0.00 0.00     6  0.0000   0.0069            0 Banners_model-&gt;add_hit
11.4 0.04 0.04  0.03 0.03  0.01 0.01    65  0.0006   0.0006            0 defined
10.9 0.00 0.04  0.00 0.00  0.00 0.00    25  0.0000   0.0016            0 CI_DB_mysql_driver-&gt;simple_query
</pre>
<p>El fichero de 10-12 segundos : </p>
<pre># pprofp -R /tmp/pprof.01666.0

Trace for /var/www/vhosts/hostingaldescubierto.com/httpdocs/index.php
Total Elapsed Time = 10.34
Total System Time  = 0.02
Total User Time    = 0.08

Real         User        System             secs/    cumm
%Time (excl/cumm)  (excl/cumm)  (excl/cumm) Calls    call    s/call  Memory Usage Name
--------------------------------------------------------------------------------------
100.1 0.00 10.35  0.00 0.09  0.00 0.02     5  0.0000   2.0692            0 require_once
100.0 0.00 10.34  0.00 0.08  0.00 0.02     1  0.0000   10.3394            0 main
99.1 0.00 10.24  0.00 0.01  0.00 0.00     8  0.0000   1.2802            0 include
99.0 0.00 10.24  0.00 0.01  0.00 0.00     1  0.0000   10.2409            0 call_user_func_array
99.0 0.00 10.24  0.00 0.01  0.00 0.00     1  0.0000   10.2409            0 Pages-&gt;index
99.0 0.00 10.24  0.00 0.01  0.00 0.00     1  0.0000   10.2409            0 Pages-&gt;show
99.0 0.00 10.24  0.00 0.01  0.00 0.00     1  0.0000   10.2409            0 Template-&gt;build
99.0 0.00 10.24  0.00 0.01  0.00 0.00     2  0.0000   5.1202            0 MY_Loader-&gt;view
99.0 0.00 10.24  0.00 0.01  0.00 0.00     2  0.0000   5.1200            0 MY_Loader-&gt;_ci_load
99.0 0.00 10.23  0.00 0.00  0.00 0.00     1  0.0000   10.2335            0 weather_google_api
<strong>99.0 10.23 10.23  0.00 0.00  0.00 0.00     1  10.2333   10.2333            0 simplexml_load_file</strong>
0.7 0.00 0.08  0.00 0.06  0.00 0.01     1  0.0000   0.0766            0 Pages-&gt;Pages
0.7 0.00 0.08  0.00 0.05  0.00 0.01     1  0.0000   0.0761            0 Pages-&gt;Public_Controller
0.5 0.00 0.05  0.00 0.04  0.00 0.01     2  0.0000   0.0266            0 MY_Loader-&gt;_ci_autoloader
0.5 0.00 0.05  0.00 0.04  0.00 0.01     1  0.0000   0.0524            0 Pages-&gt;MY_Controller
0.4 0.04 0.04  0.04 0.04  0.01 0.01    65  0.0006   0.0006            0 defined
0.4 0.00 0.04  0.00 0.02  0.00 0.01    38  0.0000   0.0010            0 MY_Loader-&gt;helper
0.3 0.00 0.04  0.00 0.03  0.00 0.00    10  0.0000   0.0036            0 MY_Loader-&gt;model
0.3 0.00 0.03  0.00 0.02  0.00 0.01     1  0.0000   0.0312            0 Pages-&gt;Controller
0.3 0.00 0.03  0.00 0.02  0.00 0.01     1  0.0000   0.0311            0 Pages-&gt;_ci_initialize
</pre>
<p>Vemos claramente esta linea que es la que penaliza el tiempo de ejecución del script:</p>
<pre><strong>99.0 10.23 10.23  0.00 0.00  0.00 0.00     1  10.2333   10.2333            0 simplexml_load_file</strong></pre>
<p>Perfecto, ya sabemos lo que tenemos que buscar el uso de la función <strong>simplexml_load_file</strong>. Buscamos los ficheros que usan esta funcion, por ejemplo así :</p>
<pre>find -name "*php" -exec grep -l simplexml_load_file {} \;</pre>
<p>Entre los resultados encontramos uno, que llama especialmente la atención, en el que solicita un fichero xml de google <strong>http://www.google.com/ig/api?weather=madrid&amp;oe=utf-8</strong>.<br />
Vamos a medir cuanto tiempo tarda en descargarlo :</p>
<pre># time wget 'http://www.google.com/ig/api?weather=madrid&amp;oe=utf-8'
--2010-07-26 18:27:47--  http://www.google.com/ig/api?weather=madrid&amp;oe=utf-8
Resolving www.google.com... 66.249.92.104
Connecting to www.google.com|66.249.92.104|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/xml]
Saving to: `api?weather=madrid&amp;oe=utf-8.1'

[ &lt;=&gt;                                                                                                                                      ] 1,291       --.-K/s   in 0s

2010-07-26 18:27:57 (12.0 MB/s) - `api?weather=madrid&amp;oe=utf-8.1' saved [1291]

real    0m10.157s
user    0m0.002s
sys    0m0.001s</pre>
<p>Parece bastante claro que la ejecución se ralentiza por la petición a google&#8230; una caché que se actualice cada día, hora o cada minuto solucionaría este problema.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://hostingaldescubierto.com/wordpress/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://hostingaldescubierto.com/wordpress/2010/07/28/php-depurando-profiling-en-php-ii/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[wordpress]  Fatal error: Call to undefined function wp() in /var/www/vhosts/dominio.tld/httpdocs/wordpress/wp-blog-header.php on line 14</title>
		<link>http://hostingaldescubierto.com/wordpress/2010/07/16/wordpress-fatal-error-call-to-undefined-function-wp-in-varwwwvhostsdominio-tldhttpdocswordpresswp-blog-header-php-on-line-14/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=wordpress-fatal-error-call-to-undefined-function-wp-in-varwwwvhostsdominio-tldhttpdocswordpresswp-blog-header-php-on-line-14</link>
		<comments>http://hostingaldescubierto.com/wordpress/2010/07/16/wordpress-fatal-error-call-to-undefined-function-wp-in-varwwwvhostsdominio-tldhttpdocswordpresswp-blog-header-php-on-line-14/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 10:41:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Soporte]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://hostingaldescubierto.com/wordpress/2010/07/16/wordpress-fatal-error-call-to-undefined-function-wp-in-varwwwvhostsdominio-tldhttpdocswordpresswp-blog-header-php-on-line-14/</guid>
		<description><![CDATA[Al hacer una instalación nueva de wordpress, puedes contrarte con este error : Fatal error: Call to undefined function wp() in /var/www/vhosts/dominio.tld/httpdocs/wordpress/wp-blog-header.php on line 14 Es debido a que el fichero wp-config.php esté vacio o mal configurado. La mejor opción es coger el fichero wp-config-sample.php y rellenarlo a mano. Sólo hay que especificar base de [...]]]></description>
			<content:encoded><![CDATA[<p>Al hacer una instalación nueva de wordpress, puedes contrarte con este error :</p>
<pre>
Fatal error: Call to undefined function wp() in /var/www/vhosts/dominio.tld/httpdocs/wordpress/wp-blog-header.php on line 14
</pre>
<p>Es debido a que el fichero wp-config.php esté vacio o mal configurado. La mejor opción es coger el fichero <b>wp-config-sample.php</b> y rellenarlo a mano. Sólo hay que especificar base de datos, usuariom, password y host.</p>
<p>Puedes usar esta plantilla para wordpress 3.0 si no tienes nada a mano</p>
<pre>
&lt;?php

define('DB_NAME', 'nombre_base_datos');

/** MySQL database username */
define('DB_USER', 'usuario');

/** MySQL database password */
define('DB_PASSWORD', 'password');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

#
# generado automaticametne desde:
# https://api.wordpress.org/secret-key/1.1/salt/
#

define('AUTH_KEY',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'pQ&lt;@NK%: 42QBJ&amp;$bhPZZzqs!vGZ}8Ph$R&gt;j~x8}Z+V+[%]10Z~oy!N#^#/pT&amp;}l');
define('SECURE_AUTH_KEY',&nbsp; ';CT`bP|YA&gt;[+|i(Kza+*K4x&lt;[8ce(cfEzJefBUnlm$kGo=|+#MDuc+3Eka3oEcUp');
define('LOGGED_IN_KEY',&nbsp;&nbsp;&nbsp; 'Ym_wh[WKu;q_}@N$Y&lt;A?u{{W5hg3&amp;^K5`l~RTIdiO;=|TiG/BD~FMWF b^qz7L_4');
define('NONCE_KEY',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'qDwCcdk?T8-PHo pFNOu(yCUsi0^&lt;$lP05A/A=D2PZ+5|xZ&lt;-z:Z&amp;=p?7$JK:hUT');
define('AUTH_SALT',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'YTJ1VYm1m[-9),*uxvB#c@MgFBAVpf6m~8Eg._uZ(|$c-%nsM}_#3&amp;48=H_E2PY&lt;');
define('SECURE_AUTH_SALT', '{RNOa149Lnw6jyQDMJ9L%KUTXoir.R$NLO.BHO=,A]#G;=C$ OS_&gt;4ed+l}ZUpF}');
define('LOGGED_IN_SALT',&nbsp;&nbsp; '&lt;fu@&amp;qA2j&amp;NK]1RLOI 0QtH/NY%.8ufHJrwum kc9&gt;Cmv!h}pkYHU.&lt;y~1%#y09o');
define('NONCE_SALT',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'G1NkJF3E3xI_KFu|[oLk??o6GagegY(6*=Gkk!adIv%bUNnU #@7R&amp;ZI85;~R$ki');

$table_prefix&nbsp; = 'wp_';

define ('WPLANG', '');

define('WP_DEBUG', false);

if ( !defined('ABSPATH') )
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; define('ABSPATH', dirname(__FILE__) . '/');

require_once(ABSPATH . 'wp-settings.php');
</pre>
<p><b>Nota: el fichero acaba sin cerrar el script php , SIN ?&gt;</b></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://hostingaldescubierto.com/wordpress/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://hostingaldescubierto.com/wordpress/2010/07/16/wordpress-fatal-error-call-to-undefined-function-wp-in-varwwwvhostsdominio-tldhttpdocswordpresswp-blog-header-php-on-line-14/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[magento] PHP Fatal error:  Exception thrown without a stack frame in Unknown on line 0</title>
		<link>http://hostingaldescubierto.com/wordpress/2010/07/08/magento-php-fatal-error-exception-thrown-without-a-stack-frame-in-unknown-on-line-0/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=magento-php-fatal-error-exception-thrown-without-a-stack-frame-in-unknown-on-line-0</link>
		<comments>http://hostingaldescubierto.com/wordpress/2010/07/08/magento-php-fatal-error-exception-thrown-without-a-stack-frame-in-unknown-on-line-0/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 09:43:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Artículos]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Soporte]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[magneto]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://hostingaldescubierto.com/wordpress/2010/07/08/magento-php-fatal-error-exception-thrown-without-a-stack-frame-in-unknown-on-line-0/</guid>
		<description><![CDATA[Estos últimas días hemos tenido que optimizar la carga de servidores con Magento. Una de las tareas es usar un sistema de caché que acelere los scripts php. Usamos apc por compatibilidad con Magento y por que ya viene paquetizado en los repositorios de Debian. El problema, aparece en el pié de página: &#8220;PHP Fatal [...]]]></description>
			<content:encoded><![CDATA[<p>Estos últimas días hemos tenido que optimizar la carga de servidores con Magento. Una de las tareas es usar un sistema de caché que acelere los scripts php. Usamos apc por compatibilidad con Magento y por que ya viene paquetizado en los repositorios de Debian.</p>
<p>El problema, aparece en el pié de página:<b> &#8220;PHP Fatal error:&nbsp; Exception thrown without a stack frame in Unknown on line 0&#8243;</b>.<br />
Este error aparece cuando <i>se ha lanzado una excepcion en un lugar donde se no se puede lanzar una excepción por no tener &#8216;stack frame</i>&#8216;. </p>
<p>Los manejadores de excepciones &#8216; <i>exception handlers</i>&#8216; y los destructores no tienen &#8216;<i>stack frame</i>&#8216;.<br />
Por lo que combinar por ejemplo un &#8216;<i>execption handler</i>&#8216; con un &#8216;<i>error preporting</i>&#8216;&nbsp; o lanzar un <i>execption</i> en un <i>destructor</i> puede provocar que aparezcan. Os podeis documentar más en este interesante enlace <a href="http://www.compdigitec.com/labs/2009/08/02/solving-fatal-error-exception-thrown-without-a-stack-frame-in-unknown-on-line-0/" rel="bookmark" title="Permanent Link: Solving “Fatal error: Exception thrown without a stack frame in Unknown on line 0″">Solving “Fatal error: Exception thrown without a stack frame in Unknown on line 0″</a></p>
<p>En nuestro caso, tan solo hizo falta acutalizar la version del apc con un simple apt</p>
<p><source><br />
apt-get install php-apc</p>
<p>En la máquina estaba previamente instalado el apc vía pecl</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://hostingaldescubierto.com/wordpress/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://hostingaldescubierto.com/wordpress/2010/07/08/magento-php-fatal-error-exception-thrown-without-a-stack-frame-in-unknown-on-line-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[mediawiki] cambiar wikisysop password</title>
		<link>http://hostingaldescubierto.com/wordpress/2010/06/08/mediawiki-cambiar-wikisysop-password/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=mediawiki-cambiar-wikisysop-password</link>
		<comments>http://hostingaldescubierto.com/wordpress/2010/06/08/mediawiki-cambiar-wikisysop-password/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 10:12:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Soporte]]></category>
		<category><![CDATA[knowledge base]]></category>
		<category><![CDATA[mediawiki]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://hostingaldescubierto.com/wordpress/2010/06/08/mediawiki-cambiar-wikisysop-password/</guid>
		<description><![CDATA[Mucho más cómodo que cambiar la password en la base de datos, es lanzar este comando en la ruta de la instalación de tu mediawiki : php ./maintenance/changePassword.php &#8211;user=WikiSysop &#8211;password=nuevapasssword No tiene mucho que explicar]]></description>
			<content:encoded><![CDATA[<p>Mucho más cómodo que cambiar la password en la base de datos, es lanzar este comando en la ruta de la instalación de tu mediawiki :</p>
<p><source><br />
php ./maintenance/changePassword.php &#8211;user=WikiSysop &#8211;password=nuevapasssword</p>
<p>No tiene mucho que explicar</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://hostingaldescubierto.com/wordpress/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://hostingaldescubierto.com/wordpress/2010/06/08/mediawiki-cambiar-wikisysop-password/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[mysql] Reparar todas las tablas dañas &#8216; marked as crashed &#8216;</title>
		<link>http://hostingaldescubierto.com/wordpress/2010/03/18/mysql-reparar-todas-las-tablas-danas-marked-as-crashed/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=mysql-reparar-todas-las-tablas-danas-marked-as-crashed</link>
		<comments>http://hostingaldescubierto.com/wordpress/2010/03/18/mysql-reparar-todas-las-tablas-danas-marked-as-crashed/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 16:13:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Plesk]]></category>
		<category><![CDATA[Soporte]]></category>
		<category><![CDATA[drweb]]></category>

		<guid isPermaLink="false">http://hostingaldescubierto.com/wordpress/2010/03/18/mysql-reparar-todas-las-tablas-danas-marked-as-crashed/</guid>
		<description><![CDATA[A veces un apagón repentino o la muerte de nuestro proceso de mysql puede provocar errores de tablas mal cerradas. Sobretodo en tablas de sesiones, logins, etc.. mysqld[2978]: 100318 7:34:27 [ERROR] /usr/sbin/mysqld: Incorrect key file for table &#8216;./home/tlr_boards.MYI&#8217;; try to repair it mysqld[2978]: 100318 16:44:46 [ERROR] /usr/sbin/mysqld: Table &#8216;./home/tlr_sessions&#8217; is marked as crashed and last [...]]]></description>
			<content:encoded><![CDATA[<p>A veces un apagón repentino o la muerte de nuestro proceso de mysql puede provocar errores de tablas mal cerradas. Sobretodo en tablas de sesiones, logins, etc..</p>
<p><source><br />
mysqld[2978]: 100318  7:34:27 [ERROR] /usr/sbin/mysqld: Incorrect key file for table &#8216;./home/tlr_boards.MYI&#8217;; try to repair it</p>
<p>mysqld[2978]: 100318 16:44:46 [ERROR] /usr/sbin/mysqld: Table &#8216;./home/tlr_sessions&#8217; is marked as crashed and last (automatic?) repair failed<br />
</source></p>
<p>A veces lanzar un mysqlcheck -A no es suficiente, pero con este script sí conseguimos reparar todas las tablas :</p>
<pre>
for database in $(mysql --skip-column-names -uadmin -p`cat /etc/psa/.psa.shadow` -e "show databases" ); do echo "bd: $database"; for table in $(mysql --skip-column-names -uadmin -p`cat /etc/psa/.psa.shadow` -e "show tables" $database ); do echo "reparando $table " ; mysqlcheck -uadmin -p`cat /etc/psa/.psa.shadow` -r $database $table ; done ; done ;
</pre>
<p>Tras la reparación en el log podremos ver algo como esto:<br />
<source><br />
mysqld[2978]: 100318 16:45:49 [Note] Found 1821 of 295 rows when repairing &#8216;./home/tlr_messages&#8217;<br />
mysqld[2978]: 100318 16:45:50 [Note] Found 222 of 1 rows when repairing &#8216;./home/tlr_sessions&#8217;<br />
</source></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://hostingaldescubierto.com/wordpress/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://hostingaldescubierto.com/wordpress/2010/03/18/mysql-reparar-todas-las-tablas-danas-marked-as-crashed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>File Upload Warning: Max File Size Exceeded</title>
		<link>http://hostingaldescubierto.com/wordpress/2010/03/05/file-upload-warning-max-file-size-exceeded/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=file-upload-warning-max-file-size-exceeded</link>
		<comments>http://hostingaldescubierto.com/wordpress/2010/03/05/file-upload-warning-max-file-size-exceeded/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 23:44:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Soporte]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://hostingaldescubierto.com/wordpress/2010/03/05/file-upload-warning-max-file-size-exceeded/</guid>
		<description><![CDATA[Si estamos usando un script en php y necesitamos subir ficheros de gran tamaño, puede que tengamos que ampliar algunos parámetros. Normalente aparece un error como :File Upload Warning: Max File Size Exceeded Para ello, hay que revisar los siguientes parámetros: Apache LimitRequestBody PHP upload_max_filesize PHP post_max_size]]></description>
			<content:encoded><![CDATA[<p>Si estamos usando un script en php y necesitamos subir ficheros de gran tamaño, puede que tengamos que ampliar algunos parámetros.</p>
<p>Normalente aparece un error como :<br /><b>File Upload Warning: Max File Size Exceeded</b></p>
<p>Para ello, hay que revisar los siguientes parámetros:
<ul>
<li>Apache <a target="_blank" href="http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestbody">LimitRequestBody <br /></a></li>
<li>PHP <a target="_blank" href="http://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize">upload_max_filesize</a></li>
<li>PHP <a target="_blank" href="http://www.php.net/manual/en/ini.core.php#ini.post-max-size">post_max_size</a></li>
</ul>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://hostingaldescubierto.com/wordpress/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://hostingaldescubierto.com/wordpress/2010/03/05/file-upload-warning-max-file-size-exceeded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[magento] cambiar usuario y contraseña de la base de datos</title>
		<link>http://hostingaldescubierto.com/wordpress/2009/12/22/magento-cambiar-db-user-password/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=magento-cambiar-db-user-password</link>
		<comments>http://hostingaldescubierto.com/wordpress/2009/12/22/magento-cambiar-db-user-password/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 17:59:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Artículos]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Soporte]]></category>

		<guid isPermaLink="false">http://hostingaldescubierto.com/wordpress/2009/12/22/mysql-reparar-todas-las-tablas-de-todas-las-bases-de-datos-2/</guid>
		<description><![CDATA[Para cambiar los datos de acceso a la base de datos que usa la instalación de Magento hay que editar el fichero : /app/etc/local.xml La estructura del fichero es la siguiente : &#60;config&#62; &#160;&#160;&#160; &#60;global&#62; &#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;install&#62; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;date&#62;&#60;![CDATA[Tue, 14 Jul 2009 16:19:11 +0000]]&#62;&#60;/date&#62; &#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;/install&#62; &#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;crypt&#62; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;key&#62;&#60;![CDATA[g41f732d5dc4abfb174c73bb76cc0670]]&#62;&#60;/key&#62; &#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;/crypt&#62; &#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;disable_local_modules&#62;false&#60;/disable_local_modules&#62; &#160;&#160;&#160;&#160;&#160;&#160;&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Para cambiar los datos de acceso a la base de datos que usa la instalación de Magento hay que editar el fichero : </p>
<pre>/app/etc/local.xml</pre>
<p>La estructura del fichero es la siguiente :</p>
<pre>
&lt;config&gt;
&nbsp;&nbsp;&nbsp; &lt;global&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;install&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;date&gt;&lt;![CDATA[Tue, 14 Jul 2009 16:19:11 +0000]]&gt;&lt;/date&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/install&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;crypt&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;key&gt;&lt;![CDATA[g41f732d5dc4abfb174c73bb76cc0670]]&gt;&lt;/key&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/crypt&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;disable_local_modules&gt;false&lt;/disable_local_modules&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;resources&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;db&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;table_prefix&gt;&lt;![CDATA[]]&gt;&lt;/table_prefix&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/db&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;default_setup&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;connection&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;host&gt;&lt;![CDATA[localhost]]&gt;&lt;/host&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;username&gt;&lt;![CDATA[user_name]]&gt;&lt;/username&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;password&gt;&lt;![CDATA[user_password]]&gt;&lt;/password&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dbname&gt;&lt;![CDATA[data_base_name]]&gt;&lt;/dbname&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;active&gt;1&lt;/active&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/connection&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/default_setup&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/resources&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;session_save&gt;&lt;![CDATA[files]]&gt;&lt;/session_save&gt;
&nbsp;&nbsp;&nbsp; &lt;/global&gt;
&nbsp;&nbsp;&nbsp; &lt;admin&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;routers&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;adminhtml&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;args&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;frontName&gt;&lt;![CDATA[admin]]&gt;&lt;/frontName&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/args&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/adminhtml&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/routers&gt;
&nbsp;&nbsp;&nbsp; &lt;/admin&gt;
&lt;/config&gt;
</pre>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://hostingaldescubierto.com/wordpress/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://hostingaldescubierto.com/wordpress/2009/12/22/magento-cambiar-db-user-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[mysql] Reparar todas las tablas de todas las bases de datos</title>
		<link>http://hostingaldescubierto.com/wordpress/2009/12/22/mysql-reparar-todas-las-tablas-de-todas-las-bases-de-datos/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=mysql-reparar-todas-las-tablas-de-todas-las-bases-de-datos</link>
		<comments>http://hostingaldescubierto.com/wordpress/2009/12/22/mysql-reparar-todas-las-tablas-de-todas-las-bases-de-datos/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 17:17:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Artículos]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[Soporte]]></category>

		<guid isPermaLink="false">http://hostingaldescubierto.com/wordpress/2009/12/22/mysql-reparar-todas-las-tablas-de-todas-las-bases-de-datos/</guid>
		<description><![CDATA[Para reparar todas las tablas de todas las bases de datos ( teniendo en cuenta que usamos Pleks ) en una sola linea tienes este churro: for database in $(mysql --skip-column-names -uadmin -p`cat /etc/psa/.psa.shadow` -e "show databases" ); do echo "optmizing tables from $database"; for table in $(mysql --skip-column-names -uadmin -p`cat /etc/psa/.psa.shadow` -e "show tables" [...]]]></description>
			<content:encoded><![CDATA[<p>Para reparar todas las tablas de todas las bases de datos ( teniendo en cuenta que usamos Pleks ) en una sola linea tienes este churro:</p>
<pre>
for database in $(mysql --skip-column-names -uadmin -p`cat /etc/psa/.psa.shadow` -e "show databases" ); do echo "optmizing tables from $database"; for table in $(mysql --skip-column-names -uadmin -p`cat /etc/psa/.psa.shadow` -e "show tables" $database ); do echo "-&gt; $table " ; mysql -uadmin -p`cat /etc/psa/.psa.shadow` -e "OPTIMIZE TABLE $table" $database ; done ; done ;
</pre>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://hostingaldescubierto.com/wordpress/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://hostingaldescubierto.com/wordpress/2009/12/22/mysql-reparar-todas-las-tablas-de-todas-las-bases-de-datos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[debian] ValueError: unsupported format character &#8216;t&#8217; (0&#215;74) at index 8</title>
		<link>http://hostingaldescubierto.com/wordpress/2009/12/11/debian-valueerror-unsupported-format-character-t-0x74-at-index-8/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=debian-valueerror-unsupported-format-character-t-0x74-at-index-8</link>
		<comments>http://hostingaldescubierto.com/wordpress/2009/12/11/debian-valueerror-unsupported-format-character-t-0x74-at-index-8/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 17:53:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Plesk]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Soporte]]></category>
		<category><![CDATA[mailman]]></category>

		<guid isPermaLink="false">http://hostingaldescubierto.com/wordpress/2009/12/11/debian-valueerror-unsupported-format-character-t-0x74-at-index-8/</guid>
		<description><![CDATA[Me he encontrado con este problema al chequear una lista de correo en mi máquina con Plesk: check_perms : chequea los permisos de ficheros y directorios de la estructura de mailman # ./check_perms -f -v comprobando el modo para /var/lib/mailman comprobando gid y modo de /var/lib/mailman/logs/post comprobando gid y modo de /var/lib/mailman/logs/error comprobando gid y [...]]]></description>
			<content:encoded><![CDATA[<p>Me he encontrado con este problema al chequear una lista de correo en mi máquina con Plesk: </p>
<p>check_perms : chequea los permisos de ficheros y directorios de la estructura de mailman</p>
<pre>
# ./check_perms -f -v
comprobando el modo para /var/lib/mailman
    comprobando gid y modo de /var/lib/mailman/logs/post
    comprobando gid y modo de /var/lib/mailman/logs/error
    comprobando gid y modo de /var/lib/mailman/logs/qrunner
    comprobando gid y modo de /var/lib/mailman/logs/smtp
    comprobando gid y modo de /var/lib/mailman/logs/subscribe
    comprobando gid y modo de /var/lib/mailman/logs/smtp-failure
    comprobando gid y modo de /var/lib/mailman/logs/vette
    comprobando gid y modo de /var/lib/mailman/logs/bounce
    comprobando gid y modo de /var/lib/mailman/logs/locks
    comprobando gid y modo de /var/lib/mailman/mail
Traceback (most recent call last):
  File "./check_perms", line 380, in ?
    checkall()
  File "./check_perms", line 196, in checkall
    os.path.walk(d, checkwalk, STATE)
  File "/usr/lib/python2.4/posixpath.py", line 290, in walk
    func(arg, top, names)
  File "./check_perms", line 120, in checkwalk
    print _('%(path)s bad group (has: %(groupname)s, '
  File "/usr/lib/mailman/Mailman/i18n.py", line 90, in _
    return tns % dict
ValueError: unsupported format character 't' (0x74) at index 8
</pre>
<p>Según he visto comentado en varias fuentes es un bug debido a un problema con el juego de caracteres de la consola, por lo que utf8 está generando problemas. Hay que forzar a ejecutarlo con <b>LANG=C</b></p>
<pre>
export  LC_ALL=C; export  LANG=C
./check_perms -f -v
</pre>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://hostingaldescubierto.com/wordpress/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://hostingaldescubierto.com/wordpress/2009/12/11/debian-valueerror-unsupported-format-character-t-0x74-at-index-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ayuda plesk : error al borrar un dominio</title>
		<link>http://hostingaldescubierto.com/wordpress/2009/11/30/ayuda-plesk-borrar-dominio/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=ayuda-plesk-borrar-dominio</link>
		<comments>http://hostingaldescubierto.com/wordpress/2009/11/30/ayuda-plesk-borrar-dominio/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 17:00:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Artículos]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[Soporte]]></category>
		<category><![CDATA[correo]]></category>

		<guid isPermaLink="false">http://hostingaldescubierto.com/wordpress/?p=252</guid>
		<description><![CDATA[Un error que sigue apareciendo aunque pasen versiones y versiones de Plesk ( desde la 7.4 a la 9.2 ) es la perdida de integridad referencial en algunas tablas. Esto provoca que a la hora de ejectuar algunas herramientas y falten datos se generen errores. En ese caso al borrar el dominio &#8216;delete.me&#8217; nos aparece [...]]]></description>
			<content:encoded><![CDATA[<p>Un error que sigue apareciendo aunque pasen versiones y versiones de Plesk ( desde la 7.4 a la 9.2 ) es la perdida de integridad referencial en algunas tablas. Esto provoca que a la hora de ejectuar algunas herramientas y falten datos se generen errores. En ese caso al borrar el dominio &#8216;delete.me&#8217; nos aparece este mensaje :</p>
<pre>
0: class.MailManager.php:242
        MailManager::execWithException(string 'smart_exec', string 'mailmng', array, array, string 'lst')
1: class.MailManager.php:274
        MailManager->callMailManager(string 'remove-mailname', array)
2: class.MailManager.php:354
        MailManager->removeMailname(string 'sharoj.com', string 'delete')
3: cmd_mail.php3:1357
        mn_del(string '490')
4: class.DSMail.php:211
        DSMail->delete(boolean false)
5: class.PhDomain.php:358
        PhDomain->reset(integer '0', boolean true, boolean false)
6: class.BsDomain.php:330
        BsDomain->reset(integer '0')
7: class.BsDomain.php:302
      BsDomain->delete(integer '0')
8: class.BsDomain.php:536
        mdeleteDomains(array)
9: removeDomains.php3:42
        require(string '/opt/psa/admin/htdocs/domains/removeDomains.php3')
10: plesk.php:51
</pre>
<p>Tendremos que buscar manualmente donde está el problema y repararlo , directamente a la base de datos.</p>
<p>Comenzamos a buscar relaciones rotas entre objetos:</p>
<pre>
# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 152938
Server version: 5.0.32-Debian_7etch10-log Debian etch distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> select id, name from domains where name = "delete.me";
+------+------------+
| id   | name       |
+------+------------+
| 1241 | delete.me  |
+------+------------+
1 row in set (0.00 sec)
</pre>
<p>Ya tenemos el ID del dominio, nos centramos en las cuentas de correo ya que el error se genera al borrar cuentas de correo. Vamos a ver que tablas hay en esta version de Plesk  ( 9.2.3 )</p>
<pre>
mysql> show tables like '%mail%' ;
+------------------------+
| Tables_in_psa (%mail%) |
+------------------------+
| Webmails               |
| badmailfrom            |
| mail                   |
| mail_aliases           |
| mail_redir             |
| mail_resp              |
| mass_mail              |
| mass_mail_clients      |
| mass_mail_domains      |
+------------------------+
9 rows in set (0.00 sec)
</pre>
<p>La tabla que nos interesa es <strong>mail</strong> vamos a ver que esctructura tiene y vamos sacando datos: </p>
<pre>
mysql> desc mail ;
+---------------+------------------------------------------+------+-----+---------+----------------+
| Field         | Type                                     | Null | Key | Default | Extra          |
+---------------+------------------------------------------+------+-----+---------+----------------+
| id            | int(10) unsigned                         | NO   | PRI | NULL    | auto_increment |
| mail_name     | varchar(245)                             | NO   |     |         |                |
| perm_id       | int(10) unsigned                         | NO   | MUL |         |                |
| postbox       | enum('false','true')                     | NO   |     | false   |                |
| account_id    | int(10) unsigned                         | NO   | MUL |         |                |
| redirect      | enum('false','true')                     | NO   |     | false   |                |
| redir_addr    | varchar(255)                             | YES  |     | NULL    |                |
| mail_group    | enum('false','true')                     | NO   |     | false   |                |
| autoresponder | enum('false','true')                     | NO   |     | false   |                |
| spamfilter    | enum('false','true')                     | NO   |     | true    |                |
| virusfilter   | enum('none','incoming','outgoing','any') | NO   |     | none    |                |
| mbox_quota    | bigint(20)                               | NO   |     | -1      |                |
| dom_id        | int(10) unsigned                         | NO   | MUL |         |                |
+---------------+------------------------------------------+------+-----+---------+----------------+
13 rows in set (0.01 sec)

mysql> select * from mail where dom_id = 1241;
+-----+-----------+---------+---------+------------+----------+------------+------------+---------------+------------+-------------+------------+--------+
| id  | mail_name | perm_id | postbox | account_id | redirect | redir_addr | mail_group | autoresponder | spamfilter | virusfilter | mbox_quota | dom_id |
+-----+-----------+---------+---------+------------+----------+------------+------------+---------------+------------+-------------+------------+--------+
| 490 | delete.me |    2202 | true    |       2204 | false    |            | false      | false         | false      | incoming    |         -1 |   1241 |
+-----+-----------+---------+---------+------------+----------+------------+------------+---------------+------------+-------------+------------+--------+
1 row in set (0.00 sec)
</pre>
<p>Vemos que tiene al menos una cuenta de correo para el usuario 2204, vamos a buscar este usuario en la tabla accounts, ya que el id es accounts_id </p>
<pre>
mysql> show tables like '%acco%'
    -> ;
+------------------------+
| Tables_in_psa (%acco%) |
+------------------------+
| accounts               |
+------------------------+
1 row in set (0.00 sec)

mysql> select * from accounts where id = 2204 ;
Empty set (0.01 sec)
</pre>
<p>Pues no está, aquí tenemos el problema, no existe la información del usuario pero sí el buzón.<br />
lo más comodo es borar la entrada en la base de datos de la cuenta de correo. Dado que vamos a borrar el dominio nos es indiferente conservarlo. </p>
<pre>
mysql> delete from mail where id =490 limit 1 ;
Query OK, 1 row affected (0.03 sec)
</pre>
<p>De otra forma , habíamos dado de alta una fila en accounts con el id 2204 .</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://hostingaldescubierto.com/wordpress/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://hostingaldescubierto.com/wordpress/2009/11/30/ayuda-plesk-borrar-dominio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
