<?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>PHP Log &#187; CakePHP</title>
	<atom:link href="http://www.php-log.de/programmierer/php/cakephp/feed" rel="self" type="application/rss+xml" />
	<link>http://www.php-log.de</link>
	<description>Eine feine Sammlung nützlicher PHP Notizen</description>
	<lastBuildDate>Thu, 27 May 2010 04:43:12 +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>CakePHP &#8211; Arbeiten mit zwei Datenbanken</title>
		<link>http://www.php-log.de/505/php/cakephp-arbeiten-mit-zwei-datenbanken</link>
		<comments>http://www.php-log.de/505/php/cakephp-arbeiten-mit-zwei-datenbanken#comments</comments>
		<pubDate>Thu, 18 Mar 2010 14:00:21 +0000</pubDate>
		<dc:creator>ralle</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.php-log.de/?p=505</guid>
		<description><![CDATA[Im Prinzip ist es sehr einfach mit zwei Datenbanken zu arbeiten. CakePHP erlaubt ja über die Member Variable $useDbConfig die Konfiguration zu ändern. Dieses Verfahren wird hier ganz schön beschrieben: http://blog.4webby.com/posts/view/6/cakephp_models_using_multiple_db_connections Aaaahber, was ist wenn es keine weitere Konfiguration gibt, weil mit einer flammneuen Datenbank gearbeitet werden soll, die man gerade eben erst selbst erzeugt [...]]]></description>
			<content:encoded><![CDATA[<p>Im Prinzip ist es sehr einfach mit zwei Datenbanken zu arbeiten. CakePHP erlaubt ja über die Member Variable $useDbConfig die Konfiguration zu ändern.</p>
<p><span id="more-505"></span></p>
<p>Dieses Verfahren wird hier ganz schön beschrieben: <a href="http://blog.4webby.com/posts/view/6/cakephp_models_using_multiple_db_connections">http://blog.4webby.com/posts/view/6/cakephp_models_using_multiple_db_connections</a></p>
<p>Aaaahber, was ist wenn es keine weitere Konfiguration gibt, weil mit einer flammneuen Datenbank gearbeitet werden soll, die man gerade eben erst selbst erzeugt hat? In diesem Fall hilft das &#8220;USE&#8221; Statement. Hier ein Bespiel:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// DB Wechseln</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Model</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;USE `other_db` ;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Query auf der neuen DB absetzen</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Model</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;UPDATE configuration SET configuration_value = 'foo' WHERE configuration_key =  'bar' ;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Und wieder zurück zur alten DB</span>
<span style="color: #000088;">$current_config</span>    <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Model</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getDataSource</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$original_db</span> 	    <span style="color: #339933;">=</span> <span style="color: #000088;">$current_config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'database'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Model</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;USE `<span style="color: #006699; font-weight: bold;">$original_db</span>` ;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.php-log.de/505/php/cakephp-arbeiten-mit-zwei-datenbanken/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP: E-Mails über die Shell versenden</title>
		<link>http://www.php-log.de/496/php/cakephp-e-mails-uber-die-shell-versenden</link>
		<comments>http://www.php-log.de/496/php/cakephp-e-mails-uber-die-shell-versenden#comments</comments>
		<pubDate>Tue, 02 Feb 2010 12:55:44 +0000</pubDate>
		<dc:creator>ralle</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.php-log.de/?p=496</guid>
		<description><![CDATA[Es gibt verschiedene kleiner Hürden die umschifft werden wollen, bevor man mit einer Shell ordentliche E-Mailversenden kann. Hier nun ein kleines Schnippsel wie es bei mir zur Zeit funktioniert, eines der Hauptprobleme die ich hatte war das Nutzen der Templates. &#60;?php App::import&#40;'Core', 'Controller'&#41;; App::import&#40;'Component', 'Email'&#41;; &#160; $this-&#62;Controller =&#38; new Controller&#40;&#41;; $this-&#62;Email =&#38; new EmailComponent&#40;null&#41;; $this-&#62;Email-&#62;Controller [...]]]></description>
			<content:encoded><![CDATA[<p>Es gibt verschiedene kleiner Hürden die umschifft werden wollen, bevor man mit einer Shell ordentliche E-Mailversenden kann. <span id="more-496"></span></p>
<p>Hier nun ein kleines Schnippsel wie es bei mir zur Zeit funktioniert, eines der Hauptprobleme die ich hatte war das Nutzen der Templates.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
App<span style="color: #339933;">::</span><span style="color: #004000;">import</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Core'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Controller'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
App<span style="color: #339933;">::</span><span style="color: #004000;">import</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Component'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Email'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Controller</span> <span style="color: #339933;">=&amp;</span> <span style="color: #000000; font-weight: bold;">new</span> Controller<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span> <span style="color: #339933;">=&amp;</span> <span style="color: #000000; font-weight: bold;">new</span> EmailComponent<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Controller</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Controller</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">to</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Project Notifier &lt;rk@fakeadressdotfake.de&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">bcc</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Project Notifier &lt;rk@fakeadressdotfake.de&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">replyTo</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Project Notifier &lt;rk@fakeadressdotfake.de&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">from</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Project Notifier &lt;rk@fakeadressdotfake.de&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Wichtig</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">charset</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'UTF8'</span><span style="color: #339933;">;</span>	
&nbsp;
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Controller</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'client'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$clients</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">send</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.php-log.de/496/php/cakephp-e-mails-uber-die-shell-versenden/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP &#8211; Installation in einem Verzeichnis</title>
		<link>http://www.php-log.de/452/php/cakephp-installation-in-einem-verzeichnis</link>
		<comments>http://www.php-log.de/452/php/cakephp-installation-in-einem-verzeichnis#comments</comments>
		<pubDate>Wed, 02 Sep 2009 22:28:06 +0000</pubDate>
		<dc:creator>ralle</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[mod_rewrite]]></category>

		<guid isPermaLink="false">http://www.php-log.de/?p=452</guid>
		<description><![CDATA[Üblicherweise werden CakePHP Applikation ja im Document Root eines Webserver installiert und sind dann direkt über die Domain zu erreichen. Wenn dies aber mal nicht der Fall ist, sollte man schon früh und gründlich prüfen ob der Ziel-Server überhaupt die technischen Voraussetzungen für den Betrieb einer modernen MVC Anwendung bietet. Da ich gerade vor genau [...]]]></description>
			<content:encoded><![CDATA[<p>Üblicherweise werden CakePHP Applikation ja im Document Root eines Webserver installiert und sind dann direkt über die Domain zu erreichen. Wenn dies aber mal nicht der Fall ist, sollte man schon früh und gründlich prüfen ob der Ziel-Server überhaupt die technischen Voraussetzungen für den Betrieb einer modernen MVC Anwendung bietet.<span id="more-452"></span></p>
<p>Da ich gerade vor genau diesem Problem stehe, habe ich eine kleine CakePHP Beispielanwendung zurecht geschustert, die in ein beliebiges Verzeichnis installiert werden kann. Dazu gibt es noch eine Installationsanleitung mit einigen Screenshots.</p>
<p>Download: <a href="http://www.php-log.de/wp-content/plugins/download-monitor/download.php?id=1" title="CakePHP Server Test">CakePHP Server Test</a></p>
<p>Achtung, diese Beipielanwendung ist in der index.php modifiziert. Wer Sie seine Anwendung in das regläre Directory Layout zurück transformieren will muss die index.php auf unterste Ebene anpassen oder durch das Original ersetzen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.php-log.de/452/php/cakephp-installation-in-einem-verzeichnis/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP &#8211; Error: The requested address was not found on this server</title>
		<link>http://www.php-log.de/418/php/cakephp-error-the-requested-address-was-not-found-on-this-server</link>
		<comments>http://www.php-log.de/418/php/cakephp-error-the-requested-address-was-not-found-on-this-server#comments</comments>
		<pubDate>Wed, 12 Aug 2009 00:08:10 +0000</pubDate>
		<dc:creator>ralle</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://www.php-log.de/?p=418</guid>
		<description><![CDATA[Sowas passiert natürlich immer wenn es gerade brennt. Man Deployed seine Anwendung, am besten wenn der Kunde dabei ist und dann spinnt ein Controller rum. Will einfach nicht gehen. Die üblichen Verdächtigen in so einem Fall sind wie hier beschrieben: Datenbankprobleme Cacheprobleme Probleme mit den Schreibrechten im /tmp Ordner In meinem Fall war es aber [...]]]></description>
			<content:encoded><![CDATA[<p>Sowas passiert natürlich immer wenn es gerade brennt. Man Deployed seine Anwendung, am besten wenn der Kunde dabei ist und dann spinnt ein Controller rum. Will einfach nicht gehen.<span id="more-418"></span></p>
<p>Die üblichen Verdächtigen in so einem Fall sind wie hier <a href="http://blog.devayd.com/2008/05/error-the-requested-address-was-not-found-on-this-server/" target="_blank">beschrieben</a>:</p>
<ul>
<li>Datenbankprobleme</li>
<li>Cacheprobleme</li>
<li>Probleme mit den Schreibrechten im /tmp Ordner</li>
</ul>
<p>In meinem Fall war es aber keiner der drei Klassiker. Ich hatte die Anwendung im Produktiv Modus und daher in der core.php den Debug-Modus aus. Configure::write(&#8216;debug&#8217;, 0);</p>
<p>Deswegen bekam ich auch keine sinnvolle Fehlermeldung, denn ich hatte einfach nur vergessen eine Modelklasse, die ohne Datenbank arbeitet, zu deployen. Deswegen lief bei mir lokal auch einwandfrei. Aber wie ich ja neulich schon erwähnte: <a href="http://www.php-log.de/404/php/554-helo-command-rejected-sorry-localhost-is-local-not-remote">Sorry, localhost is local, not remote</a> <img src='http://www.php-log.de/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.php-log.de/418/php/cakephp-error-the-requested-address-was-not-found-on-this-server/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>554 Helo command rejected: Sorry, localhost is local, not remote</title>
		<link>http://www.php-log.de/404/php/554-helo-command-rejected-sorry-localhost-is-local-not-remote</link>
		<comments>http://www.php-log.de/404/php/554-helo-command-rejected-sorry-localhost-is-local-not-remote#comments</comments>
		<pubDate>Fri, 31 Jul 2009 16:13:57 +0000</pubDate>
		<dc:creator>ralle</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[SMTP]]></category>

		<guid isPermaLink="false">http://www.php-log.de/?p=404</guid>
		<description><![CDATA[Vollkommen unerwartet bekomme ich nun diese Fehlermeldung beim Versenden einer E-Mail via SMTP mit der CakePHP Mail Komponente. 554 Helo command rejected: Sorry, localhost is local, not remote. Bei einer anderen Anwendung, die identischen Code verwendet und ebenfalls auf meinen lokalen Rechner läuft klappt der E-Mail-Versand. WTF&#8230; Weder Google noch Bing finden etwas relevantes für [...]]]></description>
			<content:encoded><![CDATA[<p>Vollkommen unerwartet bekomme ich nun diese Fehlermeldung beim Versenden einer E-Mail via SMTP mit der CakePHP Mail Komponente. 554 Helo command rejected: Sorry, localhost is local, not remote. Bei einer anderen Anwendung, die identischen Code verwendet und ebenfalls auf meinen lokalen Rechner läuft klappt der E-Mail-Versand. WTF&#8230;<span id="more-404"></span></p>
<p>Weder Google noch Bing finden etwas relevantes für diese Fehlermeldung. Ich habe noch ein leise Erinnerung an die Probleme die, je nach Provider, mit dem <a title="SMTP Problem" href="http://www.php-log.de/343/php/smpt-450-sender-address-rejected-domain-not-found" target="_blank">SMTP Versand</a> auftreten können. Glücklicherweise stoplterte ich aber im Cake Handbuch über die <a href="http://book.cakephp.org/de/view/481/Sending-A-Message-Using-SMTP" target="_blank">Dokumentation zur Mail Komponente </a>und die weisen Jungs bei CakePHP haben eine Lösung. Es ist der Sendeparameter &#8216;client&#8217;, den ich zuvor nie benötigte und der laut Doku nur bei nicht RFC 821 konformen SMTP Servern benötigt wird. Sobald ich für &#8216;client&#8217; den Host des SMTP Server (oder irgendeinen anderen) eingetragen habe funktioniert der Mailversand.</p>
<p>Warum es vom gleichen Host mit den gleichen SMTP Daten einmal funktioniert und ein anderes mal nicht will sich mir aber trotzdem nicht erschliessen. Naja, es mir aber auch niemals jemand versprochen, dass man als PHP Programmierer ausschliesslich auf einer Blümchenwiese lebt <img src='http://www.php-log.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Achso, hier auch noch das entsprechende Codesample:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> prepareSmtpSending<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">smtpOptions</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	    <span style="color: #0000ff;">'port'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">25</span><span style="color: #339933;">,</span> 
	    <span style="color: #0000ff;">'timeout'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">30</span><span style="color: #339933;">,</span>
	    <span style="color: #0000ff;">'host'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'mail.irgendwo.de'</span><span style="color: #339933;">,</span>
	    <span style="color: #0000ff;">'username'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'hans'</span><span style="color: #339933;">,</span>
	    <span style="color: #0000ff;">'password'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'wurst'</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">'client'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'irgendwo.de'</span> <span style="color: #666666; font-style: italic;">// &lt;-- Die Rettung</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">delivery</span> 	<span style="color: #339933;">=</span> <span style="color: #0000ff;">'smtp'</span><span style="color: #339933;">;</span>		
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.php-log.de/404/php/554-helo-command-rejected-sorry-localhost-is-local-not-remote/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP &#8211; Pagination in Verbindung mit Containable</title>
		<link>http://www.php-log.de/392/allgemeines/cakephp-pagination-in-verbindung-mit-containable</link>
		<comments>http://www.php-log.de/392/allgemeines/cakephp-pagination-in-verbindung-mit-containable#comments</comments>
		<pubDate>Wed, 29 Jul 2009 19:00:36 +0000</pubDate>
		<dc:creator>ralle</dc:creator>
				<category><![CDATA[Allgemeines]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Containable]]></category>
		<category><![CDATA[Pagination]]></category>

		<guid isPermaLink="false">http://www.php-log.de/?p=392</guid>
		<description><![CDATA[Das Behaviour Containable ist eines der Highlights bei der Arbeit mit CakePHP, erlaubt doch es quasi wahlfreien Zugriff auf verknüpfte Datensätze. Häufig benötigt man die Dienste von Containable in Kombination mit einer Pagination. Das ist im Handbuch auch ganz gut dokumentiert. Ich möchte hier aber auf eine Besonderheit in der Notation aufmerksam machen, und zwar [...]]]></description>
			<content:encoded><![CDATA[<p>Das Behaviour Containable ist eines der Highlights bei der Arbeit mit CakePHP, erlaubt doch es quasi wahlfreien Zugriff auf verknüpfte Datensätze. <span id="more-392"></span></p>
<p>Häufig benötigt man die Dienste von Containable in Kombination mit einer Pagination. Das ist im Handbuch auch ganz gut <a href="http://book.cakephp.org/de/view/474/Containable">dokumentiert</a>. Ich möchte hier aber auf eine Besonderheit in der Notation aufmerksam machen, und zwar die Verknüpfung mittels Punktnotation. Folgendes Codefragment aus der Praxis soll dass verdeutlichen.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> revenues<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$conditions</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Revenue.user_id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Revenue.status'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'pending'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">paginate</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'conditions'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$conditions</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'contain'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Client.User'</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">// &lt;-- Hier liegt die Magie</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$revenues</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">paginate</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Revenue'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Durch die &#8216;contain&#8217; Zeile erhalten wir ein Array von folgender Struktur:</p>
<pre>
Array
(
    [0] => Array
        (
            [Revenue] => Array
                (
                    [id] => 10
                    [status] => pending
                     ...
                    [updated] => 2009-07-29 20:19:27
                    [created] => 2009-07-29 20:19:27
                )
            [Client] => Array
                (
                    [id] => 17
                    [user_id] => 15
                     ...
// Der verknüpfte Datensatz wird von Containable eingesetzt
                    [User] => Array
                        (
                            [id] => 15
                            [name] => Hans
                            ...
                        )
                )
        )
)
</pre>
<p>Ohne die contain Zeile bekämen wir dieses Array, es fehlt der User:</p>
<pre>
Array
(
    [0] => Array
        (
            [Revenue] => Array
                (
                    [id] => 10
                    [status] => pending
                     ...
                    [updated] => 2009-07-29 20:19:27
                    [created] => 2009-07-29 20:19:27
                )
            [Client] => Array
                (
                    [id] => 17
                    [user_id] => 15
                )
        )
)
</pre>
<p><strong>Update</strong><br />
Wichtig: Wer mit Containable arbeitet sollte unbedingt darauf achten das Feld &#8216;recursion&#8217; aus seinem $conditions Array zu löschen. Andernfalls gibt es Probleme mit tiefen Rekursionen im Kontext von Containable</p>
]]></content:encoded>
			<wfw:commentRss>http://www.php-log.de/392/allgemeines/cakephp-pagination-in-verbindung-mit-containable/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP &#8211; Pagination bei einer HABTM Beziehung</title>
		<link>http://www.php-log.de/383/php/cakephp-pagination-bei-einer-habtm-beziehung</link>
		<comments>http://www.php-log.de/383/php/cakephp-pagination-bei-einer-habtm-beziehung#comments</comments>
		<pubDate>Tue, 21 Jul 2009 02:04:50 +0000</pubDate>
		<dc:creator>ralle</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[HABTM]]></category>
		<category><![CDATA[Pagination]]></category>

		<guid isPermaLink="false">http://www.php-log.de/?p=383</guid>
		<description><![CDATA[Das Handbuch ist nicht allzu Gesprächig was dieses Thema angeht. Glücklicherweise gibt es eine funktionierende, aber nicht gut dokumentierte Lösung. Zu finden ist sie beim Cakebaker. Es gibt einen Key für die Pagination, für den ich keine Doku finden konnte. Falls jemand in der offiziellen Doku etwas finden sollte, freue ich mich über jeden Hinweis [...]]]></description>
			<content:encoded><![CDATA[<p>Das Handbuch ist nicht allzu Gesprächig was dieses Thema angeht. Glücklicherweise gibt es eine funktionierende, aber nicht gut dokumentierte Lösung.<span id="more-383"></span></p>
<p>Zu finden ist sie beim <a target="_blank" href="http://cakebaker.42dh.com/2007/10/17/pagination-of-data-from-a-habtm-relationship/">Cakebaker</a>. Es gibt einen Key für die Pagination, für den ich keine Doku finden konnte. Falls jemand in der offiziellen Doku etwas finden sollte, freue ich mich über jeden Hinweis und Kommentar.<br />
Der Key lautet <code>joins</code> und erwartet ein Array das die Beziehung definiert.</p>
<p>In meinem Fall ist es so, dass Produkte und User in einer HABTM Beziehung stehen. Die Auflösungstabelle ist products_users und hat die übliche HABTM Struktur.  Hier der Code, der für mich in der Index Funktion meines Controllers funktioniert.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> index<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">paginate</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'Product'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'limit'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'joins'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
		        <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
		            <span style="color: #0000ff;">'table'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'products_users'</span><span style="color: #339933;">,</span> 
		            <span style="color: #0000ff;">'alias'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'ProductUser'</span><span style="color: #339933;">,</span> 
		            <span style="color: #0000ff;">'type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'inner'</span><span style="color: #339933;">,</span>  
		            <span style="color: #0000ff;">'conditions'</span><span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ProductUser.product_id = Product.id'</span><span style="color: #009900;">&#41;</span> 
		        <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
		        <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
		            <span style="color: #0000ff;">'table'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'users'</span><span style="color: #339933;">,</span> 
		            <span style="color: #0000ff;">'alias'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'User'</span><span style="color: #339933;">,</span> 
		            <span style="color: #0000ff;">'type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'inner'</span><span style="color: #339933;">,</span>  
		            <span style="color: #0000ff;">'conditions'</span><span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
		                <span style="color: #0000ff;">'User.id = ProductUser.user_id'</span><span style="color: #339933;">,</span> 
		                <span style="color: #0000ff;">'User.id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_id</span>
		            <span style="color: #009900;">&#41;</span> 
		        <span style="color: #009900;">&#41;</span>
		        <span style="color: #009900;">&#41;</span>				
	         <span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'products'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">paginate</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Product'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Das ganze ist natürlich einiges an Code, es gibt auch eine <a href="http://bakery.cakephp.org/articles/view/quick-tip-doing-ad-hoc-joins-in-model-find">Lösung</a> die das meiste in den app_controller packt, die ich nicht benutze, aber der Vollständigkeit erwähnen wollte. Sollte jemand eine bessere Lösung kennen bitte ich um Erleuchtung <img src='http://www.php-log.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.php-log.de/383/php/cakephp-pagination-bei-einer-habtm-beziehung/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP &#8211; Einfluss auf die Paginator URL nehmen</title>
		<link>http://www.php-log.de/372/php/cakephp-einfluss-auf-die-paginator-url-nehmen</link>
		<comments>http://www.php-log.de/372/php/cakephp-einfluss-auf-die-paginator-url-nehmen#comments</comments>
		<pubDate>Wed, 17 Jun 2009 09:54:35 +0000</pubDate>
		<dc:creator>ralle</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Pagination]]></category>
		<category><![CDATA[views]]></category>

		<guid isPermaLink="false">http://www.php-log.de/?p=372</guid>
		<description><![CDATA[In den Views mit Hilfe der Methoden prev(), next() und numbers() zwischen den einzelnen Seiten einer Auflistung navigiert werden. Was aber ist zu tun wenn man die URL anpassen möchte? Soll z.B. an eine URL wie diese /users/index/page:2 noch eine ID angehängt werden, so dass man diese URL erhält /users/index/23/page:2 kann man das folgendermaßen erreichen [...]]]></description>
			<content:encoded><![CDATA[<p>In den Views mit Hilfe der Methoden prev(), next() und numbers() zwischen den einzelnen Seiten einer Auflistung navigiert werden. Was aber ist zu tun wenn man die URL anpassen möchte?<span id="more-372"></span></p>
<p>Soll z.B. an eine URL wie diese /users/index/page:2 noch eine ID angehängt werden, so dass man diese URL erhält /users/index/23/page:2 kann man das folgendermaßen erreichen</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$paginator</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">prev</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;&lt; '</span><span style="color: #339933;">.</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'zurück'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">23</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'disabled'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$paginator</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">numbers</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">23</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$paginator</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">next</span><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'weiter'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' &gt;&gt;'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">23</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'disabled'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.php-log.de/372/php/cakephp-einfluss-auf-die-paginator-url-nehmen/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SMPT 450 : Sender address rejected: Domain not found</title>
		<link>http://www.php-log.de/343/php/smpt-450-sender-address-rejected-domain-not-found</link>
		<comments>http://www.php-log.de/343/php/smpt-450-sender-address-rejected-domain-not-found#comments</comments>
		<pubDate>Fri, 05 Jun 2009 03:49:03 +0000</pubDate>
		<dc:creator>ralle</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[SMTP]]></category>

		<guid isPermaLink="false">http://www.php-log.de/?p=343</guid>
		<description><![CDATA[Diese kleine böse Falle hat mich gerade locker eine Stunde gekostet. Plötzlich sendet meine SMTP Klasse keine Mails mehr. Bekomme nur diese Fehlermeldung. Okay, wer lesen kann kommt sicher drauf was passiert ist, aber manchmal liest man einfach nicht sondern befragt die einschlägigen Suchmaschienen. Vergebens! Dabei ist der Fehler so offensichtlich. Ich habe versucht mit [...]]]></description>
			<content:encoded><![CDATA[<p>Diese kleine böse Falle hat mich gerade locker eine Stunde gekostet. Plötzlich sendet meine SMTP Klasse keine Mails mehr. Bekomme nur diese Fehlermeldung. Okay, wer lesen kann kommt sicher drauf was passiert ist, aber manchmal liest man einfach nicht sondern befragt die einschlägigen Suchmaschienen. Vergebens!<span id="more-343"></span></p>
<p>Dabei ist der Fehler so offensichtlich. Ich habe versucht mit einem From Header zu senden der dem SMTP Server nicht bekannt war. Konkret am Bespiel der Email Komponente von CakePHP sieht das so aus:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">smtpOptions</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'port'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">25</span><span style="color: #339933;">,</span> 
    <span style="color: #0000ff;">'timeout'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">30</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'host'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'smtp.deinedomain.de'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'username'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'hokus@deinedomain.de'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'password'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'sachichnich'</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">delivery</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'smtp'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">to</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;sample@address.com&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">subject</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Dein Passwort '</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> env<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'HTTP_HOST'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">template</span> 	<span style="color: #339933;">=</span> <span style="color: #0000ff;">'lost_password'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">sendAs</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'both'</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">// Hier passt die Domain home.com nicht zum SMTP Host...</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">replyTo</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Ich &lt;hans@home.com&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">from</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Ich &lt;hans@home.com&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">send</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// ...deswegen dieser nette Fehler</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">smtpError</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;"># 450 : Sender address rejected: Domain not found
</span>
<span style="color: #666666; font-style: italic;">// So ist's richtig und die Mail wird verschickt</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">replyTo</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Ich &lt;hans@deinedomain.de&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">from</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Ich &lt;hans@deinedomain.de&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">send</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.php-log.de/343/php/smpt-450-sender-address-rejected-domain-not-found/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP &#8211; Eigene Views mit dem Scaffolder erstellen</title>
		<link>http://www.php-log.de/339/php/cakephp-eigene-views-mit-dem-scaffolder-erstellen</link>
		<comments>http://www.php-log.de/339/php/cakephp-eigene-views-mit-dem-scaffolder-erstellen#comments</comments>
		<pubDate>Fri, 29 May 2009 18:25:32 +0000</pubDate>
		<dc:creator>ralle</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Scaffold]]></category>

		<guid isPermaLink="false">http://www.php-log.de/?p=339</guid>
		<description><![CDATA[CakePHP bietet nach Handbuch die Möglichkeit die durch den Scaffolder erstellten Views anzupassen. Leider hat sich der Pfad geändert.Entgegen dem Handbuch das behauptet die eigenen Templates könnten hier abgelegt werden: /app/views/scaffolds/index.ctp /app/views/scaffolds/show.ctp /app/views/scaffolds/edit.ctp /app/views/scaffolds/new.ctp /app/views/scaffolds/add.ctp Ist es tatsächlich so dass die Templates hier abgelegt werden: /app/vendors/shell/templates/views/ Am besten kopiert man sich die Vorlagen aus: /cake/console/libs/templates/views/]]></description>
			<content:encoded><![CDATA[<p>CakePHP bietet nach Handbuch die Möglichkeit die durch den Scaffolder erstellten Views anzupassen. Leider hat sich der Pfad geändert.<span id="more-339"></span>Entgegen dem Handbuch das<a href="http://book.cakephp.org/de/view/107/Customizing-Scaffold-Views" target="_blank"> behauptet</a> die eigenen Templates könnten hier abgelegt werden:</p>
<pre class="plain">/app/views/scaffolds/index.ctp
/app/views/scaffolds/show.ctp
/app/views/scaffolds/edit.ctp
/app/views/scaffolds/new.ctp
/app/views/scaffolds/add.ctp</pre>
<p>Ist es tatsächlich so dass die Templates hier abgelegt werden:</p>
<pre>/app/vendors/shell/templates/views/</pre>
<p>Am besten kopiert man sich die Vorlagen aus:</p>
<pre>/cake/console/libs/templates/views/</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.php-log.de/339/php/cakephp-eigene-views-mit-dem-scaffolder-erstellen/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
