<?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>Stefan&#039;s Blog</title>
	<atom:link href="http://blog.suncrescent.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.suncrescent.net</link>
	<description>Magento, Web Design, CSS, Ajax, JavaScript, SEO</description>
	<lastBuildDate>Tue, 16 Jun 2009 13:56:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Magento: Ultimate cache clear script</title>
		<link>http://blog.suncrescent.net/2009/06/magento-ultimate-cache-clear-script/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=magento-ultimate-cache-clear-script</link>
		<comments>http://blog.suncrescent.net/2009/06/magento-ultimate-cache-clear-script/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 13:42:35 +0000</pubDate>
		<dc:creator>sgraf</dc:creator>
				<category><![CDATA[Blog News]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[catalog rewrites]]></category>
		<category><![CDATA[clear]]></category>
		<category><![CDATA[image cache]]></category>
		<category><![CDATA[layered navigation]]></category>
		<category><![CDATA[search index]]></category>
		<category><![CDATA[stock status]]></category>

		<guid isPermaLink="false">http://mystic-one.com/?p=67</guid>
		<description><![CDATA[If you have been using Magento with a BIG database of products you will soon realize that the built-in &#8220;cache management&#8221; is quite limited due to the server&#8217;s usual time limit on requests. You just can&#8217;t refresh your catalog rewrites &#8230; <a href="http://blog.suncrescent.net/2009/06/magento-ultimate-cache-clear-script/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you have been using Magento with a BIG database of products you will soon realize that the built-in &#8220;cache management&#8221; is quite limited due to the server&#8217;s usual time limit on requests. You just can&#8217;t refresh your catalog rewrites on 5000 products in less then a good 5 minutes and the other functions might give you the same problems as well.</p>
<p>By extracting the code from the cache management controller I was able to build a custom script that can be called via command line on the server and that will allow you to do a full cache refresh without any kind of time limit or connection timeout issues. The only requirement is shell access to your website files by SSH, Telnet or a terminal of some sort.</p>
<p>Put this file inside /app/ right next to the Mage.php file. To use it, you can simply navigate to the /app folder with your SSH client (or terminal if you run the website on your local PC) do <strong>php -f clearcache.php</strong> or for fastcgi adepts <strong>php-cgi -f clearcache.php</strong></p>
<h6><strong>Call the file clearcache.php and you can comment out the parts you don&#8217;t need if you only want to refresh one kind of resource (ie: comment out the stock status try/catch block if you don&#8217;t want to refresh product stocks).<br />
</strong></h6>
<pre>&lt;?php

ini_set('memory_limit', '512M');

require './Mage.php';

Mage::app('admin');
Mage::setIsDeveloperMode(true);

if (!Mage::app()-&gt;isInstalled()) {
    echo "Application is not installed yet, please complete install wizard first.";
    exit(1);
}

// Only for urls
// Don't remove this
$_SERVER['SCRIPT_FILENAME'] = 'index.php';

try
{
    // CLEAN CACHE
    Mage::app()-&gt;cleanCache();
    echo 'Cleared all caches' . "\n";

    // CATALOG REWRITES
    try {
        Mage::getSingleton('catalog/url')-&gt;refreshRewrites();
        echo 'Catalog Rewrites were refreshed successfully' . "\n";
    }
    catch (Mage_Core_Exception $e) {
        echo $e-&gt;getMessage() . "\n";
    }
    catch (Exception $e) {
        echo 'Error while refreshed Catalog Rewrites. Please try again later' . "\n";
    }

    // IMAGE CACHE
    try {
        Mage::getModel('catalog/product_image')-&gt;clearCache();
        echo 'Image cache was cleared succesfuly' . "\n";
    }
    catch (Mage_Core_Exception $e) {
        echo $e-&gt;getMessage() . "\n";
    }
    catch (Exception $e) {
        echo 'Error while cleared Image cache. Please try again later' . "\n";
    }

    // LAYERED NAV
    try {
        $flag = Mage::getModel('catalogindex/catalog_index_flag')-&gt;loadSelf();
        if ($flag-&gt;getState() == Mage_CatalogIndex_Model_Catalog_Index_Flag::STATE_RUNNING) {
            $kill = Mage::getModel('catalogindex/catalog_index_kill_flag')-&gt;loadSelf();
            $kill-&gt;setFlagData($flag-&gt;getFlagData())-&gt;save();
        }

        $flag-&gt;setState(Mage_CatalogIndex_Model_Catalog_Index_Flag::STATE_QUEUED)-&gt;save();
        Mage::getSingleton('catalogindex/indexer')-&gt;plainReindex();
        echo 'Layered Navigation Indices were refreshed successfully' . "\n";
    }
    catch (Mage_Core_Exception $e) {
        echo $e-&gt;getMessage() . "\n";
    }
    catch (Exception $e) {
        echo 'Error while refreshed Layered Navigation Indices. Please try again later' . "\n";
    }

    // SEARCH INDEX
    try {
        Mage::getSingleton('catalogsearch/fulltext')-&gt;rebuildIndex();
        echo 'Search Index was rebuilded successfully' . "\n";
    }
    catch (Mage_Core_Exception $e) {
        echo $e-&gt;getMessage() . "\n";
    }
    catch (Exception $e) {
        echo 'Error while rebuilded Search Index. Please try again later' . "\n";
    }

    // STOCK STATUS
    try {
        Mage::getSingleton('cataloginventory/stock_status')-&gt;rebuild();
        echo 'CatalogInventory Stock Status was rebuilded successfully' . "\n";
    }
    catch (Mage_Core_Exception $e) {
        echo $e-&gt;getMessage() . "\n";
    }
    catch (Exception $e) {
        echo 'Error while rebuilded CatalogInventory Stock Status. Please try again later' . "\n";
    }

    // CLEAN CACHE
    Mage::app()-&gt;cleanCache();
    echo 'Cleared all caches' . "\n";    

    echo  "\n" . 'Cache clear complete!' . "\n";

    exit(0);
}
catch (Exception $e) {
    Mage::printException($e);
}

exit(1);</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.suncrescent.net/2009/06/magento-ultimate-cache-clear-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Magento: How to change the admin theme</title>
		<link>http://blog.suncrescent.net/2009/03/magento-how-to-change-the-admin-theme/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=magento-how-to-change-the-admin-theme</link>
		<comments>http://blog.suncrescent.net/2009/03/magento-how-to-change-the-admin-theme/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 21:54:47 +0000</pubDate>
		<dc:creator>sgraf</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[admin theme]]></category>
		<category><![CDATA[administration default theme]]></category>
		<category><![CDATA[customize]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://mystic-one.com/?p=47</guid>
		<description><![CDATA[So you want to use Magento for your company and now you have to change the look of the backend. Of course you don&#8217;t want to change the default Magento adminhtml theme and kill any chances of upgrading your templates &#8230; <a href="http://blog.suncrescent.net/2009/03/magento-how-to-change-the-admin-theme/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">So you want to use Magento for your company and now you have to change the look of the backend. Of course you don&#8217;t want to change the default Magento adminhtml theme and kill any chances of upgrading your templates later on. So thats where this post comes into play. ;)</p>
<p style="text-align: justify;">Theres an easy way to add your own theme folder and use it to customize the look of your admin control panel. All files that aren&#8217;t included in your theme will fall back to the default Magento theme, thus avoiding any problems with missing templates and making it a lot easier to change only a few files.</p>
<h3>Add a new adminhtml theme</h3>
<p>Start by adding a new folder inside the <strong>app/design/adminhtml/default</strong> folder. To start out, the folder should also contain one sub-folders called <strong>template</strong>.</p>
<p>So, for example, you add a folder called <strong>mytheme</strong>, and inside it you add another folder called <strong>template</strong>.</p>
<h3>Overriding Magento configuration</h3>
<p>All you have to do is add a new <strong>config.xml</strong> file inside <strong>app/code/local/MyCompany/Adminhtml/etc</strong>. Add the following code inside the file:</p>
<h6><strong><strong>Note: if you created this file by following one of my earlier guides you don&#8217;t have to create it again and you would simply add the &lt;stores&gt; section at the appropriate location inside the existing file.</strong></strong></h6>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;config&gt;
    &lt;modules&gt;
        &lt;MyCompany_Adminhtml&gt;
            &lt;version&gt;0.1.1&lt;/version&gt;
        &lt;/MyCompany_Adminhtml&gt;
    &lt;/modules&gt;
    &lt;stores&gt;
        &lt;admin&gt;
            &lt;!-- override default admin design package and theme --&gt;
            &lt;design&gt;
                &lt;package&gt;
                    &lt;name&gt;default&lt;/name&gt;
                &lt;/package&gt;
                &lt;theme&gt;
                    &lt;default&gt;mytheme&lt;/default&gt;
                &lt;/theme&gt;
            &lt;/design&gt;
        &lt;/admin&gt;
    &lt;/stores&gt;
&lt;/config&gt;</pre>
<p>You will also have to tell Magento about this new module in an XML file placed inside /<strong>app/etc/modules. </strong>This file could be called <strong>MyCompany.xml </strong>and inside you would copy/paste:</p>
<h6><strong>Note: if you created this file by following one of my earlier guides you don&#8217;t have to create it again.<br />
</strong></h6>
<pre style="text-align: left;">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;config&gt;
    &lt;modules&gt;
        &lt;MyCompany_Adminhtml&gt;
	    &lt;active&gt;true&lt;/active&gt;
            &lt;codePool&gt;local&lt;/codePool&gt;
            &lt;depends&gt;
                &lt;Mage_Adminhtml /&gt;
            &lt;/depends&gt;
        &lt;/MyCompany_Adminhtml&gt;
    &lt;/modules&gt;
&lt;/config&gt;</pre>
<h3>Changing template files</h3>
<p>Now to change the default Magento templates you basically copy the .phtml files from the <strong>app/design/adminhtml/default/default/template</strong> folder into your own template folder and change the contents of the .phtml file to suit your needs.</p>
<p>For example, if you want to change the login box and remove the Magento copyright message:</p>
<p>Copy <strong>app/design/adminhtml/default/default/template/login.phml</strong> into the <strong>app/design/adminhtml/default/mytheme/template</strong> folder and then change the &lt;p class=&#8221;legal&#8221;&gt;&lt;/p&gt; to put your own legal note.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.suncrescent.net/2009/03/magento-how-to-change-the-admin-theme/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Magento: How to disable update notifications</title>
		<link>http://blog.suncrescent.net/2009/03/magento-how-to-disable-update-notifications/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=magento-how-to-disable-update-notifications</link>
		<comments>http://blog.suncrescent.net/2009/03/magento-how-to-disable-update-notifications/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 18:38:04 +0000</pubDate>
		<dc:creator>sgraf</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://mystic-one.com/?p=43</guid>
		<description><![CDATA[A short tutorial on how to block the &#8220;New Magento Version&#8221; notifications in the Magento admin without modifying the core packages. Create a new package under app/code/local , for this example lets make a &#8220;MyCompany&#8221; package. If you already have &#8230; <a href="http://blog.suncrescent.net/2009/03/magento-how-to-disable-update-notifications/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A short tutorial on how to block the &#8220;New Magento Version&#8221; notifications in the Magento admin without modifying the core packages.</p>
<p>Create a new package under app/code/local , for this example lets make a &#8220;MyCompany&#8221; package. If you already have an existing package for your magento mods you can use that one but you will have to change all references to MyCompany in the following code.</p>
<pre style="text-align: left;">Create folder app/code/local/MyCompany</pre>
<p style="text-align: left;">Create a new module called &#8220;Adminhtml&#8221; containing a &#8220;Block&#8221; folder and a &#8220;etc&#8221; folder.</p>
<pre>Create folder app/code/local/MyCompany/Adminhtml</pre>
<pre>Create folder app/code/local/MyCompany/Adminhtml/Block</pre>
<pre style="text-align: left;">Create folder app/code/local/MyCompany/Adminhtml/etc</pre>
<p>Add a &#8220;Notification&#8221; folder inside the Block folder.</p>
<pre>Create folder app/code/local/MyCompany/Adminhtml/Block/Notification</pre>
<p>Create Toolbar.php inside the MyCompany/Block/Notification folder.</p>
<pre style="text-align: left;">&lt;?php
/**
 * Block all notifications
 */
class MyCompany_Adminhtml_Block_Notification_Toolbar extends Mage_Adminhtml_Block_Template
{
    public function isShow()
    {
	return false;
    }

    public function isMessageWindowAvailable()
    {
        return false;
    }
}</pre>
<p>Create Window.php inside the MyCompany/Adminhtml/Block/Notification folder.</p>
<pre style="text-align: left;">&lt;?php
/**
 * Prevent popup window
 */
class MyCompany_Adminhtml_Block_Notification_Window extends Mage_Adminhtml_Block_Notification_Window
{
    public function canShow()
    {
        return false;
    }
}</pre>
<p>Create config.xml file inside the MyCompany/Adminhtml/etc folder</p>
<pre style="text-align: left;">&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;config&gt;

    &lt;modules&gt;
        &lt;MyCompany_Adminhtml&gt;
            &lt;version&gt;0.1.0&lt;/version&gt;
        &lt;/MyCompany_Adminhtml&gt;
    &lt;/modules&gt;

    &lt;global&gt;

        &lt;blocks&gt;
          &lt;adminhtml&gt;
              &lt;rewrite&gt;
             	  &lt;notification_window&gt;MyCompany_Adminhtml_Block_Notification_Window&lt;/notification_window&gt;
		  &lt;notification_toolbar&gt;MyCompany_Adminhtml_Block_Notification_Toolbar&lt;/notification_toolbar&gt;
              &lt;/rewrite&gt;
          &lt;/adminhtml&gt;
        &lt;/blocks&gt;

    &lt;/global&gt;

&lt;/config&gt;</pre>
<p>Last but not least, you have to create a new Modules XML file to load your module. Create MyCompany.xml inside the app/etc/modules folder.</p>
<pre style="text-align: left;">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;config&gt;
    &lt;modules&gt;
        &lt;MyCompany_Adminhtml&gt;
	    &lt;active&gt;true&lt;/active&gt;
            &lt;codePool&gt;local&lt;/codePool&gt;
            &lt;depends&gt;
                &lt;Mage_Adminhtml /&gt;
            &lt;/depends&gt;
        &lt;/MyCompany_Adminhtml&gt;
    &lt;/modules&gt;
&lt;/config&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.suncrescent.net/2009/03/magento-how-to-disable-update-notifications/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to Enable Ant For Zend Studio</title>
		<link>http://blog.suncrescent.net/2008/12/how-to-enable-ant-for-zend-studio/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-enable-ant-for-zend-studio</link>
		<comments>http://blog.suncrescent.net/2008/12/how-to-enable-ant-for-zend-studio/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 14:02:29 +0000</pubDate>
		<dc:creator>sgraf</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[studio]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://mystic-one.com/?p=37</guid>
		<description><![CDATA[This week I found out that Zend Studio has Ant disabled by default (no idea why). Then I tried find a way to reactivate it by installing plugins or opening the workspace in a standard eclipse. Finally I found a &#8230; <a href="http://blog.suncrescent.net/2008/12/how-to-enable-ant-for-zend-studio/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This week I found out that Zend Studio has Ant disabled by default (no idea why). Then I tried find a way to reactivate it by installing plugins or opening the workspace in a standard eclipse. Finally I found a nice post on the internet that explains how to have Zend reactivate the Ant plugins which are actually already installed and ready to be used.</p>
<p>1. Click File-&gt;New&#8230;-&gt;Other&#8230;</p>
<p>2. Click on the Java folder and select Existing project using Ant buildfile&#8230;.</p>
<p>3. Click next</p>
<p>4. A message should popup asking you if you want to enable Ant, click OK</p>
<p>5. Close the new project wizard, you don&#8217;t have to actually create a project.</p>
<p>Go to Window-&gt;Show View-&gt;Other&#8230;, the Ant view should now be in the list.</p>
<p>Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.suncrescent.net/2008/12/how-to-enable-ant-for-zend-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running MySQL Proxy as a daemon</title>
		<link>http://blog.suncrescent.net/2008/08/running-mysql-proxy-as-a-daemon/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=running-mysql-proxy-as-a-daemon</link>
		<comments>http://blog.suncrescent.net/2008/08/running-mysql-proxy-as-a-daemon/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 21:36:59 +0000</pubDate>
		<dc:creator>sgraf</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL-Proxy]]></category>

		<guid isPermaLink="false">http://mystic-one.com/?p=24</guid>
		<description><![CDATA[I had to figure out how to setup mySQL Proxy to run as a daemon (system service). The original information came from this page and has been slightly modified. It is assumed that mySQL Proxy has been installed and the &#8230; <a href="http://blog.suncrescent.net/2008/08/running-mysql-proxy-as-a-daemon/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div>I had to figure out how to setup mySQL Proxy to run as a daemon (system service).</div>
<div>The original information came from <a href="http://www.google.com/url?q=http%3A%2F%2Fforge.mysql.com%2Fwiki%2FMySQL_Proxy_init&amp;sa=D&amp;sntz=1&amp;usg=AFrqEzfnz7U8Ru3tuhtsZgq3u15rC97jJA">this page</a> and has been slightly modified.</div>
<div>It is assumed that mySQL Proxy has been installed and the mysql-proxy executable is located at /usr/local/sbin/mysql-proxy.</div>
<div>The first file is the init.d launch script:</div>
<div>
<div class="goog-ws-dash-box goog-ws-dash-text">
<h4>/etc/init.d/mysql-proxy</h4>
<div class="goog-ws-dash-box-inside">
<pre style="font-family: courier new,monospace;">#!/bin/sh
#
# mysql-proxy This script starts and stops the mysql-proxy daemon
#
# chkconfig: - 78 30
# processname: mysql-proxy
# description: mysql-proxy is a proxy daemon to mysql

# Source function library.
. /etc/rc.d/init.d/functions

PROXY_PATH="/usr/local/sbin"

prog="mysql-proxy"

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] &amp;&amp; exit 0

# Set default mysql-proxy configuration.
PROXY_OPTIONS="--daemon"
PROXY_PID=/var/run/mysql-proxy.pid

# Source mysql-proxy configuration.
if [ -f /etc/sysconfig/mysql-proxy ] ; then
        . /etc/sysconfig/mysql-proxy
fi

PATH=$PATH:/usr/bin:/usr/local/bin:$PROXY_PATH

# By default it's all good
RETVAL=0

# See how we were called.
case "$1" in
  start)
        # Start daemon.
        echo -n $"Starting $prog: "
        daemon $NICELEVEL $PROXY_PATH/mysql-proxy $PROXY_OPTIONS --pid-file $PROXY_PID
        RETVAL=$?
        echo
        if [ $RETVAL = 0 ]; then
                touch /var/lock/subsys/mysql-proxy
        fi
        ;;
  stop)
        # Stop daemons.
        echo -n $"Stopping $prog: "
        killproc $prog
        RETVAL=$?
        echo
        if [ $RETVAL = 0 ]; then
                rm -f /var/lock/subsys/mysql-proxy
                rm -f $PROXY_PID
        fi
        ;;
  restart)
        $0 stop
        sleep 3
        $0 start
        ;;
  condrestart)
       [ -e /var/lock/subsys/mysql-proxy ] &amp;&amp; $0 restart
       ;;
  status)
        status mysql-proxy
        RETVAL=$?
        ;;
  *)
        echo "Usage: $0 {start|stop|restart|status|condrestart}"
        RETVAL=1
        ;;
esac

exit $RETVAL</pre>
</div>
</div>
</div>
<div>The launch script will either use the default configuration or read it from the file /etc/sysconfig/mysql-proxy if it exists.</div>
<div>To set mysql-proxy parameters create:</div>
<div class="goog-ws-dash-box goog-ws-dash-text">
<h4>/etc/sysconfig/mysql-proxy</h4>
<pre># Options to mysql-proxy
# do not remove --daemon
PROXY_OPTIONS="
<span> </span>--daemon
<span> </span>--proxy-backend-addresses=127.0.0.1:3306
<span> </span>--proxy-backend-addresses=127.0.0.1:3307
<span> </span>--proxy-lua-script=load-balancing.lua"</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.suncrescent.net/2008/08/running-mysql-proxy-as-a-daemon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(partial) MySQL Proxy API Doc</title>
		<link>http://blog.suncrescent.net/2008/05/partial-mysql-proxy-api-doc/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=partial-mysql-proxy-api-doc</link>
		<comments>http://blog.suncrescent.net/2008/05/partial-mysql-proxy-api-doc/#comments</comments>
		<pubDate>Tue, 13 May 2008 14:12:31 +0000</pubDate>
		<dc:creator>sgraf</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://mystic-one.com/?p=23</guid>
		<description><![CDATA[I have been working a lot with MySQL proxy lately and trying to figure out how it works is a major PITA. There is virtually no documentation for it and the best way to understand how it actually works is &#8230; <a href="http://blog.suncrescent.net/2008/05/partial-mysql-proxy-api-doc/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been working a lot with MySQL proxy lately and trying to figure out how it works is a major PITA. There is virtually no documentation for it and the best way to understand how it actually works is to read the source code.</p>
<p>This is a list of API functions discovered by reading plugin.c in the mysql_proxy SVN source. The list may be incomplete or not entirely accurate.</p>
<p>Bear with me as I try to get better &lt;pre&gt; tag stylization, right now this is the best I can do.</p>
<pre>[i] = integer based index

[s] = string based index

[proxy]

proxy.global - data structure shared amongst all lua state machines

proxy.global.config - sub structure (possibly added for esthetical reasons only)

proxy.backends - array of backends (shared)

proxy.connection - mysql connection object

[proxy.backends[i]]

proxy.backends[i].connected_clients - connected clients

proxy.backends[i].address - server Address

proxy.backends[i].state - status {BACKEND_STATE_UNKNOWN, BACKEND_STATE_UP, BACKEND_STATE_DOWN}

proxy.backends[i].type - type {BACKEND_TYPE_UNKNOWN, BACKEND_TYPE_RW, BACKEND_TYPE_RO}

proxy.backends[i].pool - connection pool object

[proxy.backends[i].pool]

proxy.backends[i].pool.max_idle_connections - max connections

proxy.backends[i].pool.min_idle_connections - min connections

proxy.backends[i].pool.users - hash table containing sockets hashed by username

[proxy.backends[i].pool.users[s]]

proxy.backends[i].pool.users[s].cur_idle_connections - number of sockets currently in the pool (meaning they are idle)

[proxy.connection]

proxy.connection.backend_ndx - id of active backend (magic value, setting it can trigger server socket changes, i.e: setting it to 0 returns the socket into the connection pool)

proxy.connection.server - server socket object

proxy.connection.client - client socket object

[proxy.connection.client]

proxy.connection.client.default_db - database

proxy.connection.client.username - user

proxy.connection.client.address - ip address (?)

proxy.connection.client.scrambled_password - password as it was sent from the client

[proxy.connection.server]

proxy.connection.server.default_db - database

proxy.connection.server.username - user

proxy.connection.server.address - ip address (?)

proxy.connection.server.scrambled_password - password as it was sent from the client

proxy.connection.server.mysqld_version - mysql version

proxy.connection.server.thread_id - connection id as set during the server handshake

proxy.connection.server.scramble_buffer - password hash (?)</pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.suncrescent.net/2008/05/partial-mysql-proxy-api-doc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Add a self-generated SSL certificate to the list of trusted certificates</title>
		<link>http://blog.suncrescent.net/2008/05/add-a-self-generated-ssl-certificate-to-the-list-of-trusted-certificates/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=add-a-self-generated-ssl-certificate-to-the-list-of-trusted-certificates</link>
		<comments>http://blog.suncrescent.net/2008/05/add-a-self-generated-ssl-certificate-to-the-list-of-trusted-certificates/#comments</comments>
		<pubDate>Tue, 13 May 2008 13:37:46 +0000</pubDate>
		<dc:creator>sgraf</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://mystic-one.com/?p=22</guid>
		<description><![CDATA[Usually Java only accepts SSL certificates that can be validated with one of the CA providers in JRE&#8217;s internal cacerts keystore. The cacerts keystore is a file located at $JAVA_HOME/lib/security/cacerts How to import a self generated SSL certificate First, export &#8230; <a href="http://blog.suncrescent.net/2008/05/add-a-self-generated-ssl-certificate-to-the-list-of-trusted-certificates/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Usually Java only accepts SSL certificates that can be validated with one of the CA providers in JRE&#8217;s internal cacerts keystore.</p>
<p>The cacerts keystore is a file located at $JAVA_HOME/lib/security/cacerts</p>
<h4>How to import a self generated SSL certificate</h4>
<pre>
First, export the self-generated key 'mywebsite.com' to a file called mywebsite.com.cert on the server
keytool -export -keystore ~/mywebsite.com.keystore -alias mywebsite.com -file mywebsite.com.cert

Then download the cert file with FTP or SFTP to your local computer.

Finally, import the certificate 'mywebsite.com.cert' into a local cacerts keystore:
keytool -import -keystore $JAVA_HOME/lib/security/cacerts -storetype jks -alias mywebsite.com -file ./mywebsite.com.cert
</pre>
<h4>References</h4>
<p>keytool export command <a href="http://www.google.com/url?q=http%3A%2F%2Fjava.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Ftooldocs%2Fsolaris%2Fkeytool.html%23exportCmd&amp;sa=D&amp;sntz=1&amp;usg=AFrqEzc5d7EqIhGbbKv2JenjRSpBQmVCmg">ˆ</a><br />
keytool import command <a href="http://www.google.com/url?q=http%3A%2F%2Fjava.sun.com%2Fj2se%2F1.5.0%2Fdocs%2Ftooldocs%2Fsolaris%2Fkeytool.html%23importCmd&amp;sa=D&amp;sntz=1&amp;usg=AFrqEzfvz-aa91LeREjHjH8xORAG3Yc6BQ">ˆ</a></pre>
<p><span id="more-22"></span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.suncrescent.net/2008/05/add-a-self-generated-ssl-certificate-to-the-list-of-trusted-certificates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Activating microphone boost on a Soundblaster Audigy SE in Windows Vista</title>
		<link>http://blog.suncrescent.net/2008/05/activating-microphone-boost-on-a-soundblaster-audigy-se-in-windows-vista/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=activating-microphone-boost-on-a-soundblaster-audigy-se-in-windows-vista</link>
		<comments>http://blog.suncrescent.net/2008/05/activating-microphone-boost-on-a-soundblaster-audigy-se-in-windows-vista/#comments</comments>
		<pubDate>Mon, 12 May 2008 20:42:37 +0000</pubDate>
		<dc:creator>sgraf</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Sound]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[20db]]></category>
		<category><![CDATA[audigy]]></category>
		<category><![CDATA[boost]]></category>
		<category><![CDATA[microphone]]></category>
		<category><![CDATA[soundblaster]]></category>

		<guid isPermaLink="false">http://mystic-one.com/?p=21</guid>
		<description><![CDATA[Note: This is a repost of the same article, which got deleted when my website was hacked. I just spent over two hours figuring out how to get my microphone to work under windows vista 32bits with my new Soundblaster &#8230; <a href="http://blog.suncrescent.net/2008/05/activating-microphone-boost-on-a-soundblaster-audigy-se-in-windows-vista/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>Note: This is a repost of the same article, which got deleted when my website was hacked.</em></p>
<p>I just spent over two hours figuring out how to get my microphone to work under windows vista 32bits with my new Soundblaster Audigy SE so I’m writing this blog post in the hopes that it will help someone in my situation.</p>
<p>I started by letting vista install the driver by downloading it from the windows update website but that proved to be a big mistake. The sound actually worked great but my microphone input was way too low to be usable on ventrilo. What you usually do in that case is activate mic boost but there was no +20db check box in my sound control panel and there was absolutely no way to increase the volume of my microphone.</p>
<p>What I tried next is downloading official drivers from the creative website. The file is 60MB and took a while to download but since it was gonna fix all my problems it was worth it. Guess what: Installer doesn’t work; it just tells me that there is already a more recent version of the driver installed. So I then proceeded to uninstall the driver through the Windows Device Manager and restart the installer. This time it tells me no supported hardware is found…</p>
<p>This is where I was only inches away from just taking the card out of my PC and return it to the store where I bought it. But there was one last hope, the files extracted by the installer could provide me with a way to install a working driver. I searched for those files, found the driver and installed it et voila, suddenly there is a +20db mic boost check-box and everything works fine.</p>
<p>So here is how I got my sound card to work:</p>
<p>(I give no guarantee that this will work for you and it might even go wrong so save any open documents)</p>
<p>1. download driver from http://us.creative.com/support/downloads/</p>
<p>2. double click SB24_VTDRV_LB_1_04_0077.exe and let it extract the setup files.</p>
<p>3. wait until installer window is shown, once you see a window where you are asked to chose the setup language go to step 4 DON’T CLOSE THE INSTALLER WINDOW.</p>
<p>4. use “windows key” + R to bring up the run dialog, type   %WINDIR%\Temp   and hit enter.</p>
<p>5. look for a folder called CRF000, the modified date of that folder should be only minutes from your current system time.</p>
<p>6. open the CRF000 folder and inside open the Drivers folder, inside that folder is file called setup.exe that will happily install the official creative diver.</p>
<p>7. when asked if you want to replace your existing drivers say yes obviously <img class="wp-smiley" src="../wp-includes/images/smilies/icon_wink.gif" alt=";)" /></p>
<p>8. Back on the original installer window, click close to cancel the installation because you are done installing already.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.suncrescent.net/2008/05/activating-microphone-boost-on-a-soundblaster-audigy-se-in-windows-vista/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

