<?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>ain't no soul - 1001 untold stories &#187; code</title>
	<atom:link href="http://blog.aint-no-soul.com/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.aint-no-soul.com</link>
	<description>everything is wrong, everything is allowed</description>
	<lastBuildDate>Fri, 11 Jun 2010 09:46:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Workaround for Zend_Dojo_Form when you render elements individually and dijit.byId() returns &#8216;undefined&#8217;</title>
		<link>http://blog.aint-no-soul.com/code/2010-06-11/workaround-for-zend_dojo_form-when-you-render-elements-individually-and-dijit-byid-returns-undefined/</link>
		<comments>http://blog.aint-no-soul.com/code/2010-06-11/workaround-for-zend_dojo_form-when-you-render-elements-individually-and-dijit-byid-returns-undefined/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 09:46:08 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[dijit]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://blog.aint-no-soul.com/?p=321</guid>
		<description><![CDATA[Problem: When you render the form as a whole (i.e: &#60;?php echo $this->form ?&#62;), everything works fine, but when you render each element separate, the zendDijit {"id":"yourFormId","params":{"dojoType":"dijit.form.Form"}} is missing. This causes to break the validation/xhr process, because dijit.byId() returns only an &#8216;undefined&#8217; value. 
Solution: Go to your View, where you render your form and add [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> When you render the form as a whole (<code>i.e: &lt;?php echo $this->form ?&gt;</code>), everything works fine, but when you render each element separate, the zendDijit <code>{"id":"yourFormId","params":{"dojoType":"dijit.form.Form"}}</code> is missing. This causes to break the validation/xhr process, because <code>dijit.byId()</code> returns only an &#8216;undefined&#8217; value. </p>
<p><strong>Solution:</strong> Go to your View, where you render your form and add the following:</p>
<pre name="code" class="php:nocontrols:nogutter">
$form = $this->form;
$this->dojo()->setDijit($form->getId(), array('dojoType' => 'dijit.form.Form')); 

// add form tag ...
// add elements ...
</pre>
<p>It took me nearly 3 hours to figure this out <img src='http://blog.aint-no-soul.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Hope this helps someone. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/code/2010-06-11/workaround-for-zend_dojo_form-when-you-render-elements-individually-and-dijit-byid-returns-undefined/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The one and only correct way to use sprites.</title>
		<link>http://blog.aint-no-soul.com/css/2009-08-11/the-one-and-only-correct-way-to-use-sprites-in-css/</link>
		<comments>http://blog.aint-no-soul.com/css/2009-08-11/the-one-and-only-correct-way-to-use-sprites-in-css/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 19:11:26 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://blog.aint-no-soul.com/?p=317</guid>
		<description><![CDATA[In this post I&#8217;ll show you the one and only correct way to use sprites and the very little benefit if you use sprites the wrong way. 
It&#8217;s in everyones mouth but a lot of people do not understand fully what sprites are supposed to optimize. Well we want so badly to reduce the HTTP [...]]]></description>
			<content:encoded><![CDATA[<p>In this post I&#8217;ll show you the one and only correct way to use sprites and the very little benefit if you use sprites the wrong way. </p>
<p>It&#8217;s in everyones mouth but a lot of people do not understand fully what sprites are supposed to optimize. Well we want so badly to reduce the HTTP requests but as I&#8217;ll show you, a lot of people do not understand how to write efficient selectors for sprites. </p>
<p>Here&#8217;s a meaningfull chart I&#8217;m going to explain a few pixel down.<br />
<img src="http://blog.aint-no-soul.com/examples/css-sprites/images/stats.png" alt="css sprites the wrong and correct way" /></p>
<p>The <a href="http://blog.aint-no-soul.com/examples/css-sprites/wrong-nosprites.html">first</a> &#8220;wrong way&#8221; uses multiple images and no sprites and show you what you might except. For each image a request gets done. 22ms were used.</p>
<p>The <a href="http://blog.aint-no-soul.com/examples/css-sprites/wrong-sprites.html">second</a> wrong way shows you something, a lot of people wouldn&#8217;t have guessed. For each CSS selector a request is made! The reason is, that the Browser does not know that the image has been already requested and requests it again. The browser then, when it does it&#8217;s pre-processing understands, that tghe ressource has been already requested and grabs it ideally from the browser-cache. However that&#8217;s just 4ms faster than without sprites.</p>
<pre class="css:nocontrols:nogutter" name="code">
.icon-mail 			{ background: transparent url(images/sprite.png) 0 0 no-repeat }
.icon-mail-add 		{ background: transparent url(images/sprite.png) 0 -40px no-repeat }
.icon-mail-attach 		{ background: transparent url(images/sprite.png) 0 -80px no-repeat }
.icon-mail-delete 		{ background: transparent url(images/sprite.png) 0 -120px no-repeat }
.icon-mail-edit 		{ background: transparent url(images/sprite.png) 0 -160px no-repeat }
.icon-mail-error 		{ background: transparent url(images/sprite.png) 0 -200px no-repeat }
.icon-mail-go 			{ background: transparent url(images/sprite.png) 0 -240px no-repeat }
.icon-mail-link 		{ background: transparent url(images/sprite.png) 0 -280px no-repeat }
.icon-nail-open 		{ background: transparent url(images/sprite.png) 0 -320px no-repeat }
.icon-mail-open-image 	{ background: transparent url(images/sprite.png) 0 -360px no-repeat }
</pre>
<p><a href="http://blog.aint-no-soul.com/examples/css-sprites/right-sprites.html">The third and correct way</a> uses one selector containing the sprite and a few others to change only the position of the sprite. As you can see in my fancy chart, the benefit is: 4ms for the whole test document.  Thats 5.5 times faster than the first example and unbelievable 4 times faster than the second example, which uses the very same sprite!</p>
<pre class="css:nocontrols:nogutter" name="code">
.icons { background-image: url(images/sprite.png); background-repeat: none }
.icon-mail 			{ background-position: 0 0 }
.icon-mail-add 		{ background-position: 0 -40px }
.icon-mail-attach 		{ background-position: 0 -80px }
.icon-mail-delete 		{ background-position: 0 -120px }
.icon-mail-edit 		{ background-position: 0 -160px }
.icon-mail-error 		{ background-position: 0 -200px }
.icon-mail-go 			{ background-position: 0 -240px }
.icon-mail-link 		{ background-position: 0 -280px }
.icon-nail-open 		{ background-position: 0 -320px }
.icon-mail-open-image 	{ background-position: 0 -360px }
</pre>
<p>ps: You need something like firebug or httpwatch to check it for yourself. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/css/2009-08-11/the-one-and-only-correct-way-to-use-sprites-in-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Permission denied in Unknown on line 0</title>
		<link>http://blog.aint-no-soul.com/code/2009-05-13/permission-denied-in-unknown-on-line-0/</link>
		<comments>http://blog.aint-no-soul.com/code/2009-05-13/permission-denied-in-unknown-on-line-0/#comments</comments>
		<pubDate>Wed, 13 May 2009 19:53:48 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[digital life]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://blog.aint-no-soul.com/?p=300</guid>
		<description><![CDATA[if you install apache/php and get the following error:
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
Then consider to check the permissions. 
What user/group has the apache?
ps -ef &#124; grep apache
Who owns the files in your htdocs?
&#8230;
Because it is most likely that you need to chown your htdocs, and or add [...]]]></description>
			<content:encoded><![CDATA[<p>if you install apache/php and get the following error:<br />
<code>Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0</code><br />
Then consider to check the permissions. </p>
<p>What user/group has the apache?<br />
<code>ps -ef | grep apache</code></p>
<p>Who owns the files in your htdocs?</p>
<p>&#8230;</p>
<p>Because it is most likely that you need to chown your htdocs, and or add a user to the correct group.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/code/2009-05-13/permission-denied-in-unknown-on-line-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>work around for zend validate&#8217;s markAsError respectively addError</title>
		<link>http://blog.aint-no-soul.com/code/2009-02-05/work-around-for-zend-validates-markaserror-respectively-adderror/</link>
		<comments>http://blog.aint-no-soul.com/code/2009-02-05/work-around-for-zend-validates-markaserror-respectively-adderror/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 10:20:02 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[workaround]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://blog.aint-no-soul.com/?p=249</guid>
		<description><![CDATA[Yesterday I ran into a problem with zend form and zend validate which was quite confusing. I wanted to check if a multiCheckbox has less or equal 2 selections. I really thought there would be some &#8220;shipped&#8221; validator but there isn&#8217;t. Then I&#8217;ve tried to write my own validator for that purpose, but Zend Validate [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I ran into a problem with zend form and zend validate which was quite confusing. I wanted to check if a multiCheckbox has less or equal 2 selections. I really thought there would be some &#8220;<a href="http://framework.zend.com/manual/en/zend.validate.set.html">shipped</a>&#8221; validator but there isn&#8217;t. Then I&#8217;ve tried to write my own validator for that purpose, but Zend Validate didn&#8217;t pass the MultiCheckbox values as an array but as strings and I wasnt in the mood to hack the Zend &#8220;core&#8221; itself. Then I tried to use addError(), markAsError() or set _errorsExists explicit but that didn&#8217;t work either, as described <a href="http://framework.zend.com/issues/browse/ZF-5150">here</a>. Maybe I am blind and there is an much easier way &#8230; but the following works quite fine for me.</p>
<ol>
<li>Create an Validator which always fails.</li>
<li>Check right after the isPost() condition if &#8220;your condition&#8221; matches.</li>
<li>Assign the &#8220;will-always-fail&#8221; validator to your element and you&#8217;re done.</li>
</ol>
<pre name="code" class="php:nocontrols:nogutter">
// save as 'Zend/Validate/CustomError.php
require_once 'Zend/Validate/Abstract.php';

class Zend_Validate_CustomError extends Zend_Validate_Abstract  {

    const SOME_ERROR = 'someError';

	// configure to whatever you like, or override it with setMessage()
    protected $_messageTemplates = array(
        self::SOME_ERROR => "is not valid"
    );

	// sets the element as invalid
    public function isValid($value)
    {
        $valueString = (string) $value;
        $this->_setValue($valueString);
		$this->_error();
        return false;
    }

}
</pre>
<p>And in your form controller add right after the isPost() condition:</p>
<pre name="code" class="php:nocontrols:nogutter">
if(sizeof($_POST['yourelement'])>2) {
	$customError = new Zend_Validate_CustomError();
	$customError->setMessage('You must select less than 2');
	self::getElement('yourelement')->addValidator($customError);
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/code/2009-02-05/work-around-for-zend-validates-markaserror-respectively-adderror/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>flickr.groups.pools.getPhotos and php_serial</title>
		<link>http://blog.aint-no-soul.com/code/2008-12-04/flickrgroupspoolsgetphotos-and/</link>
		<comments>http://blog.aint-no-soul.com/code/2008-12-04/flickrgroupspoolsgetphotos-and/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 20:27:36 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[flickr]]></category>

		<guid isPermaLink="false">http://blog.aint-no-soul.com/?p=214</guid>
		<description><![CDATA[If you try to get a serialized array (php_serial) from the flicker api from a group (flickr.groups.pools.getPhotos), you may find your self a little bit lost, because you do not get the photos you want, only the amount of how many. You double check if everything is set to public, your account is ok and [...]]]></description>
			<content:encoded><![CDATA[<p>If you try to get a serialized array (<a href="http://www.flickr.com/services/api/response.php.html">php_serial</a>) from the flicker api from a group (<a href="http://flickr.com/services/api/flickr.groups.pools.getPhotos.html">flickr.groups.pools.getPhotos</a>), you may find your self a little bit lost, because you do not get the photos you want, only the amount of how many. You double check if everything is set to public, your account is ok and even try to upgrade it &#8211; but that&#8217;s not <em>it</em>. You used the usefull <a href="http://flickr.com/services/api/explore/?method=flickr.groups.pools.getPhotos">API querybuilder</a> from flicker and then it works in that case and you wonder why it doesn&#8217;t in your application. The simple solution is, it doesn&#8217;t work with the php_serial format. Skip this parameter and you get your set as XML response. The only thing you need to do is, use the XMLReader and iterate through the result set. </p>
<p>It took me quite a while to figure this out &#8211; like 1,5 hours &#8211; so eventually this post is usefull for someone <img src='http://blog.aint-no-soul.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/code/2008-12-04/flickrgroupspoolsgetphotos-and/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>simple method to add a safari css</title>
		<link>http://blog.aint-no-soul.com/css/2008-11-05/simple-method-to-add-a-safari-css/</link>
		<comments>http://blog.aint-no-soul.com/css/2008-11-05/simple-method-to-add-a-safari-css/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 17:12:08 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://blog.aint-no-soul.com/?p=201</guid>
		<description><![CDATA[There are some selector hacks out there, but I don&#8217;t like them &#8211; ie: (@media screen and (-webkit-min-device-pixel-ratio:0) {}). My personal favourite is done with Prototype because I use it a lot and it is pretty simple:

&#60;link rel="stylesheet" type="text/css" media="none" href="/css/safari.css" id="safari" /&#62;
&#60;script type="text/javascript"&#62;
	// matches all safari/chrome versions
	if(Prototype.Browser.WebKit) {
		$('safari').media="all";
	}
&#60;/script&#62;

If you set the media attribute to [...]]]></description>
			<content:encoded><![CDATA[<p>There are some selector hacks out there, but I don&#8217;t like them &#8211; ie: (<em style="color: grey">@media screen and (-webkit-min-device-pixel-ratio:0) {}</em>). My personal favourite is done with Prototype because I use it a lot and it is pretty simple:</p>
<pre name="code" class="javascript:nocontrols:nogutter">
&lt;link rel="stylesheet" type="text/css" media="none" href="/css/safari.css" id="safari" /&gt;
&lt;script type="text/javascript"&gt;
	// matches all safari/chrome versions
	if(Prototype.Browser.WebKit) {
		$('safari').media="all";
	}
&lt;/script&gt;
</pre>
<p>If you set the <code>media</code> attribute to <code>none</code> &#8211; no media device will display it. By adding the little if statement, you can check if the Browser is WebKit, which is the engine name of safari or chrome and alter the <code>media</code> value to <code>all</code>. </p>
<p>If you do not use prototype, you can do it like this:</p>
<pre name="code" class="javascript:nocontrols:nogutter">
&lt;script type="text/javascript"&gt;
	// targets safari 3 - not 2!
	if(window.devicePixelRatio) {
		document.getElementById('safari')media="all";
	}

	// targets all safari or better said webKit engines
	if(navigator.userAgent.indexOf('AppleWebKit/') > -1) {
		document.getElementById('safari')media="all";
	}

	// prototype way + targeting old and new webKit with two stylesheets
	if(Prototype.Browser.WebKit) {
		var mySafari = (window.devicePixelRatio) ? 'safari3' : 'safari2';
		document.getElementById(mySafari)media="all";
	}
&lt;/script&gt;
</pre>
<p>Note, this method shouldn&#8217;t be used for &#8220;accessible&#8221; Websites, because it relies on javascript. You can do it then serverside as well by &#8220;sniffing&#8221; the UserAgent from the HTTP Request and add your little switch there &#8211; whereas this isn&#8217;t a 100% safe method though, because some people alter their UserAgent strings and there are tons of vendors/versions thus your detection may fail from time to time.</p>
<p>An alternative to this way is to load the needed script on the fly, so you can reduce a HTTP Request, by writing the link tag dynamically to your document. However &#8211; the describe method above is shorter <img src='http://blog.aint-no-soul.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/css/2008-11-05/simple-method-to-add-a-safari-css/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>new theme</title>
		<link>http://blog.aint-no-soul.com/personal/2008-10-26/new-theme/</link>
		<comments>http://blog.aint-no-soul.com/personal/2008-10-26/new-theme/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 22:03:00 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://blog.aint-no-soul.com/?p=197</guid>
		<description><![CDATA[it was time for a change &#8211; so I&#8217;ve made a new theme for my blog. Nothing special but it looks quite ok (haven&#8217;t tested it in IE, I don&#8217;t care bout it &#8211; but in safari, firefox, chrome and opera it looks good). At least YSlow say it has Grade B and if only [...]]]></description>
			<content:encoded><![CDATA[<p>it was time for a change &#8211; so I&#8217;ve made a new theme for my blog. Nothing special but it looks quite ok (haven&#8217;t tested it in IE, I don&#8217;t care bout it &#8211; but in safari, firefox, chrome and opera it looks good). At least YSlow say it has Grade B and if only the google syntax highlighter plugin would produce valid xhtml, then it would be valid &#8230; <img src='http://blog.aint-no-soul.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/personal/2008-10-26/new-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>new protosafe released</title>
		<link>http://blog.aint-no-soul.com/code/2008-10-24/new-protosafe-released-yay/</link>
		<comments>http://blog.aint-no-soul.com/code/2008-10-24/new-protosafe-released-yay/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 15:04:48 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://blog.aint-no-soul.com/?p=190</guid>
		<description><![CDATA[just in time. One of our clients requested it (minified + packed) last week and today I found an updated version and it seems t work fine: http://code.google.com/p/protosafe/
]]></description>
			<content:encoded><![CDATA[<p>just in time. One of our clients requested it (minified + packed) last week and today I found an updated version and it seems t work fine: <a href="http://code.google.com/p/protosafe/">http://code.google.com/p/protosafe/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/code/2008-10-24/new-protosafe-released-yay/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>how to cut a string with regex (the neat way)</title>
		<link>http://blog.aint-no-soul.com/code/2008-10-09/how-to-cut-a-string-with-regex-the-neat-way/</link>
		<comments>http://blog.aint-no-soul.com/code/2008-10-09/how-to-cut-a-string-with-regex-the-neat-way/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 17:36:21 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://blog.aint-no-soul.com/?p=189</guid>
		<description><![CDATA[It is fairy a common task to cut a string &#8211; ie when a teaser text should not be longer than n characters. A lot of people use substring() or substr(), depending on their favourite language. However with regex it is really easy and you do not need to cut a word:

// in php it [...]]]></description>
			<content:encoded><![CDATA[<p>It is fairy a common task to cut a string &#8211; ie when a teaser text should not be longer than <em>n</em> characters. A lot of people use substring() or substr(), depending on their favourite language. However with regex it is really easy and you do not need to cut a word:</p>
<pre name="code" class="java:nocontrols:nogutter">
// in php it would be:
preg_match("/(.{1,15}(\s))/", $yourString, $matches);

// or in java something like this - maybe ; )
Pattern myPattern = Pattern.compile((.{1,15}(\\s)));
Matcher myMatch = myPattern.matcher(yourString);</pre>
<p>To put it in plain english:<br />
* get the first 15 characters (same as substring)<br />
* BUT &#8211; and here goes the magic: match less until you find a whitespace character and cut the rest. </p>
<p>So it could look like this in php:</p>
<pre name="code" class="php:nocontrols:nogutter">&lt;?php
// you could check the length of the string but actually you don't need to ...
$myString = "People seem to enjoy things more when they know a lot of other people have been left out of the pleasure.";

preg_match("/(.{1,15}(\s))/", $yourString, $matches);
echo $matches[0]." ...";

// would print:
// People seem to ...
// and with {1,27}
// People seem to enjoy things ...
?&gt;</pre>
<p>beer o&#8217;clock! cheers <img src='http://blog.aint-no-soul.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/code/2008-10-09/how-to-cut-a-string-with-regex-the-neat-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL EXPLAIN aka DESCRIBE for UPDATE/DELETE</title>
		<link>http://blog.aint-no-soul.com/code/2008-09-21/mysql-explain-aka-describe-for-update_delete/</link>
		<comments>http://blog.aint-no-soul.com/code/2008-09-21/mysql-explain-aka-describe-for-update_delete/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 16:06:30 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.aint-no-soul.com/?p=187</guid>
		<description><![CDATA[Ever tryed to &#8220;explain&#8221; a delete or an update statement? It will fail. It took me nearly an hour to figure this out. Actually I&#8217;ve never needed to explain a simple DELETE statement, but in todays case I did and was wondering why my query always failed. It is too bad that there is no [...]]]></description>
			<content:encoded><![CDATA[<p>Ever tryed to &#8220;explain&#8221; a delete or an update statement? <a href="http://bugs.mysql.com/bug.php?id=14745">It will fail</a>. It took me nearly an hour to figure this out. Actually I&#8217;ve never needed to explain a simple DELETE statement, but in todays case I did and was wondering why my query always failed. It is too bad that there is no such &#8220;feature&#8221;. With InnoDB you can use of course the ON DELETE/UPDATE stuff but in my case I didn&#8217;t want to alter the existing DB. </p>
<p>However, if you need to delete multiple rows over multiple tables, you may do something like this: <img src='http://blog.aint-no-soul.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<pre name="code" class="sql:nocontrols:nogutter">DELETE stats, links, logins
FROM promo_stats AS stats
LEFT JOIN promo_links AS links USING(promo_link_id)
LEFT JOIN promo_logins AS logins USING(promo_login_id)
WHERE stats.promo_item_id=6;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/code/2008-09-21/mysql-explain-aka-describe-for-update_delete/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pass Phrazr</title>
		<link>http://blog.aint-no-soul.com/code/2008-09-09/pass-phrazr/</link>
		<comments>http://blog.aint-no-soul.com/code/2008-09-09/pass-phrazr/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 11:16:10 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[digital life]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[passphrazr]]></category>

		<guid isPermaLink="false">http://blog.aint-no-soul.com/?p=180</guid>
		<description><![CDATA[Passwords are sometimes hard to remember, or at least hard to read, because good passwords are cryptic. That’s a fact and I am still fine with it, because I pay attention to obvious security flaws or risks. However, there are some situations when you do not need cryptic passwords – like “first time passwords”, or [...]]]></description>
			<content:encoded><![CDATA[<p>Passwords are sometimes hard to remember, or at least hard to read, because good passwords are cryptic. That’s a fact and I am still fine with it, because I pay attention to obvious security flaws or risks. However, there are some situations when you do not need cryptic passwords – like “first time passwords”, or “single time passwords”. For this particular case I came up with a nice idea and I’d like to call it pass phrazr (phraser). </p>
<p>Instead of cryptic passwords, use phrases and or simple sentences. If you just enter some phrases as possible pass phrases it doesn’t work very well, but if you use a directory it does.  Plus, you can serve i18ln passwords if you add a locale. </p>
<p>The easiest sentence is SVO structured but “Tim like Dogs” sucks and isn’t fancy at all, so I’m going to use a more stylish composition. Factual phrases with *izm nouns instead of boring objects! RaaaaR. </p>
<p>Here’s a simple MySQL Table:</p>
<pre name="code" class="sql:nocontrols:nogutter">CREATE TABLE passphrazes (
	passphraze_word 	varchar(30) 					NOT NULL,
	passphraze_type 	enum('subject','verb','noun') 	NOT NULL,
	PRIMARY KEY (passphraze_word)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;</pre>
<p>If you still wonder about it &#8211; the magic goes here:</p>
<pre name="code" class="sql:nocontrols:nogutter">SELECT concat(
	(SELECT passphraze_word
		FROM passphrazes
		WHERE passphraze_type = 'subject'
		ORDER BY RAND()
		LIMIT 1),
	'-',
	(SELECT passphraze_word
		FROM passphrazes
		WHERE passphraze_type = 'verb'
		ORDER BY RAND()
		LIMIT 1),
	'-',
	(SELECT passphraze_word
		FROM passphrazes
		WHERE passphraze_type = 'noun'
		ORDER BY RAND()
		LIMIT 1)
);</pre>
<p>No clue jet? Well, by selecting random rows you can generate funny phrases like:</p>
<p><em>He allocated nahualism.<br />
She reinforced mithridatism.<br />
They served social-evolutionism.</em></p>
<p>Then style it and additionally pimp it more secure (replace spaces with dashes, plus signs, or even camelize it) in your favourite coding language:</p>
<p><em>He-allocated-nahualism.<br />
SheReinforcedMithridatism.<br />
They+Served+social-evolutionism.</em></p>
<p>The use case is hopefully obvious. If someone sign up at your site and you generate the first time password for the user, why not something meaningful? There are tons of possibilities to combine words unique. </p>
<p>*updated*</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/code/2008-09-09/pass-phrazr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>areal-records.com finally online</title>
		<link>http://blog.aint-no-soul.com/personal/2008-07-08/areal-records-com-finally-online/</link>
		<comments>http://blog.aint-no-soul.com/personal/2008-07-08/areal-records-com-finally-online/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 22:04:32 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[areal records]]></category>
		<category><![CDATA[done]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://blog.aint-no-soul.com/?p=178</guid>
		<description><![CDATA[It took us quite a while until we were all satisfied but now it&#8217;s done and you can view it over here:
» http://areal-records.com/
The site relies on prototype, some web 2.0 gimmickry, scriptaculous and the pear framework, a wonderful combine script for CSS and JS. Firefox 3 still needs some »pimping« but for all the other [...]]]></description>
			<content:encoded><![CDATA[<p>It took us quite a while until we were all satisfied but now it&#8217;s done and you can view it over here:</p>
<p>» <a href="http://areal-records.com/" target="_blank">http://areal-records.com/</a></p>
<p>The site relies on prototype, some web 2.0 gimmickry, scriptaculous and the pear framework, a wonderful combine script for CSS and JS. Firefox 3 still needs some »pimping« but for all the other browsers it should work fine, as far as I can tell. </p>
<p>It&#8217;s midnight. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/personal/2008-07-08/areal-records-com-finally-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thursday</title>
		<link>http://blog.aint-no-soul.com/personal/2008-07-04/thursday/</link>
		<comments>http://blog.aint-no-soul.com/personal/2008-07-04/thursday/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 23:01:31 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[motd]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[balcony]]></category>
		<category><![CDATA[beer and sausage]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[neighbours]]></category>
		<category><![CDATA[Thursday]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://blog.aint-no-soul.com/?p=176</guid>
		<description><![CDATA[My neighbours just had sex &#8211; uhh, ahhh, uuhhhh &#8211; well for about 4 minutes &#8211; not much longer &#8211; then they were done. So I&#8217;d call it a quickly. I was quite tempted to have a look but I thought that would be indecent and naughty, even though it sounded like a doggy-style  [...]]]></description>
			<content:encoded><![CDATA[<p>My neighbours just had sex &#8211; uhh, ahhh, uuhhhh &#8211; well for about 4 minutes &#8211; not much longer &#8211; then they were done. So I&#8217;d call it a quickly. I was quite tempted to have a look but I thought that would be indecent and naughty, even though it sounded like a doggy-style <img src='http://blog.aint-no-soul.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  However, I&#8217;m no voyeur and it&#8217;s a hot night and every cool cat wanna have a kitten &#8211; or so&#8230;</p>
<p>The only reason I&#8217;ve noticed them is, our balcony doors are next to each other and both are wide open. But for my excuse, I&#8217;m still fixing a database &#8211; or better said, I do a modification. for writershops.com I use the world DB from MySQL plus an extra column for the CIA facts book country code. However, I&#8217;m still thinking about to extend it with postal codes and make it public to everyone. Maybe. Time-management is not one of my primary attributes so far.</p>
<p>Tomorrow we have &#8220;beer and sausage&#8221; at our company, which is quite cool &#8211; I mean the fact that we do such things on company time and money. Each first Friday on every new month one department is organizing this little event. Last time we had Becks, this time we&#8217;ll have Berliner and sausages. </p>
<p>However (I love this word), I&#8217;m currently working on a new JavaScript lib, with a carousel, an interactive navigation and some tab switcher, a lightbox, some fx wrapper and other stuff, based on prototype and scriptaculous. That it nothing phenomenal, but I try to keep it slick as possible and of course flexible. ATM you still can apply any function to the callback functions »beforeStart« and »afterFinish«, via one method call. I&#8217;ll post the code when I&#8217;ve got something like a milestone release, which seems to be end of July. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/personal/2008-07-04/thursday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>urgent update</title>
		<link>http://blog.aint-no-soul.com/code/2008-03-14/urgent-update/</link>
		<comments>http://blog.aint-no-soul.com/code/2008-03-14/urgent-update/#comments</comments>
		<pubDate>Fri, 14 Mar 2008 08:29:47 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[digital life]]></category>

		<guid isPermaLink="false">http://blog.aint-no-soul.com/code/2008-03-14/urgent-update/</guid>
		<description><![CDATA[I had to update WP, because someone managed to exploit a security hole in my blog. I guess it was the draft exploit &#8211; but I am not sure. Also I&#8217;ve decided to use the open_base_dir restrictions, because the guys who tryed to hack my/our server, tryed to install a ftp server and if I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>I had to update WP, because someone managed to exploit a security hole in my blog. I guess it was the draft exploit &#8211; but I am not sure. Also I&#8217;ve decided to use the open_base_dir restrictions, because the guys who tryed to hack my/our server, tryed to install a ftp server and if I&#8217;m right, then the kids call them self &#8220;Caffeine&#8217;s Heaven&#8221;. I did that ways back in the days too &#8211; and luckily I&#8217;ve discovered it in time. Also I&#8217;ve moved to a subdomain and added some rewriting rules for my blog (301).</p>
<p>Anyhow!</p>
<p>I&#8217;ve to hurry, because it is already 9:30am and I&#8217;m still sit here in shorts <img src='http://blog.aint-no-soul.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/code/2008-03-14/urgent-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>email regex</title>
		<link>http://blog.aint-no-soul.com/code/2008-02-23/email-regex/</link>
		<comments>http://blog.aint-no-soul.com/code/2008-02-23/email-regex/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 12:12:44 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[validate]]></category>

		<guid isPermaLink="false">http://aint-no-soul.com/code/2008-02-23/email-regex/</guid>
		<description><![CDATA[if you need a very easy regex, to validate emails &#8211; here&#8217;s some I wrote:

^(([\da-z���\.\_\-\~]+)\@([\da-z���\.\_\-\~]+)+(\.\b[a-z]{2,}))$
]]></description>
			<content:encoded><![CDATA[<p>if you need a very easy regex, to validate emails &#8211; here&#8217;s some I wrote:</p>
<pre name="code" class="javascript">
^(([\da-z���\.\_\-\~]+)\@([\da-z���\.\_\-\~]+)+(\.\b[a-z]{2,}))$</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/code/2008-02-23/email-regex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>caught a disease &#8211; the IE!</title>
		<link>http://blog.aint-no-soul.com/code/2008-02-19/caught-a-disease-the-ie/</link>
		<comments>http://blog.aint-no-soul.com/code/2008-02-19/caught-a-disease-the-ie/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 14:14:54 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[media]]></category>

		<guid isPermaLink="false">http://aint-no-soul.com/media/2008-02-19/caught-a-disease-the-ie/</guid>
		<description><![CDATA[once again I have to do stuff for the IE &#8220;only&#8221; (omfg!) and it&#8217;s a not just a pain in the ass it&#8217;s like a heart attacking nightmare horror movie. The IE&#8217;s debugging capabilities &#8211; uhm wait, what debugging capabilities? &#8211; are simly not existent and if you try to mention the IE developer toolbar, [...]]]></description>
			<content:encoded><![CDATA[<p>once again I have to do stuff for the IE &#8220;only&#8221; (omfg!) and it&#8217;s a not just a pain in the ass it&#8217;s like a heart attacking nightmare horror movie. The IE&#8217;s debugging capabilities &#8211; uhm wait, what debugging capabilities? &#8211; are simly not existent and if you try to mention the IE developer toolbar, I could cry. It&#8217;s like a mediaval attemp to transform coal into gold. Useless! Well, I&#8217;m a Windows user and there are some cool things about the OS itself, but the IE is a piece of shit &#8211; a waste of memory &#8211; a big fucking mistake in the technical evolution of mankind. The IE must die, disappear from the world of browsers. There is no hope. Not anymore. Not just a little.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/code/2008-02-19/caught-a-disease-the-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS 2.1 &#8211; some interesting things about specifications</title>
		<link>http://blog.aint-no-soul.com/css/2007-08-07/css_21_-_some_interesting_things_about_specifications/</link>
		<comments>http://blog.aint-no-soul.com/css/2007-08-07/css_21_-_some_interesting_things_about_specifications/#comments</comments>
		<pubDate>Tue, 07 Aug 2007 09:44:43 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://aint-no-soul.com/code/2007-08-07/css_21_-_some_interesting_things_about_specifications/</guid>
		<description><![CDATA[According to the Specification (4.1.3 Characters and case), identifiers can contain only alphanumerical characters [a-z0-9] and &#8211; big surprise &#8211; ISO 10646 characters U+00A1 and higher, plus the hyphen (-) and underscore (_). 
That&#8217;s totally new to me and I&#8217;ve never ever seen someone who uses special characters like that for identifiers. Actually this is [...]]]></description>
			<content:encoded><![CDATA[<p>According to the Specification (<a href="http://www.w3.org/TR/CSS21/syndata.html#characters" target="_blank">4.1.3 Characters and case</a>), identifiers can contain only alphanumerical characters [a-z0-9] and &#8211; big surprise &#8211; ISO 10646 characters U+00A1 and higher, plus the hyphen (-) and underscore (_). </p>
<p>That&#8217;s totally new to me and I&#8217;ve never ever seen someone who uses special characters like that for identifiers. Actually this is really bullshit, because no Validator supports identifiers like that. For instance: when you are going to use the ampersand character, HTML expects an html-entity and will fail. The Validation will not fail, when you use the copyright sign (�?© = U+00A9) &#8211; but it will fail, when you not write the ampersand as html-entity (&amp;amp;)</p>
<p>Here is an example CSS which will be displayed correctly in most browsers (ff2, ie7, opera9, safari3):</p>
<pre name="code" class="css">
.A\&#038;A {
    background-color: #D1EDEC;
    border: 1px solid #92C0DA
}
.A\26B {
    background-color: #D1EDEC;
    border: 1px solid #92C0DA
}
.A\000026C {
    background-color: #D1EDEC;
    border: 1px solid #92C0DA
}
</pre>
<p>Nevertheless: it will fail the �all mighty� <a href="http://validator.w3.org">validator.w3.org</a> test, when the class names are assigned to elements (because of the ampersand). I perfectly understand why the ampersand fails, but IMHO I think it shouldn&#8217;t be allowed plus [a-z0-9] and hyphens should be enough to describe the class/id.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/css/2007-08-07/css_21_-_some_interesting_things_about_specifications/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>most webdeveloper should better grow weeds than&#8230;</title>
		<link>http://blog.aint-no-soul.com/personal/2007-07-09/most_webdeveloper_should_better_grow_weeds_than/</link>
		<comments>http://blog.aint-no-soul.com/personal/2007-07-09/most_webdeveloper_should_better_grow_weeds_than/#comments</comments>
		<pubDate>Sun, 08 Jul 2007 23:39:26 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[digital life]]></category>
		<category><![CDATA[motd]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://aint-no-soul.com/motd/2007-07-09/most_webdeveloper_should_better_grow_weeds_than/</guid>
		<description><![CDATA[&#8230; writing bad and unforgivable code. 
There are lot of good looking sites out there and a lot of good looking (w)CMS front and backends but most of the so called *cool* CMS sucks. WP ist cool &#8211; I like it &#8211; it&#8217;s a good piece of code but I think the templating is kinda [...]]]></description>
			<content:encoded><![CDATA[<p>&#8230; writing bad and unforgivable code. </p>
<p>There are lot of good looking sites out there and a lot of good looking (w)CMS front and backends but most of the so called *cool* CMS sucks. WP ist cool &#8211; I like it &#8211; it&#8217;s a good piece of code but I think the templating is kinda hard on the nerves sometimes. Well that&#8217;s ok, because you can do quite a lot with it &#8211; but take Joomla and or <abbr title='osCommerce' lang='en'>OSC</abbr> for instance and be prepared for a damn rampage. </p>
<p>I don&#8217;t know &#8230; maybe I should grow botanic things and stop coding instead of them. Why do people code nowadays procedural, when it&#8217;s clear they have to recode (or copy and paste) it more than two times. <abbr title='Object Oriented Programming' lang='en'>OOP</abbr> rules &#8211; at least most of the time. Sometimes I stumble upon classes which contains 80% echo/print commands. Why not using a good templating system like <a href='http://pear.php.net/package/HTML_Template_Flexy'><abbr title='Tokenizer driven Template engine'>Flexy</abbr></a> or maybe Smarty if necessary? </p>
<p>Why is it so hard to use a validator or <abbr title='Read The Fucking Manual' lang='en'>RTFM</abbr>?</p>
<p>Do not misunderstand me &#8211; I am not a coding guru &#8211; I am just a person who likes good and usable things but the sad thing is &#8211; most of the things I am discover are bull****.</p>
<p>Why does so many things sucks anyway?<br />
Like the IE, the media, the fast food throwaway society, the bad smelling people in the streets, Hollywood movies, Sternburger-Beer, ban of smoking in bars, criminalization of graffiti artists, criminalization of soft drugs, less than 25 days of holiday per year, global warming and so on and so forth and etc and pp and yes &#8211; you know what I am saying &#8211; don&#8217;t you?</p>
<p>It&#8217;s Sunday.<br />
It is just a livelong dream.<br />
I am sleeping right now and when I wake up &#8211; I&#8217;ll be surprised how wonderful you all are and everything is <img src='http://blog.aint-no-soul.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/personal/2007-07-09/most_webdeveloper_should_better_grow_weeds_than/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nightmare osCommerce + php5</title>
		<link>http://blog.aint-no-soul.com/code/2007-06-25/nightmare_oscommerce_and_php5/</link>
		<comments>http://blog.aint-no-soul.com/code/2007-06-25/nightmare_oscommerce_and_php5/#comments</comments>
		<pubDate>Mon, 25 Jun 2007 12:52:50 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[digital life]]></category>
		<category><![CDATA[motd]]></category>

		<guid isPermaLink="false">http://aint-no-soul.com/motd/2007-06-25/nightmare_oscommerce_and_php5/</guid>
		<description><![CDATA[Why:
* do people code in medieval style?
* do people ignore the signs of the time? 
I guess I need to find a quick and easy solution to make osCommerce work on php5. *phew*
&#8211; 10 minutes later &#8211;
here&#8217;s some quick stuff which seems to work for the installation: 

cd includes
vi php5_enabled.php

$HTTP_GET_VARS 	= isset($_GET) 	? $_GET 	: [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Why:</strong><br />
* do people code in medieval style?<br />
* do people ignore the signs of the time? </p>
<p>I guess I need to find a quick and easy solution to make osCommerce work on php5. *phew*</p>
<p>&#8211; 10 minutes later &#8211;</p>
<p>here&#8217;s some quick stuff which seems to work for the installation: </p>
<pre name="code" class="c">
cd includes
vi php5_enabled.php</pre>
<pre name="code" class="php">
$HTTP_GET_VARS 	= isset($_GET) 	? $_GET 	: null;
$HTTP_POST_VARS = isset($_POST) ? $_POST 	: null;
$HTTP_COOKIE_VARS = isset($_COOKIE) ? $_COOKIE : null;
</pre>
<p>.htaccess </p>
<pre name="code" class="c">
<IfModule mod_php5.c>
php_value session.use_trans_sid 0
php_value register_globals 1
php_value auto_prepend_file includes/php5_enabled.php
</IfModule>
</pre>
<p>and et voila!<br />
<code><br />
<strong>Database Import</strong><br />
The database import was successful!<br />
<strong>osCommerce Configuration</strong><br />
The configuration was successful!<br />
</code></p>
<p>but that would have been to easy!</p>
<p>I needed to change also in catalog/admin/includes/application_top.php</p>
<pre name="code" class="php">
// line 131 from $current_page = basename($PHP_SELF); to
$current_page = (basename($PHP_SELF)!='') ? basename($PHP_SELF) : 'index.php';
</pre>
<p>and now it seems to work <img src='http://blog.aint-no-soul.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/code/2007-06-25/nightmare_oscommerce_and_php5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Joomla</title>
		<link>http://blog.aint-no-soul.com/code/2007-06-24/joomla/</link>
		<comments>http://blog.aint-no-soul.com/code/2007-06-24/joomla/#comments</comments>
		<pubDate>Sun, 24 Jun 2007 15:43:30 +0000</pubDate>
		<dc:creator>biophonc</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[digital life]]></category>

		<guid isPermaLink="false">http://aint-no-soul.com/digital-life/2007-06-24/joomla/</guid>
		<description><![CDATA[It looks good. Which means it has a nice UI but for somehow some things seems to me me irrational or not logic and besides that I am disappointed by the amount of table layout stuff. Hello Joomla developer: We are in the mid of 2007 and not in the 90&#8217;s! 
Well the performance is [...]]]></description>
			<content:encoded><![CDATA[<p>It looks good. Which means it has a nice UI but for somehow some things seems to me me irrational or not logic and besides that I am disappointed by the amount of table layout stuff. Hello Joomla developer: We are in the mid of 2007 and not in the 90&#8217;s! </p>
<p>Well the performance is ok and there are a lot of extensions out there but again: do not use f*****g tables for layout!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aint-no-soul.com/code/2007-06-24/joomla/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
