<?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</title>
	<atom:link href="http://www.php-log.de/feed" rel="self" type="application/rss+xml" />
	<link>http://www.php-log.de</link>
	<description>Eine feine Sammlung nützlicher PHP Notizen</description>
	<lastBuildDate>Mon, 20 Sep 2010 00:22:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Vertrag bei eplus kündigen.</title>
		<link>http://www.php-log.de/526/allgemeines/vertrag-bei-eplus-kundigen</link>
		<comments>http://www.php-log.de/526/allgemeines/vertrag-bei-eplus-kundigen#comments</comments>
		<pubDate>Mon, 29 Mar 2010 05:30:08 +0000</pubDate>
		<dc:creator>ralle</dc:creator>
				<category><![CDATA[Allgemeines]]></category>

		<guid isPermaLink="false">http://www.php-log.de/?p=526</guid>
		<description><![CDATA[Wer einen Vertrag mit der&#8230;äh&#8230;Telefongesellschaft eplus kündigen möchte, tut dies in jedem Fall am besten per Einschreiben mit Rückschein.Mehr gibt aus meiner Sicht zu diesem Unternehmen nicht zu sagen.]]></description>
			<content:encoded><![CDATA[<p>Wer einen Vertrag mit der&#8230;äh&#8230;Telefongesellschaft eplus kündigen möchte, tut dies in jedem Fall am besten per Einschreiben mit Rückschein.<span id="more-526"></span>Mehr gibt aus meiner Sicht zu diesem Unternehmen nicht zu sagen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.php-log.de/526/allgemeines/vertrag-bei-eplus-kundigen/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mit jQuery alle Option Tags aus einem select entfernen</title>
		<link>http://www.php-log.de/513/javascript/mit-jquery-alle-option-tags-aus-einem-select-entfernen</link>
		<comments>http://www.php-log.de/513/javascript/mit-jquery-alle-option-tags-aus-einem-select-entfernen#comments</comments>
		<pubDate>Thu, 25 Mar 2010 01:26:47 +0000</pubDate>
		<dc:creator>ralle</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.php-log.de/?p=513</guid>
		<description><![CDATA[Ab und an braucht man so eine Funktion. Hier das passende Code-Schnippsel: // So einfach... $&#40;'#my_select'&#41;.children&#40;&#41;.remove&#40;&#41; ; &#160; // Und wenn man ein leeres Option Tag anhängen will gehts das so $j&#40;'#my_select'&#41;.children&#40;&#41;.remove&#40;&#41;.end&#40;&#41;.append&#40;'&#60;option value=&#34;&#34;&#62;Bereich wählen&#60;/option&#62;'&#41; ; Und wer in Essen Brötchen braucht: Lieferdienst in Essen]]></description>
			<content:encoded><![CDATA[<p>Ab und an braucht man so eine Funktion. Hier das passende Code-Schnippsel:<span id="more-513"></span></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// So einfach...</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#my_select'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Und wenn man ein leeres Option Tag anhängen will gehts das so</span>
$j<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#my_select'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">end</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;option value=&quot;&quot;&gt;Bereich wählen&lt;/option&gt;'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span></pre></div></div>

<div class="common-link">
Und wer in Essen Brötchen braucht: <a target="_blank" href="http://www.broetchenbursche-essen.de">Lieferdienst in Essen</a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.php-log.de/513/javascript/mit-jquery-alle-option-tags-aus-einem-select-entfernen/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>Ein MySQL Datum in ein Javascript Datum konvertieren</title>
		<link>http://www.php-log.de/500/mysql/ein-mysql-datum-in-ein-javascript-datum-konvertieren</link>
		<comments>http://www.php-log.de/500/mysql/ein-mysql-datum-in-ein-javascript-datum-konvertieren#comments</comments>
		<pubDate>Mon, 15 Mar 2010 03:33:17 +0000</pubDate>
		<dc:creator>ralle</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.php-log.de/?p=500</guid>
		<description><![CDATA[Eine Aufgabe die nicht allzu häufig ansteht. Zumindest ich brauche so eine Funktion selten. Deswegen schreibe ich das mal hier nieder. Meine Lösung erweitert die String Funktionen von Javascript, so dass ein im MySQL Format 2010-12-24 vorliegendes Datum direkt umgewandelt werden kann. String.prototype.MySQLDateToJavascriptDate = function&#40;&#41;&#123; var res = this.split&#40;'-'&#41;; return new Date &#40; parseInt&#40;res&#91;0&#93;, 10&#41;, [...]]]></description>
			<content:encoded><![CDATA[<p>Eine Aufgabe die nicht allzu häufig ansteht. Zumindest ich brauche so eine Funktion selten. Deswegen schreibe ich das mal hier nieder.</p>
<p><span id="more-500"></span>Meine Lösung erweitert die String Funktionen von Javascript, so dass ein im MySQL Format 2010-12-24 vorliegendes Datum direkt umgewandelt werden kann.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">String.<span style="color: #660066;">prototype</span>.<span style="color: #660066;">MySQLDateToJavascriptDate</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> res <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'-'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">new</span> Date <span style="color: #009900;">&#40;</span> parseInt<span style="color: #009900;">&#40;</span>res<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> parseInt<span style="color: #009900;">&#40;</span>res<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> parseInt<span style="color: #009900;">&#40;</span>res<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Usage</span>
<span style="color: #003366; font-weight: bold;">var</span> my_date <span style="color: #339933;">=</span> <span style="color: #3366CC;">'2010-12-24'</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> js_date <span style="color: #339933;">=</span> my_date.<span style="color: #660066;">MySQLDateToJavascriptDate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>js_date.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Fri Dec 24 2010 00:00:00 GMT+0100 (CET)</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.php-log.de/500/mysql/ein-mysql-datum-in-ein-javascript-datum-konvertieren/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>1</slash:comments>
		</item>
		<item>
		<title>FFMPEG</title>
		<link>http://www.php-log.de/491/php/ffmpeg</link>
		<comments>http://www.php-log.de/491/php/ffmpeg#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:34:06 +0000</pubDate>
		<dc:creator>ralle</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.php-log.de/?p=491</guid>
		<description><![CDATA[Hier mal, weil ich es immer wieder vergesse ein paar ffmpeg Kommandozeilen. # Einen Film mit gleichbleibender Qualität konvertieren ffmpeg -i quelle.avi -sameq ziel.avi]]></description>
			<content:encoded><![CDATA[<p>Hier mal, weil ich es immer wieder vergesse ein paar ffmpeg Kommandozeilen.<span id="more-491"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Einen Film mit gleichbleibender Qualität konvertieren</span>
<span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #660033;">-i</span>  quelle.avi  <span style="color: #660033;">-sameq</span> ziel.avi</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.php-log.de/491/php/ffmpeg/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Rockt</title>
		<link>http://www.php-log.de/489/php/jquery-rockt</link>
		<comments>http://www.php-log.de/489/php/jquery-rockt#comments</comments>
		<pubDate>Sun, 20 Dec 2009 22:30:11 +0000</pubDate>
		<dc:creator>ralle</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.php-log.de/?p=489</guid>
		<description><![CDATA[Punkt!]]></description>
			<content:encoded><![CDATA[<p>Punkt!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.php-log.de/489/php/jquery-rockt/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shellscript das via Cron ein PHP Script ausführt bei Domainfactory einrichten</title>
		<link>http://www.php-log.de/481/php/shellscript-das-via-cron-ein-php-script-ausfuhrt-bei-domainfactory-einrichten</link>
		<comments>http://www.php-log.de/481/php/shellscript-das-via-cron-ein-php-script-ausfuhrt-bei-domainfactory-einrichten#comments</comments>
		<pubDate>Wed, 04 Nov 2009 10:09:28 +0000</pubDate>
		<dc:creator>ralle</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.php-log.de/?p=481</guid>
		<description><![CDATA[Ich habe ein Shellscript, das wiederum ein PHP Script aufruft und das ganze passiert über einen Cronjob bei Domainfactory. Verwirrt? Worauf ich hinauswill&#8230; Es kann passieren das unter diesen Umständen das PHP Script nicht ausgeführt wird. Der Support bei dF ist schnell mit einer Lösung zur Hand, aber wenn ich&#8217;s mir in mein kleines Notizbuch [...]]]></description>
			<content:encoded><![CDATA[<p>Ich habe ein Shellscript, das wiederum ein PHP Script aufruft und das ganze passiert über einen Cronjob bei Domainfactory. Verwirrt? <img src='http://www.php-log.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  Worauf ich hinauswill&#8230;</p>
<p><span id="more-481"></span>Es kann passieren das unter diesen Umständen das PHP Script nicht ausgeführt wird. Der Support bei dF ist schnell mit einer Lösung zur Hand, aber wenn ich&#8217;s mir in mein kleines Notizbuch hier schreibe bin ich schneller <img src='http://www.php-log.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Ich also die Lösung vom dF Support:</p>
<blockquote><p>Da Sie in diesem Cronjob eine PHP-Datei über ein Shellscript ausführen,<br />
empfehlen wir Ihnen den Befehl wie folgt anzupassen:</p>
<p>env -i /usr/local/bin/php5 -f /der/pfad/zum/script.php</p>
<p>Über &#8220;env -i&#8221; werden die Umgebungsvariablen geleert und mittels &#8220;-f&#8221;<br />
wird die Ausführung des PHP-Scriptes erzwungen. Andernfalls besteht die<br />
Möglichkeit, dass das Script nur ausgegeben wird.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.php-log.de/481/php/shellscript-das-via-cron-ein-php-script-ausfuhrt-bei-domainfactory-einrichten/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Settings für das jQuery Plugin NotesForLightBox</title>
		<link>http://www.php-log.de/476/javascript/settings-fur-das-jquery-plugin-notesforlightbox</link>
		<comments>http://www.php-log.de/476/javascript/settings-fur-das-jquery-plugin-notesforlightbox#comments</comments>
		<pubDate>Thu, 29 Oct 2009 20:47:37 +0000</pubDate>
		<dc:creator>ralle</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.php-log.de/?p=476</guid>
		<description><![CDATA[Dieses Lightbox Plugin zählt eindeutig zu den schöneren Vertretern seiner Art. leider gibt zwei drei Stopper in der Doku, deswegen hier meine Settings zu konservatorischen Zwecken: $j&#40;function&#40;&#41; &#123; var settings = &#123; containerResizeSpeed: 350, imageLoading: '/img/nf.lightbox/loading.gif', imageBtnPrev: '/img/nf.lightbox/prev.png', imageBtnNext: '/img/nf.lightbox/next.png', imageBtnClose: '/img/nf.lightbox/close.png', imageBlank: '/img/nf.lightbox/blank.gif', imageBtnBottomPrev: '/img/nf.lightbox/btm_prev.gif', imageBtnBottomNext: '/img/nf.lightbox/btm_next.gif', imageBtnPlay: '/img/nf.lightbox/start.png', txtImage: 'Bild', txtOf: 'von', txtPrev: [...]]]></description>
			<content:encoded><![CDATA[<p>Dieses Lightbox Plugin zählt eindeutig zu den schöneren Vertretern seiner Art. leider gibt zwei drei Stopper in der Doku, deswegen hier meine Settings zu konservatorischen Zwecken:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">     $j<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
		 <span style="color: #003366; font-weight: bold;">var</span> settings <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span> 
			containerResizeSpeed<span style="color: #339933;">:</span> <span style="color: #CC0000;">350</span><span style="color: #339933;">,</span> 
			imageLoading<span style="color: #339933;">:</span> <span style="color: #3366CC;">'/img/nf.lightbox/loading.gif'</span><span style="color: #339933;">,</span>
			imageBtnPrev<span style="color: #339933;">:</span> <span style="color: #3366CC;">'/img/nf.lightbox/prev.png'</span><span style="color: #339933;">,</span>
			imageBtnNext<span style="color: #339933;">:</span> <span style="color: #3366CC;">'/img/nf.lightbox/next.png'</span><span style="color: #339933;">,</span>
			imageBtnClose<span style="color: #339933;">:</span> <span style="color: #3366CC;">'/img/nf.lightbox/close.png'</span><span style="color: #339933;">,</span>
			imageBlank<span style="color: #339933;">:</span> <span style="color: #3366CC;">'/img/nf.lightbox/blank.gif'</span><span style="color: #339933;">,</span>
			imageBtnBottomPrev<span style="color: #339933;">:</span> <span style="color: #3366CC;">'/img/nf.lightbox/btm_prev.gif'</span><span style="color: #339933;">,</span>
			imageBtnBottomNext<span style="color: #339933;">:</span> <span style="color: #3366CC;">'/img/nf.lightbox/btm_next.gif'</span><span style="color: #339933;">,</span>
			imageBtnPlay<span style="color: #339933;">:</span> <span style="color: #3366CC;">'/img/nf.lightbox/start.png'</span><span style="color: #339933;">,</span>
			txtImage<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Bild'</span><span style="color: #339933;">,</span>
			txtOf<span style="color: #339933;">:</span> <span style="color: #3366CC;">'von'</span><span style="color: #339933;">,</span>
			txtPrev<span style="color: #339933;">:</span> <span style="color: #3366CC;">'&amp;nbsp;zurück'</span><span style="color: #339933;">,</span>
			txtNext<span style="color: #339933;">:</span> <span style="color: #3366CC;">'&amp;nbsp;weiter'</span><span style="color: #339933;">,</span>
			keyToClose<span style="color: #339933;">:</span> <span style="color: #3366CC;">'s'</span><span style="color: #339933;">,</span>
			keyToPrev<span style="color: #339933;">:</span> <span style="color: #3366CC;">'z'</span><span style="color: #339933;">,</span>
			keyToNext<span style="color: #339933;">:</span> <span style="color: #3366CC;">'w'</span><span style="color: #339933;">,</span>
			slideShowTimer<span style="color: #339933;">:</span> <span style="color: #CC0000;">5000</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
         $j<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a.lightbox'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">lightBox</span><span style="color: #009900;">&#40;</span>settings<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Select all links with lightbox class   </span>
     <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>Achtung:</strong> Nicht vergessen im aufrufenden Link einen Title als Bildname anzugeben, sonst funktioniert die untere Navigation mit txtPrev, txtNext nicht. Die Pfade für die Bilder sind meinen Zwecken entsprechend angepasst und jQuery wird mit $j angesprochen anstatt mit nur $</p>
]]></content:encoded>
			<wfw:commentRss>http://www.php-log.de/476/javascript/settings-fur-das-jquery-plugin-notesforlightbox/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>
	</channel>
</rss>

