<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Php on BAFM</title><link>https://christian.blog.pakiheim.de/tags/php/</link><description>Recent content in Php on BAFM</description><generator>Hugo -- 0.160.1</generator><language>en</language><lastBuildDate>Fri, 08 Aug 2014 08:51:30 +0000</lastBuildDate><atom:link href="https://christian.blog.pakiheim.de/tags/php/index.xml" rel="self" type="application/rss+xml"/><item><title>Weird lighttpd troubles</title><link>https://christian.blog.pakiheim.de/posts/2014-08-08_weird-lighttpd-troubles/</link><pubDate>Fri, 08 Aug 2014 08:51:30 +0000</pubDate><guid isPermaLink="false">http://blog.barfoo.org/?p=2296</guid><description>&lt;p&gt;Well, since about a week or so I keep having troubles with my vHost and lighttpd. The point being, after some time (up till now it&amp;rsquo;s been something between days and minutes) lighttpd completely freezes and doesn&amp;rsquo;t serve no content anymore. I don&amp;rsquo;t know if this is related to PHP (might be, I did perform an update to &lt;em&gt;dev-lang/php-5.2.9-r2&lt;/em&gt; on &lt;em&gt;Thu May 28 12:18:57 2009&lt;/em&gt;), but I have to figure this out since the restart cron-job is getting annoying.&lt;/p&gt;</description></item><item><title>Lighttpd troubles resolved</title><link>https://christian.blog.pakiheim.de/posts/2014-08-08_lighttpd-troubles-resolved/</link><pubDate>Fri, 08 Aug 2014 08:50:47 +0000</pubDate><guid isPermaLink="false">http://blog.barfoo.org/?p=2311</guid><description>&lt;p&gt;Well, after last weeks lighttpd troubles with PHP (or was it without ?), they finally seem resolved. First thing I did, was upgrade to the new php-version (5.2.10). After that, I ran revdep-rebuild, which apparently found issues with lighttpd being linked to a wrong pcre-version. After remerging lighttpd the &lt;a href="https://christian.blog.pakiheim.de/posts/2014-08-08_weird-lighttpd-troubles" title="Weird lighttpd troubles"&gt;issues&lt;/a&gt; seem to be gone!&lt;/p&gt;
&lt;p&gt;Well, guess I was to quick in saying the problem was resolved .. it&amp;rsquo;s still there, just not happening as fast as it would in the past &amp;hellip;.&lt;/p&gt;</description></item><item><title>Lighttpd issues</title><link>https://christian.blog.pakiheim.de/posts/2014-08-08_lighttpd-issues/</link><pubDate>Fri, 08 Aug 2014 08:47:28 +0000</pubDate><guid isPermaLink="false">http://blog.barfoo.org/?p=2326</guid><description>&lt;p&gt;At first, it seemed that &lt;a href="https://christian.blog.pakiheim.de/posts/2014-08-08_lighttpd-troubles-resolved" title="Lighttpd troubles resolved"&gt;my lighttpd issues were resolved&lt;/a&gt; by updating PHP/remerging lighttpd. But apparently not. After putting in a crontab entry, that restarts lighttpd every 15 minutes (which completely sucks), the issue was minimized in it&amp;rsquo;s impact but not really solved.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt" id="hl-0-1"&gt;&lt;a class="lnlinks" href="#hl-0-1"&gt;1&lt;/a&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;*/15 * * * * root /etc/init.d/lighttpd restart &amp;amp;&amp;gt;/dev/null
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Thanks to Michél (I guess, again) &amp;ndash; who helped me looking at the strace logs, and of course Christian (aka hoffie &amp;ndash; one of my old Gentoo buddies), the issue seems finally resolved. It turns out it was neither a PHP nor lighttpd issue. It was a simple matter of (stale) symlinks in /etc/ssl/certs if you can imagine that. Apparently a stale symlink forced PHP into a loop or something, from which it couldn&amp;rsquo;t recover on it&amp;rsquo;s own.&lt;/p&gt;</description></item><item><title>My neverending lighttpd troubles</title><link>https://christian.blog.pakiheim.de/posts/2009-07-16_my-neverending-lighttpd-troubles/</link><pubDate>Thu, 16 Jul 2009 10:31:13 +0000</pubDate><guid isPermaLink="false">http://blog.barfoo.org/?p=2364</guid><description>&lt;p&gt;Well, after a day or so my lighttpd &lt;a href="https://christian.blog.pakiheim.de/posts/2014-08-08_lighttpd-issues" title="Lighttpd issues"&gt;troubles&lt;/a&gt; reappeared. But this time, the lighttpd process would simply put out this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt" id="hl-0-1"&gt;&lt;a class="lnlinks" href="#hl-0-1"&gt;1&lt;/a&gt;
&lt;/span&gt;&lt;span class="lnt" id="hl-0-2"&gt;&lt;a class="lnlinks" href="#hl-0-2"&gt;2&lt;/a&gt;
&lt;/span&gt;&lt;span class="lnt" id="hl-0-3"&gt;&lt;a class="lnlinks" href="#hl-0-3"&gt;3&lt;/a&gt;
&lt;/span&gt;&lt;span class="lnt" id="hl-0-4"&gt;&lt;a class="lnlinks" href="#hl-0-4"&gt;4&lt;/a&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;mod_fastcgi&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2913&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;backend&lt;/span&gt; &lt;span class="n"&gt;is&lt;/span&gt; &lt;span class="n"&gt;overloaded&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;we&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;ll disable it for 2 seconds and send the request to another backend instead: reconnects: 0 load: 131&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;mod_fastcgi&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2668&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;fcgi&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;enabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;lighttpd&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;lighttpd&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;fastcgi&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;php&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;17242.&lt;/span&gt;&lt;span class="n"&gt;socket&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;mod_fastcgi&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2913&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;backend&lt;/span&gt; &lt;span class="n"&gt;is&lt;/span&gt; &lt;span class="n"&gt;overloaded&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;we&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;ll disable it for 2 seconds and send the request to another backend instead: reconnects: 0 load: 131&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;mod_fastcgi&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2668&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;fcgi&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;enabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;lighttpd&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;lighttpd&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;fastcgi&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;php&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;17242.&lt;/span&gt;&lt;span class="n"&gt;socket&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;And as the message says, PHP (or rather mod_fastcgi?) would simply stop to process requests. In the end, I tuned some of the lighttpd/mod_fastcgi parameters.&lt;/p&gt;</description></item><item><title>Zend Optimizer again</title><link>https://christian.blog.pakiheim.de/posts/2008-02-19_zend-optimizer-again/</link><pubDate>Tue, 19 Feb 2008 19:15:54 +0000</pubDate><guid isPermaLink="false">http://blog.barfoo.org/?p=225</guid><description>&lt;p&gt;Well, I happen to be back at my favorite application. Today I stumbled upon a &amp;quot; &lt;em&gt;nice&lt;/em&gt;&amp;quot; thing. If you turn on the Zend Optimizer (doesn&amp;rsquo;t matter whether it is 2.6.2 or 3.3.0), one of the TYPO3 back ends ain&amp;rsquo;t showing &lt;em&gt;&lt;strong&gt;any&lt;/strong&gt;&lt;/em&gt; content in the preview pane. Once you turn the Zend Optimizer stuff off, it works without a problem.&lt;/p&gt;
&lt;figure&gt;
&lt;img loading="lazy" src="https://christian.blog.pakiheim.de/uploads/2008/08/o_rly001.jpg"
alt="O RLY ?" width="438"/&gt; &lt;figcaption&gt;
&lt;p&gt;O RLY ?&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;And as Zend stated on their &amp;quot; &lt;em&gt;Support Forum&lt;/em&gt;&amp;quot;, they don&amp;rsquo;t really support the Zend Optimizer stuff in the first place. Which is nice, what for do you need the Zend Guard shit in the first place ??&lt;/p&gt;</description></item><item><title>TYPO3 and MySQL replication</title><link>https://christian.blog.pakiheim.de/posts/2007-09-08_typo3-and-mysql-replication/</link><pubDate>Sat, 08 Sep 2007 20:33:13 +0000</pubDate><guid isPermaLink="false">http://blog.barfoo.org/2007/09/08/typo3-and-mysql-replication/</guid><description>&lt;p&gt;Apparently the TYPO3 version we are using, doesn&amp;rsquo;t play too nice with the MySQL MasterMaster replication.&lt;/p&gt;
&lt;p&gt;Sometimes, something like this is going to happen:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt" id="hl-0-1"&gt;&lt;a class="lnlinks" href="#hl-0-1"&gt;1&lt;/a&gt;
&lt;/span&gt;&lt;span class="lnt" id="hl-0-2"&gt;&lt;a class="lnlinks" href="#hl-0-2"&gt;2&lt;/a&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;070826 0:44:32 [ERROR] Slave: Error &amp;#39;Duplicate entry &amp;#39;75-222419149&amp;#39; for key 1&amp;#39; on query. Default database: &amp;#39;t3nb&amp;#39;. Query: &amp;#39;INSERT INTO cache_pagesection
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;070826 0:44:32 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with &amp;#34;SLAVE START&amp;#34;. We stopped at log &amp;#39;dbc-mysql1.000192&amp;#39; position 611861372
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Well, as you can see from the last line in the log, the Slave-SQL thread found a duplicate entry and thought it is smart to just turn off the thread instead of disregarding the just made entry. So from now on, both databases drift since there ain&amp;rsquo;t no replication anymore until someone kick starts the replication again (someone being me).&lt;/p&gt;</description></item><item><title>SLES, ZendOptimizer and IBM PowerPC(4)+</title><link>https://christian.blog.pakiheim.de/posts/2007-07-11_sles-zendoptimizer-and-ibm-powerpc-4/</link><pubDate>Wed, 11 Jul 2007 08:40:57 +0000</pubDate><guid isPermaLink="false">http://blog.barfoo.org/2007/07/10/sles-zendoptimizer-and-ibm-powerpc4/</guid><description>&lt;p&gt;What would you figure from the above ? Hopefully the rather obvious, that it&amp;rsquo;s a &lt;em&gt;&lt;strong&gt;really&lt;/strong&gt;&lt;/em&gt; shitty combination.&lt;/p&gt;
&lt;p&gt;So we figured it would be a nice thing to test our new setup before going into pre-production testing or production, but we don&amp;rsquo;t have an extra spare box. So we took one of the power4 boxes we have mounted in the rack basically consuming energy all day (that&amp;rsquo;s about 38kWh a day) and installed &lt;em&gt;SLES10&lt;/em&gt; onto it. Which wasn&amp;rsquo;t all that bad (at first the box repeatedly started back to AIX, from CD and after convincing the SMS - that&amp;rsquo;s basically the bios on the power*-boxes also known as System Management Services with a hammer to boot from the first hard disk).&lt;/p&gt;</description></item></channel></rss>