<?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>Backtheweb &#187; PHP</title>
	<atom:link href="http://www.backtheweb.com/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.backtheweb.com</link>
	<description>Notas y recursos de un desarrollador web</description>
	<lastBuildDate>Fri, 06 Jan 2012 01:58:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Instalar APC en Snow Leopard</title>
		<link>http://www.backtheweb.com/php/instalar-apc-en-snow-leopard.html</link>
		<comments>http://www.backtheweb.com/php/instalar-apc-en-snow-leopard.html#comments</comments>
		<pubDate>Wed, 21 Jul 2010 00:25:49 +0000</pubDate>
		<dc:creator>Jordi Touza Bonnin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[APC]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[Snow Leopa]]></category>

		<guid isPermaLink="false">http://www.backtheweb.com/?p=368</guid>
		<description><![CDATA[Actualmente estoy integrando Doctrine 2 con Zend Framework. A la hora de executar en la terminal doctrine orm:validate-schema me encontraba con el siguiente error: PHP Fatal error: Call to undefined function Doctrine\Common\Cache\apc_fetch() in /vhosts/doctrine/library/Doctrine/Common/Cache/ApcCache.php on line 59 Esto sucede porque no tengo instalado el APC. Para instalar correctamente el APC se han de indicar en [...]]]></description>
			<content:encoded><![CDATA[<p>Actualmente estoy integrando <strong>Doctrine 2</strong> con<strong> Zend Framework</strong>.</p>
<p>A la hora de executar en la terminal <code>doctrine orm:validate-schema</code> me encontraba con el siguiente error:</p>
<p><code>PHP Fatal error:  Call to undefined function Doctrine\Common\Cache\apc_fetch() in /vhosts/doctrine/library/Doctrine/Common/Cache/ApcCache.php on line 59</code></p>
<p>Esto sucede porque no tengo instalado el <strong>APC</strong>.</p>
<p>Para instalar correctamente el <strong>APC</strong> se han de indicar en <strong>Snow Leopard</strong> unos flags para que el <strong>APC</strong> se compile con la arquitectura adecuada</p>
<pre><code>wget http://pecl.php.net/get/APC-3.1.3p1.tgz
tar -xvf APC-3.1.3p1.tgz
cd APC-3.1.3p1
/usr/local/zend/bin/phpize

MACOSX_DEPLOYMENT_TARGET=10.6
CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp"
CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
LDFLAGS="-arch i386 -arch x86_64 -bind_at_load"
export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET

./configure --enable-apc-mmap --with-apxs=/usr/sbin/apxs --with-php-config=/usr/local/zend/bin/php-config

make
sudo make install
</code></pre>
<p>Luego insertamos en el <em>php.ini</em></p>
<pre><code>extension=apc.so

apc.enabled=1
apc.shm_segments=1
apc.shm_size=128
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=1</code></pre>
<p>Reinicia el <em>apache</em> y revisa la configuración del <strong>APC</strong> con <code>phpinfo()</code>, verás que se ha compilado correctamente.</p>
<p><strong>Actualización</strong>: Si al recargar las paginas web se os queda la página en blanco mirar los logs de php. Si os aparece:<br />
<code> Module 'apc' already loaded in Unknown on line 0</code> comentar la linea <code>extension=apc.so</code> poniendo un &#8220;;&#8221; (punto y comoa) delante.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.backtheweb.com/php/instalar-apc-en-snow-leopard.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

