<?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>El rIncÓn dE IgOr &#187; php</title>
	<atom:link href="http://www.igorgarcia.es/blog/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.igorgarcia.es/blog</link>
	<description>van 2 klingons por la calle y se cae el del medio</description>
	<lastBuildDate>Fri, 03 Sep 2010 02:06:16 +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>Solucionar error PHP: Undefined variable: HTTP_SERVER_VARS</title>
		<link>http://www.igorgarcia.es/blog/undefined-error-php-http-server-vars</link>
		<comments>http://www.igorgarcia.es/blog/undefined-error-php-http-server-vars#comments</comments>
		<pubDate>Sat, 24 Oct 2009 11:37:56 +0000</pubDate>
		<dc:creator>Igor</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[arreglar]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[solucionar]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.igorgarcia.es/blog/?p=252</guid>
		<description><![CDATA[Tienes una web en PHP funcionando perfectamente y tienes que pasarla a otro servidor, pero resulta que en el nuevo servidor, aunque la web carga, aparece un error similar a este: Notice: Undefined variable: HTTP_SERVER_VARS in /var/www/web/fichero.php on line 298 El problema es que el servidor no reconoce la variable HTTP_SERVER_VARS. Para que la reconozca [...]]]></description>
			<content:encoded><![CDATA[<p>Tienes una web en PHP funcionando perfectamente y tienes que pasarla a otro servidor, pero resulta que en el nuevo servidor, aunque la web carga, aparece un error similar a este:<br />
<code>Notice: Undefined variable: <strong>HTTP_SERVER_VARS</strong> in /var/www/web/fichero.php on line 298</code></p>
<p>El problema es que el servidor no reconoce la variable <strong>HTTP_SERVER_VARS</strong>. Para que la reconozca debes acceder al php.ini y poner a <strong>On</strong> las opciones  <span style="text-decoration: line-through;"><strong>register_globals</strong></span> y <strong>register_long_arrays</strong>. Reiniciamos Apache y comprobamos si el error ha desaparecido.</p>
<p>Si esto no funciona podemos ir al fichero y la línea indicados en el error y sustituir  <strong>HTTP_SERVER_VARS</strong> por <strong>_SERVER</strong>. Por ejemplo, si tenemos:</p>
<p><code>$HTTP_SERVER_VARS['PHP_SELF'];</code></p>
<p>Podemos cambiarlo por:</p>
<p><code>$_SERVER['PHP_SELF'];</code></p>
<p>También podemos tener problemas con otras variables, que podemos solucionar sustituyendolas por otras:</p>
<p><strong>$HTTP_GET_VARS</strong> sustituir por <strong>$_GET</strong></p>
<p><strong>$HTTP_POST_VARS</strong> sustituir por <strong>$_POST</strong></p>
<p>Más información:</p>
<p><a title="Variables predefinidas" href="http://php-manual.promagna.com/reserved.variables.html" onclick="return TrackClick('http%3A%2F%2Fphp-manual.promagna.com%2Freserved.variables.html','Variables+predefinidas')" target="_blank">Manual de PHP: Variables Predefinidas</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.igorgarcia.es/blog/undefined-error-php-http-server-vars/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
