<?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>laplace's demon &#187; php</title>
	<atom:link href="http://www.laplacesdemon.com/cat/programming/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.laplacesdemon.com</link>
	<description>Süleyman Melikoğlu</description>
	<lastBuildDate>Mon, 30 Aug 2010 17:10:11 +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>Zend Framework&#8217;da bir Bug</title>
		<link>http://www.laplacesdemon.com/tech/call-to-undefined-method-zend_view_helper_placeholder_containerksort/</link>
		<comments>http://www.laplacesdemon.com/tech/call-to-undefined-method-zend_view_helper_placeholder_containerksort/#comments</comments>
		<pubDate>Tue, 25 May 2010 17:27:26 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=249</guid>
		<description><![CDATA[Call to undefined method Zend_View_Helper_Placeholder_Container::ksort() Bu hatayı zend framework bir şekilde veriyor. Sanıyorum bir bug&#8217;dan kaynaklanıyor bu sorun. Yeni versionlarda bu hata giderilmiş olması lazım.  Lakin en kolay (geçici çözüm) ise aşağıdaki metodu Zend/View/Helper/Placeholder/Container/Abstract.php dosyasına eklemek. Oh yeah. /** * Sort the array by key * * @return array */ public function ksort() { $items [...]]]></description>
			<content:encoded><![CDATA[<p>Call to undefined method Zend_View_Helper_Placeholder_Container::ksort()</p>
<p>Bu hatayı zend framework bir şekilde veriyor. Sanıyorum bir bug&#8217;dan kaynaklanıyor bu sorun. Yeni versionlarda bu hata giderilmiş olması lazım.  Lakin en kolay (geçici çözüm) ise aşağıdaki metodu Zend/View/Helper/Placeholder/Container/Abstract.php dosyasına eklemek.</p>
<p>Oh yeah.</p>
<pre class="brush:php">
/**
* Sort the array by key
*
* @return array
*/

public function ksort()
{
$items = $this-&gt;getArrayCopy();
return ksort($items);
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/tech/call-to-undefined-method-zend_view_helper_placeholder_containerksort/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Htaccess dosyası</title>
		<link>http://www.laplacesdemon.com/programming/htaccess-dosyasi/</link>
		<comments>http://www.laplacesdemon.com/programming/htaccess-dosyasi/#comments</comments>
		<pubDate>Tue, 04 May 2010 10:30:05 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=245</guid>
		<description><![CDATA[Htaccess dosyasında kullandığım tanımlamaları sürekli unutuyorum. Burayı da not defteri gibi kullanmaya başladım. Yaptığım olay sırayla şu: Öncelikle uygulama ortamını belirliyorum. Buradaki ortama göre bir config dosyası yüklüyorum çünkü. Sonra optimizasyon için ETag ları set ediyorum. Sora Expire header&#8217;ları ayarılıyorum. Sonra her bişeyi Gzip ile sıkıştırıyorum (apache deflate mod sağolsun). Daha sonrası da klasik url [...]]]></description>
			<content:encoded><![CDATA[<p>Htaccess dosyasında kullandığım tanımlamaları sürekli unutuyorum. Burayı da not defteri gibi kullanmaya başladım. Yaptığım olay sırayla şu: Öncelikle uygulama ortamını belirliyorum. Buradaki ortama göre bir config dosyası yüklüyorum çünkü. Sonra optimizasyon için ETag ları set ediyorum. Sora Expire header&#8217;ları ayarılıyorum. Sonra her bişeyi Gzip ile sıkıştırıyorum (apache deflate mod sağolsun). Daha sonrası da klasik url rewrite</p>
<pre class="brush:bash">
SetEnv APPLICATION_ENV production

Header unset ETag
FileETag None
Header set Expires "Thu, 15 Apr 2012 20:00:00 GMT"
Header unset Last-Modified

# Insert filter
SetOutputFilter DEFLATE

# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/programming/htaccess-dosyasi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Php Configure command doesnot work on mac osx with intel arch</title>
		<link>http://www.laplacesdemon.com/programming/php/php-configure-command-doesnot-work-on-mac-osx-with-intel-arch/</link>
		<comments>http://www.laplacesdemon.com/programming/php/php-configure-command-doesnot-work-on-mac-osx-with-intel-arch/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 12:05:37 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=225</guid>
		<description><![CDATA[I have wanted to run my php extensions that I&#8217;ve wrote earlier in a linux machine on mac os x snow leopard, but the intel architecture came with the snow leopard does not allow me to that. Basically my extensions are written in 32 bit but my development environment is in 64bits now. By the [...]]]></description>
			<content:encoded><![CDATA[<p>I have wanted to run my php extensions that I&#8217;ve wrote earlier in a linux machine on mac os x snow leopard, but the intel architecture came with the snow leopard does not allow me to that. Basically my extensions are written in 32 bit but my development environment is in 64bits now. By the way I am using Zend Server CE for now.</p>
<p>Normally you should build php for your new extension by running the following commands</p>
<blockquote><p>phpize<br />
./configure (add some configuration parameters here)<br />
make</p></blockquote>
<p>But it won&#8217;t help and gives an error like this:</p>
<blockquote><p>mach-o, but wrong architecture in Unknown on line 0</p></blockquote>
<p>The solution is to add some extra build parameters before the configuration command:</p>
<blockquote><p>MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS=&#8217;-O3 -fno-common -arch i386 -arch x86_64&#8242; LDFLAGS=&#8217;-O3 -arch i386 -arch x86_64&#8242; CXXFLAGS=&#8217;-O3 -fno-common -arch i386 -arch x86_64&#8242; ./configure</p></blockquote>
<p>Then you&#8217;re ready to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/programming/php/php-configure-command-doesnot-work-on-mac-osx-with-intel-arch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scalability in PHP</title>
		<link>http://www.laplacesdemon.com/programming/scalability-in-php/</link>
		<comments>http://www.laplacesdemon.com/programming/scalability-in-php/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 16:47:07 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=196</guid>
		<description><![CDATA[PHP nin sevdiğim tarafı iyi scale edilebiliyor olması. Bu konuda güzel bi prezentasyon buldum. Scalability In PHP View more presentations from Ian Selby.]]></description>
			<content:encoded><![CDATA[<p>PHP nin sevdiğim tarafı iyi scale edilebiliyor olması. Bu konuda güzel bi prezentasyon buldum.</p>
<div style="width:425px;text-align:left" id="__ss_702265"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/ianselby/scalability-in-php-presentation" title="Scalability In PHP">Scalability In PHP</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=scalability-in-php-1225297093113032-9&#038;stripped_title=scalability-in-php-presentation" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=scalability-in-php-1225297093113032-9&#038;stripped_title=scalability-in-php-presentation" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/ianselby">Ian Selby</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/programming/scalability-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shared Hosting için Zend Framework kurulumu</title>
		<link>http://www.laplacesdemon.com/programming/shared-hosting-icin-htaccess-ile-zend-framework-kurulumu/</link>
		<comments>http://www.laplacesdemon.com/programming/shared-hosting-icin-htaccess-ile-zend-framework-kurulumu/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 10:54:13 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[zend frameword]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=194</guid>
		<description><![CDATA[dertli bir iş. en büyük sıkıntı da shared hostinglerde document root değiştirilemediği için oluyor. zend framework için önerilen dizin yapısında public klasörü rootda yer almıyor. bu bir çok açıdan tercih edilmesi gereken bir durum. ancak shared hostinglerdeki document root olan httpdocs ya da public_html klasörünün bir üzerinde değişiklik yapılamadığı için aşağıdaki kodu root dizindeki .htaccess [...]]]></description>
			<content:encoded><![CDATA[<p>dertli bir iş. en büyük sıkıntı da shared hostinglerde <strong>document root</strong> değiştirilemediği için oluyor. zend framework için önerilen dizin yapısında <strong>public</strong> klasörü rootda yer almıyor. bu bir çok açıdan tercih edilmesi gereken bir durum. ancak shared hostinglerdeki document root olan httpdocs ya da public_html klasörünün bir üzerinde değişiklik yapılamadığı için aşağıdaki kodu root dizindeki .htaccess dosyasının içine kopyalayın. public dizinindeki .htaccess dosyasını da kaldırın. mis gibi.</p>
<pre class="brush:bash">
RewriteEngine On

RewriteRule ^\.htaccess$ - [F]

RewriteCond %{REQUEST_URI} =""
RewriteRule ^.*$ /public/index.php [NC,L]

RewriteCond %{REQUEST_URI} !^/public/.*$
RewriteRule ^(.*)$ /public/$1

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]

RewriteRule ^public/.*$ /public/index.php [NC,L]</pre>
<p>kaynak: <a href="http://www.alberton.info/zend_framework_mod_rewrite_shared_hosting.html" target="_blank">şurası</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/programming/shared-hosting-icin-htaccess-ile-zend-framework-kurulumu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Zend Studio ile Xdebug Kullanmak</title>
		<link>http://www.laplacesdemon.com/programming/php/zend-studio-ile-xdebug-kullanmak/</link>
		<comments>http://www.laplacesdemon.com/programming/php/zend-studio-ile-xdebug-kullanmak/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 10:26:34 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=187</guid>
		<description><![CDATA[Oldukça uzun süredir Zend debugger kullanıyordum. Halimden de memnundum açıkçası, çünkü debugging olayından beklentim remote debugging den ibaretti ve Zend debugger da sorunsuz çalışıyordu. İşletim sistemi değiştirip mac&#8217;e geçmemle birlikte Xdebug&#8217;ı denemeye karar verdim, ve şimdi bi sürü &#8220;fancy&#8221; özelliğiyle birlikte Xdebug&#8217;ın Zend debugger&#8217;dan çok daha iyi olduğunu anlamış bulunuyorum. Mac&#8217;e geçmemle beraber uzun süredir [...]]]></description>
			<content:encoded><![CDATA[<p>Oldukça uzun süredir Zend debugger kullanıyordum. Halimden de memnundum açıkçası, çünkü debugging olayından beklentim remote debugging den ibaretti ve Zend debugger da sorunsuz çalışıyordu. İşletim sistemi değiştirip mac&#8217;e geçmemle birlikte Xdebug&#8217;ı denemeye karar verdim, ve şimdi bi sürü &#8220;fancy&#8221; özelliğiyle birlikte Xdebug&#8217;ın Zend debugger&#8217;dan çok daha iyi olduğunu anlamış bulunuyorum.</p>
<p>Mac&#8217;e geçmemle beraber uzun süredir kullandığım Zend Studio 5.5 ve Aptana&#8217;dan da Zend Studio 7&#8242;ye geçmeye karar verdim. Zend Studio 7 eclipse üzerine kurulmuş harika bir ide. Gerçi ben hala alışabilmiş değilim ama artık bir değişikik yapmam şarttı.</p>
<p>Neyse, Zend Studio 7 malesef debugger olarak sadece Zend Debugger&#8217;a izin veriyor. Xdebug disable edilmiş durumda. Ancak ufak bir trick ile bunu değiştirmek mümkün. Şöyleki;</p>
<p>1. Zend Studio folder&#8217;a gidilir. cd /Applications/Zend/Zend\ Studio\ -\ 7.0.0<br />
2. cd pluginsmkdir disabled<br />
3. mkdir disabled<br />
4. mv com.zend.php.debug* disabled<br />
5. Bir de configurasyon dosyasında ufak bir değişiklik yapmamız gerek. open -a TextWrangler com.zend.php_&lt;ZSE_version_number&gt;/plugin_customization.ini<br />
6. ‘org.eclipse.ui.workbench/UIActivities.com.zend.php.debug.ui.XDebugActivity’ alanının değerini ‘true’ olarak değiştir.<br />
7. Zend Studio&#8217;yu yeniden başlat.<br />
8. Preferences içinde PHP -&gt; Debug sayfasında gerekli değişiklikler yapılır (debugger olarak Xdebug seç, PHP executable path i göster vb.)</p>
<p><code>Afiyet olsun.</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/programming/php/zend-studio-ile-xdebug-kullanmak/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Date ile tarih aralığı hesaplamak</title>
		<link>http://www.laplacesdemon.com/programming/php/zend-date-ile-tarih-araligi-hesaplamak/</link>
		<comments>http://www.laplacesdemon.com/programming/php/zend-date-ile-tarih-araligi-hesaplamak/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 19:25:03 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[zend_date]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=142</guid>
		<description><![CDATA[çok basit olsa da ben yine de buraya yazıyorum. yapmaya çalışılan kaç yaşında olduğunu hesaplamak.  tek yaptığım da iki timestamp&#8217;ı (biri şu anki tarih, diğeri doğum günü) birbirinden çıkartmak. küsüratlı bir rakam elde edilmek istenmiyorsa floor fonksiyonuyla yuvarlana da bilir. bir de 365 e bölmek istenmeyebilir. o ayrı. $now = new Zend_Date(); $dob = new [...]]]></description>
			<content:encoded><![CDATA[<p>çok basit olsa da ben yine de buraya yazıyorum. yapmaya çalışılan kaç yaşında olduğunu hesaplamak.  tek yaptığım da iki timestamp&#8217;ı (biri şu anki tarih, diğeri doğum günü) birbirinden çıkartmak. küsüratlı bir rakam elde edilmek istenmiyorsa floor fonksiyonuyla yuvarlana da bilir. bir de 365 e bölmek istenmeyebilir. o ayrı.</p>
<pre class="brush:php">
$now = new Zend_Date();
$dob = new Zend_Date("954686860", Zend_Date::TIMESTAMP );
echo floor(($now-&gt;getTimestamp() - $dob-&gt;getTimestamp()) / (24 * 60 * 60)) / 365;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/programming/php/zend-date-ile-tarih-araligi-hesaplamak/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
