<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Internet Solutions</title>
	
	<link>http://www.internet-solutions.si</link>
	<description>Web development na sto in en način</description>
	<lastBuildDate>Mon, 29 Jun 2009 11:53:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/internet-solutions" /><feedburner:info uri="internet-solutions" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Malce svežine</title>
		<link>http://feedproxy.google.com/~r/internet-solutions/~3/mp-5qmglDUo/</link>
		<comments>http://www.internet-solutions.si/2009/06/29/malce-svezine/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 00:21:23 +0000</pubDate>
		<dc:creator>alesl</dc:creator>
				<category><![CDATA[Internet Solutions]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.internet-solutions.si/?p=113</guid>
		<description><![CDATA[Končno nekaj svežega na Internet Solutions:

	dodane Reference
	nova tema - Carrington
	Tedenski Twitter pregled
	nov blog v Angleškem jeziku








]]></description>
			<content:encoded><![CDATA[Končno nekaj svežega na Internet Solutions:
<ul>
	<li>dodane <a href="http://www.internet-solutions.si/reference/" class="liexternal">Reference</a></li>
	<li>nova tema - <a href="http://carringtontheme.com/" class="liexternal">Carrington</a></li>
	<li><a href="http://www.internet-solutions.si/tag/twitter/" class="liexternal">Tedenski Twitter pregled</a></li>
	<li>nov blog v <a href="http://www.celavi.org" class="liexternal">Angleškem</a> jeziku</li>
</ul>







<div class="zemanta-pixie" style="margin-top:10px;height:15px"><a href="http://reblog.zemanta.com/zemified/941ca7d0-2327-44b7-9b05-3f5759a8d2b5/" class="zemanta-pixie-a" title="Reblog this post [with Zemanta]"><img class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=941ca7d0-2327-44b7-9b05-3f5759a8d2b5" alt="Reblog this post [with Zemanta]" style="border:none;float:right"></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div><img src="http://feeds.feedburner.com/~r/internet-solutions/~4/mp-5qmglDUo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.internet-solutions.si/2009/06/29/malce-svezine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.internet-solutions.si/2009/06/29/malce-svezine/</feedburner:origLink></item>
		<item>
		<title>Zdaj delam za 3LINE</title>
		<link>http://feedproxy.google.com/~r/internet-solutions/~3/y1a4O_ZeBH4/</link>
		<comments>http://www.internet-solutions.si/2008/12/19/zdaj-delam-za-3line/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 16:14:19 +0000</pubDate>
		<dc:creator>alesl</dc:creator>
				<category><![CDATA[3LINE]]></category>
		<category><![CDATA[služba]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.internet-solutions.si/?p=90</guid>
		<description><![CDATA[En hiter post, da povem (za tiste, ki še ne vedo), da sedaj delam za 3LINE d.o.o.

Še vedno bom pri svojem delu uporabljal komponente Zend Frameworka, tako da lahko pričakujete še več stvari povezanih z ZF-jem.

Moja prva naloge je bila nadgraditi komponento za prevode Zend_Translate_Adapter_Gettext da bo podpirala tudi množinsko obliko. (1 datoteka, 2 datoteki, [...]]]></description>
			<content:encoded><![CDATA[En hiter post, da povem (za tiste, ki še ne vedo), da sedaj delam za <strong><a href="http://www.3line.si/" title="3LINE" class="liexternal">3LINE d.o.o.</a></strong><br />
<br />
Še vedno bom pri svojem delu uporabljal komponente <a href="http://framework.zend.com/" title="Zend Framework" class="liexternal">Zend Frameworka</a>, tako da lahko pričakujete še več stvari povezanih z ZF-jem.<br />
<br />
Moja prva naloge je bila nadgraditi komponento za prevode <a href="http://framework.zend.com/manual/en/zend.translate.adapter.html#zend.translate.adapter.gettext" title="Zend_Translate_Adapter_Gettext" class="liexternal">Zend_Translate_Adapter_Gettext</a> da bo podpirala tudi množinsko obliko. (1 datoteka, 2 datoteki, 3 datoteke, 5 datotek...) V kratkem bom napisal nekaj tanačev<sup id="citation-90-1" class="footnote"><a href="#footnote-90-1" class="liinternal">1</a></sup>, kako sem se tega lotil.<br />
<br />
Do takrat pa:<br />
Happy blogging(coding)! <div class="footnotes"><hr /><p id="footnote-90-1"><sup><a href="#citation-90-1" class="liinternal">1</a></sup> navodil</p></div><img src="http://feeds.feedburner.com/~r/internet-solutions/~4/y1a4O_ZeBH4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.internet-solutions.si/2008/12/19/zdaj-delam-za-3line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.internet-solutions.si/2008/12/19/zdaj-delam-za-3line/</feedburner:origLink></item>
		<item>
		<title>Enostavno je težje</title>
		<link>http://feedproxy.google.com/~r/internet-solutions/~3/VWvrjxOlv9U/</link>
		<comments>http://www.internet-solutions.si/2008/09/16/enostavno-je-tezje/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 10:24:38 +0000</pubDate>
		<dc:creator>alesl</dc:creator>
				<category><![CDATA[Tanači]]></category>
		<category><![CDATA[Tehnologija]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[scalability]]></category>

		<guid isPermaLink="false">http://www.internet-solutions.si/?p=84</guid>
		<description><![CDATA[Simple Is Hard
Med pucanjem pošte sem naletel na link, ki me je pripeljal do slidov Rasmusa Lerdorfa. Prezentacija je iz avgustovske Drupal konference, ki je potekala pri naših sosedih.
Programerji smo baje čudna bitja.   Odvisni smo od kompleksnosti in dostikrat ne znamo poiskati enostavno in očitno rešitev danega problema. To potem škodi performansi, skalabilnosti [...]]]></description>
			<content:encoded><![CDATA[<h2>Simple Is Hard</h2>
Med pucanjem pošte sem naletel na <a href="http://talks.php.net/show/drupal08/0" class="liexternal">link</a>, ki me je pripeljal do slidov <a href="http://lerdorf.com/" class="liexternal">Rasmusa Lerdorfa</a>. Prezentacija je iz avgustovske <a href="http://szeged2008.drupalcon.org/" class="liexternal">Drupal konference</a>, ki je potekala pri naših sosedih.<br />
Programerji smo baje čudna bitja. <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Odvisni smo od kompleksnosti in dostikrat ne znamo poiskati enostavno in očitno rešitev danega problema. To potem škodi performansi, skalabilnosti in varnosti aplikacij.<sup id="citation-84-1" class="footnote"><a href="#footnote-84-1" class="liinternal">1</a></sup><br />
<br />
Avtor nam na primeru <a href="http://laconi.ca/trac/" class="liexternal">Laconice</a><sup id="citation-84-2" class="footnote"><a href="#footnote-84-2" class="liinternal">2</a></sup> nazorno pokaže kako z enostavnimi, preprostimi prijemi izboljšamo performans aplikacije.<br />
<span id="more-84"></span>
<embed src="http://www.archive.org/flow/FlowPlayerLight.swf?config=%7Bembedded%3Atrue%2CshowFullScreenButton%3Atrue%2CshowMuteVolumeButton%3Atrue%2CshowMenu%3Atrue%2CautoBuffering%3Atrue%2CautoPlay%3Afalse%2CinitialScale%3A%27fit%27%2CmenuItems%3A%5Bfalse%2Cfalse%2Cfalse%2Cfalse%2Ctrue%2Ctrue%2Cfalse%5D%2CusePlayOverlay%3Afalse%2CshowPlayListButtons%3Atrue%2CplayList%3A%5B%7Burl%3A%27simple%5Fis%5Fhard%2FDrupalcon%5F2008%5FSzeged%5Faug%5F27%5F3%5FAcquia%5F512kb%2Emp4%27%7D%5D%2CcontrolBarGloss%3A%27high%27%2CshowVolumeSlider%3Atrue%2CbaseURL%3A%27http%3A%2F%2Fwww%2Earchive%2Eorg%2Fdownload%2F%27%2Cloop%3Afalse%2CcontrolBarBackgroundColor%3A%270x000000%27%7D" width="500" height="450" scale="noscale" bgcolor="111111" type="application/x-shockwave-flash" allowFullScreen="true" allowScriptAccess="always" allowNetworking="all" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
<br />
<a href="http://www.archive.org/details/simple_is_hard" class="liexternal">Internet Archive: Details: Drupalcon 2008 Szeged: Simple is hard</a><br />
<br />
A must see vsakega developerja.<br />
<br />
 Happy blogging(coding)! <div class="footnotes"><hr /><p id="footnote-84-1"><sup><a href="#citation-84-1" class="liinternal">1</a></sup> največ pa živcem nadrejenih</p> <p id="footnote-84-2"><sup><a href="#citation-84-2" class="liinternal">2</a></sup> odprto kodna platforma za mikrobloging</p></div><img src="http://feeds.feedburner.com/~r/internet-solutions/~4/VWvrjxOlv9U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.internet-solutions.si/2008/09/16/enostavno-je-tezje/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.internet-solutions.si/2008/09/16/enostavno-je-tezje/</feedburner:origLink></item>
		<item>
		<title>Center Kiron</title>
		<link>http://feedproxy.google.com/~r/internet-solutions/~3/_2XUK_zjfDE/</link>
		<comments>http://www.internet-solutions.si/2008/08/23/center-kiron/#comments</comments>
		<pubDate>Sat, 23 Aug 2008 14:42:15 +0000</pubDate>
		<dc:creator>alesl</dc:creator>
				<category><![CDATA[Brezplačno gostovanje]]></category>
		<category><![CDATA[sponzor]]></category>

		<guid isPermaLink="false">http://www.internet-solutions.si/?p=79</guid>
		<description><![CDATA[Sponzorirana spletna stran: Center Kiron

Center Kiron je prvi konjesrčni center v Sloveniji, ki se ukvarja z inovativnim, naravnim in celostnim pristopom do konj in jahanja ter z raziskovanjem moči konja, kot asistenta v človeškem razvoju, osebni rasti in zdravljenju.


Več na: www.centerkiron.com]]></description>
			<content:encoded><![CDATA[<strong>Sponzorirana spletna stran: <a href="http://www.centerkiron.com/" class="liexternal">Center Kiron</a></strong><br />
<br />
<a href="http://www.internet-solutions.si/wp-content/uploads/2008/08/centerkiron.png" rel="lightbox"><img align="right" style="padding:5px;" src="http://www.internet-solutions.si/wp-content/uploads/2008/08/centerkiron-253x300.png" alt="Center Kiron" title="Center Kiron" width="253" height="300" class="size-medium wp-image-80" /></a>Center Kiron je prvi konjesrčni center v Sloveniji, ki se ukvarja z inovativnim, naravnim in celostnim pristopom do konj in jahanja ter z raziskovanjem moči konja, kot asistenta v človeškem razvoju, osebni rasti in zdravljenju.
<span id="more-79"></span>
<br />
Več na: <a href="http://www.centerkiron.com" class="liexternal">www.centerkiron.com</a><img src="http://feeds.feedburner.com/~r/internet-solutions/~4/_2XUK_zjfDE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.internet-solutions.si/2008/08/23/center-kiron/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.internet-solutions.si/2008/08/23/center-kiron/</feedburner:origLink></item>
		<item>
		<title>The Burning Water Project by Icarus Down</title>
		<link>http://feedproxy.google.com/~r/internet-solutions/~3/Oftd6Dn4fEo/</link>
		<comments>http://www.internet-solutions.si/2008/08/13/the-burning-water-project-by-icarus-down/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 13:46:18 +0000</pubDate>
		<dc:creator>alesl</dc:creator>
				<category><![CDATA[Brezplačno gostovanje]]></category>
		<category><![CDATA[sponzor]]></category>

		<guid isPermaLink="false">http://www.internet-solutions.si/?p=77</guid>
		<description><![CDATA[Sponzorirana spletna stran: The Burning Water Project by Icarus Down

Stripped down to the dry humming of the strings or ampped up to an oscillation of a voltage form the analog / acoustic and the digital / electronic collide together in an Icarus Down project as two sides of a double album.

analog / acoustic side
Warmth personified [...]]]></description>
			<content:encoded><![CDATA[<strong>Sponzorirana spletna stran: <a href="http://www.icarusdown.net/" class="liexternal">The Burning Water Project by Icarus Down</a></strong><br />
<br />
<a href="http://www.internet-solutions.si/wp-content/uploads/2008/08/the-burning-water-project-by-icarus-down.png" rel="lightbox"><img align="right" style="padding:5px;" src="http://www.internet-solutions.si/wp-content/uploads/2008/08/the-burning-water-project-by-icarus-down-150x150.png" alt="The Burning Water Project By Icarus Down" title="The Burning Water Project By Icarus Down" width="150" height="150" class="size-thumbnail wp-image-78" /></a>Stripped down to the dry humming of the strings or ampped up to an oscillation of a voltage form the analog / acoustic and the digital / electronic collide together in an Icarus Down project as two sides of a double album.<br />
<br />
<strong>analog / acoustic side</strong><br />
Warmth personified and poured into acoustic versions of Icarus Down songs, spanning from the 2005 demo, 2006 EP Soundtrack of a Weekend and to the 2007 debut album Contortions, Mood Swing and The Inevitable Decay of Relationships (CPZ Records), with a few novelties, some Slovenian lyrics, variety of guests on different instruments which make this side of the double album project even more sweeter with the right kind of sugar.<br />
<br />
<strong>digital / electronic side</strong><br />
All brand new, all different, yet still the same Icarus Down style songs with the electronic twist ever so lightly exposed on the 2007 debut album. With this side Icarus Down explore desired digital territories of ambient or noisy synths, broken beats, the chilling coldness and echoing intoxication wrapped into sequenced structured works.<br />
<span id="more-77"></span>
<br />
Več na: <a href="http://www.icarusdown.net" class="liexternal">www.icarusdown.net</a><img src="http://feeds.feedburner.com/~r/internet-solutions/~4/Oftd6Dn4fEo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.internet-solutions.si/2008/08/13/the-burning-water-project-by-icarus-down/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.internet-solutions.si/2008/08/13/the-burning-water-project-by-icarus-down/</feedburner:origLink></item>
		<item>
		<title>Zgodila se je prva slovenska PHP konferenca</title>
		<link>http://feedproxy.google.com/~r/internet-solutions/~3/87gwuecQVBg/</link>
		<comments>http://www.internet-solutions.si/2008/07/09/zgodila-se-je-prva-slovenska-php-konferenca/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 10:59:03 +0000</pubDate>
		<dc:creator>alesl</dc:creator>
				<category><![CDATA[Razno]]></category>
		<category><![CDATA[Tehnologija]]></category>
		<category><![CDATA[konferenca]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.internet-solutions.si/?p=75</guid>
		<description><![CDATA[Dan D
Skoraj 10 let je od tega odkar sem napisal svojo prvo "aplikacijo" v PHP-ju. Skriptica je bila napisana v verziji 31. Brala je novice iz tekstovne datoteke in jih prikazovala na spletni strani, Amerika  
Prav toliko let je minilo da sem jo le dočakal ... Koga pa?
Prvo slovensko PHP konferenco, ki se je [...]]]></description>
			<content:encoded><![CDATA[<h2>Dan D</h2>
Skoraj 10 let je od tega odkar sem napisal svojo prvo "aplikacijo" v PHP-ju. Skriptica je bila napisana v verziji 3<sup id="citation-75-1" class="footnote"><a href="#footnote-75-1" class="liinternal">1</a></sup>. Brala je novice iz tekstovne datoteke in jih prikazovala na spletni strani, Amerika <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> <br />
Prav toliko let je minilo da sem jo le dočakal ... Koga pa?<br />
Prvo <a href="http://phpkonferenca.si/" class="liexternal">slovensko PHP konferenco</a>, ki se je pripetila 5 julija 2008 v prostorih Instituta Jožef Stefan v Ljubljani. Glavni krivec za njeno splavitev je <a href="http://phpkonferenca.si/o-konferenci/" class="liexternal">Anže Žnidaršič</a>, vodja tima razvijalcev na PRO PLUS d.o.o. (POP TV / Kanal A). Posebna zahvala gre še podjetju <a href="http://www.domenca.si/" class="liexternal">Domenci</a>, partnerju in glavnemu pokrovitelju konference.<br />
Glavni namen konference je bil vsekakor deliti znanje<sup id="citation-75-2" class="footnote"><a href="#footnote-75-2" class="liinternal">2</a></sup> ter nabirati nova spoznanstva. To je bil vsekakor dober povod za udeležbo, čeprav ste mogoče že stari maček v znanju PHP-ja. Vedno je zanimivo slišati videnja ter način razmišljanja prekaljenih PHP razvojnikov.<br />
Kljub temu, da sem bil z samo vsebino predavanj (<a href="http://www.eclipse.org/" class="liexternal">Eclipse</a>, <a href="http://subversion.tigris.org/" class="liexternal">Subversion</a>, <a href="http://en.wikipedia.org/wiki/List_of_web_application_frameworks#PHP" rel="nofollow" class="liwikipedia">PHP frameworki</a>, <a href="http://en.wikipedia.org/wiki/Template_engine_(web)" rel="nofollow" class="liwikipedia">Template sistemi</a>, <a href="http://mootools.net/" class="liexternal">Mootools</a>, <a href="http://www.phpunit.de/" class="liexternal">Unit</a> in <a href="http://selenium.openqa.org/" class="liexternal">sistemsko</a> testiranje kode, optimizacijo PHP kode ...) že precej seznanjen<sup id="citation-75-3" class="footnote"><a href="#footnote-75-3" class="liinternal">3</a></sup>, sem pridno in pozorno poslušal predavatelje <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />
<code><a href="http://www.internet-solutions.si/wp-content/uploads/2008/07/me_php_konferenca.jpg" rel="lightbox"><img src="http://www.internet-solutions.si/wp-content/uploads/2008/07/me_php_konferenca-150x150.jpg" alt="Zatopljen v predavanja ..." title="Zatopljen v predavanja ..." width="150" height="150" class="alignnone size-thumbnail wp-image-76" /></a><br />
Zatopljen v predavanja ...<br />
<br />
<span id="more-75"></span> 
<h2>Predavanja</h2>
Še beseda, dve o samih predavanjih.<br />
Konferenco je otvoril Anže in v nekaj stavkih obrazložil odkod sama ideja o PHP konferenci ter se obenem zahvalil vsem, ki so omogočili, da je do dogodka sploh prišlo. Slava jim!<br />
Sledila je kratka predstavitev Institut Jožef Stefan, ter posebej še <a href="http://ct3.ijs.si/" class="liexternal">"Centra za prenos znanja na področju informacijskih tehnologij"</a>.<br />
Sebastjan Mislej nam je razkril enega izmed njihovih projektov/servisov z imenom <a href="http://videolectures.net/" class="liexternal">VideoLectures</a>. Vsa predavanja so se snemala in bodo kmalu na voljo za občo javnost. Sam center se med drugim ukvarja tudi z analizo podatkov. Počekirajte prototip iskalca z imenom <a href="http://searchpoint.ijs.si/" class="liexternal">SearchPoint</a>.<br />
Nato se je začelo zares ...<br />
<br />
<h3><a href="http://www.stamcar.com/" class="liexternal">Marko Štamcar</a>, Najdi.si d.o.o</h3>
Tema Markovega predavanja je bila razvoj aplikacij v okolju <a href="http://www.eclipse.org/" class="liexternal">Eclipse</a> ter uporaba <a href="http://subversion.tigris.org/" class="liexternal">Subversna</a> - sistema za nadzor različic<sup id="citation-75-4" class="footnote"><a href="#footnote-75-4" class="liinternal">4</a></sup>.<br />
Eclipse kot IDE postane močan šele ko ga "našopamo" z plugini:
<ul>
  <li>za razvoj PHP-ja <a href="http://www.phpeclipse.de/" class="liexternal">PHPEclipse</a></li>
  <li>dodatki za konteks menu <a href="http://www.eclipseplugincentral.com/modules.php?op=modload&name=Web_Links&file=index&req=viewlink&cid=123" class="liexternal">AnyEdit Tools</a></li>
  <li>SQL klient - <a href="http://eclipsesql.sourceforge.net/" class="liexternal">Eclipse SQL Explorer</a></li>
  <li>orodje za regular expression <a href="http://myregexp.com/eclipsePlugin.html" class="liexternal">Regex Util</a></li>
  <li>klienta za Subversion<sup id="citation-75-5" class="footnote"><a href="#footnote-75-5" class="liinternal">5</a></sup> <a href="http://www.polarion.org/index.php?page=overview&project=subversive" class="liexternal">Subversive</a> in <a href="http://subclipse.tigris.org/" class="liexternal">Subclipse</a></li>
</ul>
<b><a href="http://shrani.si/f/4/ip/AcMnxSf/eclipse-in-subversion.pdf" class="lipdf">Prenesite si</a> prosojnice od predavanja!</b><br />
<br />
<h3>Gaj Capuder - <a href="http://www.spletna-postaja.com/" class="liexternal">spletnaPOSTAJA d.o.o.</a></h3>
Gaj je razglabljal o prednostih in slabostih uporabe Open Source Frameworkov. Če smo bolj natančni je v ožji izbor za primerjavo uvrstil 3 <a href="http://en.wikipedia.org/wiki/Content_management_system" rel="nofollow" class="liwikipedia">CMS</a>-je in 3 <a href="http://en.wikipedia.org/wiki/PHP_frameworks#PHP" rel="nofollow" class="liwikipedia">PHP Frameworke</a>. Ali upoprabiti <a href="http://en.wikipedia.org/wiki/Open_source" rel="nofollow" class="liwikipedia">OS</a> produkte, je stvar posameznika. Dejstvo je, da če želimo razvijati aplikacije po <a href="http://en.wikipedia.org/wiki/Rapid_application_development" rel="nofollow" class="liwikipedia">RAD</a> princupu, nam za lasten razvoj ostane bolj malo časa. Vprašajmo se zakaj bi izumljali toplo vodo vedno znova in znova?<br />
<br />
<h3><a href="http://scene-si.org/" class="liexternal">Tit Petrič</a> - Monotek d.o.o.</h3>
Tit se je spraševal kateri Template sistem je pravi. A je to nam vsem znani <a href="http://www.smarty.net/" class="liexternal">Smarty</a> ali kateri od novejših (<a href="http://www.phpguru.org/static/template.html" class="liexternal">Heyes Template</a>, <a href="http://www.phpguru.org/template/" class="liexternal">Bob Template</a>). Na koncu nam je predstavil <a href="http://scene-si.org/minitpl/" class="liexternal">Mini TPL</a>, templating sistem lastnega razvoja, ki je bil prikazan prvič prav za čas PHP konference.<br />
Med udeleženci se je porodilo vprašanje ali sploh obstaja potreba po učenju dodatnega template jezika kot je npr. Smarty saj današnji fleksibilni <a href="http://en.wikipedia.org/wiki/Model-view-controller" rel="nofollow" class="liwikipedia">MVC</a> frameworki (<a href="http://framework.zend.com/" class="liexternal">Zend Framework</a>, <a href="http://cakephp.org/" class="liexternal">CakePHP</a>, <a href="http://www.symfony-project.org/" class="liexternal">Symfony</a> ...) počnejo točno to, kar smo počeli 5 let nazaj z Smarty-jem; ločevali aplikativni del kode od prikaza. Ali se nam "splača" v "View" komponento od frameworka vključiti template jezik? <br />
Na spletu se odvijajo prave vojne okrog tega. Eno je povzročil sam pisec knjige o Smarty-ju <a href="http://hasin.wordpress.com/2008/01/05/once-upon-a-time-there-was-smarty/" class="liexternal">Hasin Hayder</a>. Jaz pa pravim kakor vam drago <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />
<br />
<b><a href="http://scene-si.org/minitpl/files/php08-abstrakcija-logike-in-prikaza.ppt" class="liexternal">Prenesite si</a> prosojnice od predavanja!</b><br />
<br />
<h3><a href="http://balantic.si/" class="liexternal">Matej Balantič</a>, PRO PLUS, d.o.o. (POP TV / Kanal A)</h3>
Matej je ljudstvu predstavil <a href="http://mootools.net/" class="liexternal">Mootools</a>, kompakten in modularno objketno orentiran Javascript framework. Meni osebno sta bolj poznana <a href="http://developer.yahoo.com/yui/" class="liexternal">YUI</a> ter <a href="http://www.extjs.com/" class="liexternal">ExtJs</a><sup id="citation-75-6" class="footnote"><a href="#footnote-75-6" class="liinternal">6</a></sup>. Je pa vedno dobrodošlo spoznati še kakšno "orodje", saj nikoli ne veš kdaj ti bo prišlo prav <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />
<br />
<h3><a href="http://www.ljudmila.org/~vuk/" class="liexternal">Vuk Ćosić</a></h3>
Vukovo predavanje sem skoraj v celoti zamudil<sup id="citation-75-7" class="footnote"><a href="#footnote-75-7" class="liinternal">7</a></sup>, saj sva z <a href="http://www.wicked.si/" class="liexternal">Vinijem</a> po n-letih z malinovcem zalila najino ponovno snidenje <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />
<br />
<h3><a href="http://www.orangeandnuts.com/" class="liexternal">Jugoslav Petković</a> - Domenca d.o.o.</h3>
Direktor podjetja Domenca nam je povedal svojo zgodbo o uspehu podjetja. Poleg tega se je Domenca kot partner in glavni pokrovitelj zelo izkazala: kosilo, pijača, kava, majice ter za grande finale ob samem koncu konference še podelitev <a href="http://www.mimovrste.com/artikel/2750095432/prenosnik-apple-macbook-24ghz-133-bel-7029" class="liexternal">MacBook</a>-a.<br />
Nekaj zanimivosti o samem podjetju:
<ul>
    <li>za razvoj aplikacij uporabljajo Zend Framework. Domenca je že četrto podjetje za katero vem, da so prešaltali na razvoj v tem Open Source frameworku. Ostala so <a href="http://www.kabi.si/" class="liexternal">Kabi</a>, <a href="http://www.3line.si/" class="liexternal">3line</a> ter <a href="http://www.creatoorweb.si/" class="liexternal">Creatoor</a></li>
    <li>zaposleni imajo možnost neomejenega nakupa strokovne literature</li>
    <li>zaposleni se lahko zastonj izobražujejo po celemu svetu</li>
   <li>dodatni dan dopusta ob vstopu otroka v vrtec in osnovno šolo</li>
    <li>Domenca se bo kmalu predstavljala z novo identiteto in podobo</li>
    <li>vsi v <a href="http://www.koornk.com/" class="liexternal">Koornk</a><sup id="citation-75-8" class="footnote"><a href="#footnote-75-8" class="liinternal">8</a></sup></li>
</ul>
<h3><a href="http://anze.info/" class="liexternal">Anže Žnidaršič</a> - PRO PLUS, d.o.o.</h3>
Vsi vemo, da ni kode brez hroščev, za testiranje pa si v večini primerov vzamemo premalo časa. Pojav hiperprodukcije pri slovenskih podjetjih ni nič novega, saj vsem primanjkuje programerjev. Še dobro se en projekt ne zaključi, že je tu nov. Anže nam je predstavil tehniko imenovano <a href="http://en.wikipedia.org/wiki/Test-driven_development" rel="nofollow" class="liwikipedia">test driven development</a>, pri kateri program testira program in to zna početi kar sam, brez naše pomoči.<br />
Sam sem se z <a href="http://en.wikipedia.org/wiki/Unit_testing" rel="nofollow" class="liwikipedia">unit</a> ter <a href="http://en.wikipedia.org/wiki/System_testing" rel="nofollow" class="liwikipedia">sistemskim</a> testiranjem srečal v začetku leta 2007, ko sem si na domači disk pretočil <strong>Zend Framework 0.7</strong><sup id="citation-75-9" class="footnote"><a href="#footnote-75-9" class="liinternal">9</a></sup>. Po razpakiranju sem odkril mapo <b>test</b> kmalu zatem pa še maherja <a href="http://sebastian-bergmann.de/" class="liexternal">Sebastian Bergmann</a>-a ter njegov <a href="http://www.phpunit.de/" class="liexternal">PHPUnit</a>. Več ali manj je vse ostalo pri raziskovanju ...<br />
Povzetek predavanja:<br />
<br />
<strong>Testiranje naj bi bilo avtomatsko</strong><br />
Glavni problem ko spreminjamo kodo v aplikaciji, je ta, da jo s tem lahko pokvarimo. Spremembe so lahko nedolžne, pa vse do take, ko uporabnik naredi "totalno štalo" ko naleti na njo. Da pa ne bi vedno ročno ponavljali use case in teste, obstajajo zelo močne avtomatske rešitve - "unit testing frameworks"<br />
<br />
<strong>Program naj testira program</strong><br />
Ideja je vedno enaka:
<ul>
<li>napišemo drug program, da potestira našo aplikacijo</li>
<li>program ne rabi iterakcije z uporabnikom da bi se zagnal</li>
<li>v času izvajanja kreira log ali report kako so se testi obnesli</li>
<li>program zaženemo takrat ko želimo testirat aplikacijo</li>
</ul>
<strong>Teste pišemo prej</strong><br />
Pisanje testov pred dejanskim pisanjem aplikacije zagotavlja hiter odziv po vsaki spremembi. Test driven development je metoda kako razvijati softver, ne samo metoda testiranja.<br />
<br />
Tukaj sem navrgel več kot dve, tri besede <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Gre za temo ki je zadnje leto, dve precej aktulna in ni open source projekta, ki ne bi razvoj testiral z Unit testi. Res vse pohvale Anžetu za tako dobro predstavitev.<br />
<br />
<h3>Denis Arh, <a href="http://www.domenca.com/" class="liexternal">Domenca d.o.o.</a></h3>
Poleg Anžetovega, je bilo Denisovo predavanje eno izmed najbolj zanimivih.<sup id="citation-75-10" class="footnote"><a href="#footnote-75-10" class="liinternal">10</a></sup> Vsi ki pišemo kodo želimo, da bi le ta tekla brez zapletov, da se izvaja čim hitreje, skratka da iz nje potegnemo maksimum. Predavatelj nam je razkril "male skrivnosti" velikih mojstrov <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />
Ni samo pomemba optimizacija kode kot same, poskrbeti je potrebno tudi za <a href="http://developer.yahoo.com/performance/" class="liexternal">brskalnike</a> (minizacija script, content encoding ...), web strežnik (optimizacija compilerja, uporaba reverse proxy-ja, zmanjševanje "file deskriptorjev" - o tem sem že sam pred kratkim <a href="http://www.internet-solutions.si/2008/06/12/locevanje-apache-log-datotek-z-uporabo-vlogger-ja/" class="liexternal">modruval</a>, ...), ter podatkovni strežnik (r/w connection -> MASTER/SLAVE ...) .<br />
Opisal je še nekaj trikov in nasvetov kako testirati oz obremeniti web/podatkovni streznik in kako doseči čim krajši odzivni čas oziroma doseči čim večjo število requestov na sekundo.<br />
Na koncu predavanja se je zastavilo zanimivo vprašanje in sicer ali je vertikalen <a href="http://en.wikipedia.org/wiki/Scalability" rel="nofollow" class="liwikipedia">scalability</a> sploh potreben, glede na to, da je hardver poceni v primerjavi z delom programerja. Odgovor je sila preprost - common sense <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  <br />
<br />
<h3>Miha Ceglar, <a href="http://www.renderspace.si/" class="liexternal">Renderspace d.o.o.</a></h3>
Miha nam je pojasnil kako zagotoviti čim boljšo uporabniško izkušnjo. Predavanje od katerega sem odnesel najmanj, je pa tudi že utrujenost naredila svoje in je bila zbranost na dnu. Sama tema je bila  prikazana mogoče malce preveč abstraktno in analitično. Najverjetneje smo programerji bitja, ki imamo radi bolj konkretne, otipljive stvari.<br />
<br />
<h2>Epilog</h2>
Bravo, bravo in še enkrat bravo. Čestitke Anžetu, Domenci, Institutu Jožef Stefan, vsem predavateljem za odlična predavanja ter vsem PHP razvijalcem in entuziastom, ki smo prišli v tako velikem številu. Čestitke tudi Aleš-u srečnemu dobitniku MacBook-a, saj bo končno lahko razvijal na ta pravi <a href="http://www.internet-solutions.si/wp-content/uploads/2008/06/macosx.jpg" rel="lightbox" title="Mac OS X 10.5.2" class="liexternal">mašini</a> <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />
<br />
<strong>ocena:</strong> sedi 5<br />
<strong>minus:</strong> pogrešal uporabo DocBlock-a v PHP kodi oziroma psevdokodi pri podanih primerih<br />
<strong>želje:</strong> še več podobnih dogodkov v prihodnje, interaktivne delavnice<br />
<br />
Lahko samo rečem še PHP konferenca je uspela in Happy blogging(coding)!<div class="footnotes"><hr /><p id="footnote-75-1"><sup><a href="#citation-75-1" class="liinternal">1</a></sup> 4 je bila še v zametkih</p> <p id="footnote-75-2"><sup><a href="#citation-75-2" class="liinternal">2</a></sup> podobno kot se jaz trudim na blogu - za narodov blagor <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p> <p id="footnote-75-3"><sup><a href="#citation-75-3" class="liinternal">3</a></sup> trenutno uporabljam, jo uporabljal v preteklosti ali vsaj testiral</p> <p id="footnote-75-4"><sup><a href="#citation-75-4" class="liinternal">4</a></sup> po domače revision control system <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p> <p id="footnote-75-5"><sup><a href="#citation-75-5" class="liinternal">5</a></sup> izbira je vaša</p> <p id="footnote-75-6"><sup><a href="#citation-75-6" class="liinternal">6</a></sup> za desktop aplikacije</p> <p id="footnote-75-7"><sup><a href="#citation-75-7" class="liinternal">7</a></sup> kriv sem priznam <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p> <p id="footnote-75-8"><sup><a href="#citation-75-8" class="liinternal">8</a></sup> več ne smem povedat</p> <p id="footnote-75-9"><sup><a href="#citation-75-9" class="liinternal">9</a></sup> od takrat naprej ga budno spremljam</p> <p id="footnote-75-10"><sup><a href="#citation-75-10" class="liinternal">10</a></sup> osebno meni</p></div><img src="http://feeds.feedburner.com/~r/internet-solutions/~4/87gwuecQVBg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.internet-solutions.si/2008/07/09/zgodila-se-je-prva-slovenska-php-konferenca/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.internet-solutions.si/2008/07/09/zgodila-se-je-prva-slovenska-php-konferenca/</feedburner:origLink></item>
		<item>
		<title>Zend Studio 6.0.1 installer na Ubuntu-ju 8.04 ga biksa</title>
		<link>http://feedproxy.google.com/~r/internet-solutions/~3/-T37AKTRxw8/</link>
		<comments>http://www.internet-solutions.si/2008/07/01/zend-studio-601-installer-na-ubuntu-ju-804-ga-biksa/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 21:18:10 +0000</pubDate>
		<dc:creator>alesl</dc:creator>
				<category><![CDATA[Modrüvanje]]></category>
		<category><![CDATA[Tanači]]></category>
		<category><![CDATA[Tehnologija]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Zend Debugger]]></category>
		<category><![CDATA[Zend Studio]]></category>

		<guid isPermaLink="false">http://www.internet-solutions.si/?p=66</guid>
		<description><![CDATA[Zend Studio
Pred nekaj dnevi sem želel preizkusiti nov Zend Studio For Eclipse 6.0.1. O samem PHP IDE-ju ne bi preveč razglabljal. Profesionalno orodje za bolj zahtevne uporabnike. Meni osebno je najbolj  všeč Code Assist, integriran Debuging, Source Control z lokalno zgodovino, ter podpora za PHPUnit testing. 
Beseda, dve o debugerju. Zend Studio omogoča lokalno [...]]]></description>
			<content:encoded><![CDATA[<h2>Zend Studio</h2>
Pred nekaj dnevi sem želel preizkusiti nov <a href="http://www.zend.com/en/products/studio/" class="liexternal">Zend Studio For Eclipse 6.0.1</a>. O samem PHP <a href="http://en.wikipedia.org/wiki/Integrated_Development_Environment" rel="nofollow" class="liwikipedia">IDE-ju</a> ne bi preveč razglabljal. Profesionalno orodje za bolj zahtevne uporabnike. Meni osebno je najbolj  všeč <a href="http://www.internet-solutions.si/wp-content/uploads/2008/06/zse-code-assist.gif" rel="lightbox" title="Code Assist" class="liexternal">Code Assist</a>, integriran <a href="http://www.internet-solutions.si/wp-content/uploads/2008/06/zse-debug.gif" rel="lightbox" title="Debugging" class="liexternal">Debuging</a>, <a href="http://www.internet-solutions.si/wp-content/uploads/2008/06/zse-source-control.gif" rel="lightbox" title="Source Control" class="liexternal">Source Control</a> z lokalno zgodovino, ter podpora za <a href="http://www.internet-solutions.si/wp-content/uploads/2008/06/zse-unit-testing-code-coverage.gif" rel="lightbox" title="PHPUnit Testing" class="liexternal">PHPUnit</a> testing. <br />
Beseda, dve o debugerju. Zend Studio omogoča lokalno in oddaljeno (na serverju) debugiranje. Za remote debugging rabite "Web Server Debugger", kar je za <a href="http://en.wikipedia.org/wiki/Client-server" rel="nofollow" class="liwikipedia">Server-Client</a> arhitekturo nekaj samoumevnega. Obstajata dva načina za to:
<ul>
<li>inštalirate si <a href="http://www.zend.com/en/products/platform/" class="liexternal">Zend Platformo</a> ali</li>
<li>uporabite <a href="http://downloads.zend.com/pdt/server-debugger/" class="liexternal">"Zend Debugger extension" za PHP</a></li>
</ul>
Inštalacija slednjega je elegantnejša in manj boleča za Apache in PHP <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />
<br />
<span id="more-66"></span> 
<h3>Inštalacija in konfiguracija Zend Debugerja</h3>
Izberite ustrezen debuger (Windows<sup id="citation-66-1" class="footnote"><a href="#footnote-66-1" class="liinternal">1</a></sup>, Mac OS X, Linux<sup id="citation-66-2" class="footnote"><a href="#footnote-66-2" class="liinternal">2</a></sup>) ter verzijo PHP-ja (4.3.x, 4.4.x, 5.1.x ali 5.2.x) ter ga skopirajte v  php direktorij kjer imate PHP podaljške<sup id="citation-66-3" class="footnote"><a href="#footnote-66-3" class="liinternal">3</a></sup> <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> <br />
Dodajte naslednje vrstice v php.ini:
<pre class="text">&nbsp;
[Zend Debugger]
zend_extension=/usr/lib/php5/20060613/ZendDebugger.so #replace with your path
zend_debugger.allow_hosts=127.0.0.1
zend_debugger.expose_remotely=always
&nbsp;</pre>
Skopirajte priloženo datoteko dummy.php v dokument root direktorij od Apache-ja. Ne pozabite reštartat web strežnik.
Če ste vse pravilno naredili vam bo to razkril phpinfo().<a href="http://www.internet-solutions.si/wp-content/uploads/2008/06/zend_debugger.png" rel="lightbox"><img src="http://www.internet-solutions.si/wp-content/uploads/2008/06/zend_debugger-150x150.png" alt="phpinfo() output about Zend Debugger " title="phpinfo() output about Zend Debugger" width="150" height="150" class="alignleft size-thumbnail wp-image-71" /></a><br />
Da se vrnem nazaj na sam Zend Studio. <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> <br />
<br />
<h3>!?*#?!</h3>
Po tem ko sem uspešno pretočil in razpakiral najnovejšo verzijo Zend Studia,  zaženem installer. Po nekaj sekundah se le ta ustavi in izpiše da je prišlo do notranje napake v aplikaciji. Stack Trace navrže: java.lang.IllegalArgumentException: <strong>Malformed \uxxx encoding</strong><br />
<a href="http://www.internet-solutions.si/wp-content/uploads/2008/07/installer_error.png" rel="lightbox"><img src="http://www.internet-solutions.si/wp-content/uploads/2008/07/installer_error-150x150.png" alt="Mallformed encoding" title="Mallformed encoding" width="150" height="150" class="alignleft size-thumbnail wp-image-72" /></a><br />Po tem ko je že kazalo, da ne bo iz mojega testiranja nič, sem le pogruntal, kaj ga tare...<sup id="citation-66-4" class="footnote"><a href="#footnote-66-4" class="liinternal">4</a></sup> Če imamo v katerih od  <a href="http://en.wikipedia.org/wiki/Environment_variable" rel="nofollow" class="liwikipedia">env</a> spremenljivkah string '\u', ki prikazuje trenutno prijavljenega uporabnika, ga bo installer zamešal za unicode znak in sam inštalacijski postopek se bo prekinil <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  <br />
Pri meni je šlo za PS1 spremenljivko, saj rad upurabljam ta. "fancy prompt":
<pre class="text">&nbsp;
[...]
NM=&quot;\[\033[0;38m\]&quot; #means no background and white lines
HI=&quot;\[\033[0;37m\]&quot; #change this for letter colors
HII=&quot;\[\033[0;31m\]&quot; #change this for letter colors
SI=&quot;\[\033[0;33m\]&quot; #this is for the current directory
IN=&quot;\[\033[0m\]&quot;
&nbsp;
export PS1=&quot;$NM[ $HI\$(date +%H:%M:%S)$NM ]$IN$NM[ $HII\u@\h $SI\w$NM ]$ $IN&quot;
[...]
&nbsp;</pre>
<a href="http://www.internet-solutions.si/wp-content/uploads/2008/07/fancy_prompt.png" rel="lightbox"><img src="http://www.internet-solutions.si/wp-content/uploads/2008/07/fancy_prompt-150x150.png" alt="Fancy prompt" title="Fancy prompt" width="150" height="150" class="alignleft size-thumbnail wp-image-73" /></a><br />
Fancy prompt<br />
<br />
Sedaj mi je samo ostalo, da zakomentiram PS1 spremenljivko v .profile datoteki in problem je bil odpravljen. Installer dela kot namazan:<br />
<a href="http://www.internet-solutions.si/wp-content/uploads/2008/07/installer_passes_ok.png" rel="lightbox"><img src="http://www.internet-solutions.si/wp-content/uploads/2008/07/installer_passes_ok-150x150.png" alt="After some hard time installer will work" title="After some hard time installer will work" width="150" height="150" class="alignleft size-thumbnail wp-image-74" /></a><br />
<br />
Da še ne pozabim. Tale problem mi je uspelo reproducirati na Linux <a href="http://www.ubuntu.com/" class="liexternal">Ubuntu</a> 8.0.4 platformi.<br />
<br />
Happy blogging(coding)!<div class="footnotes"><hr /><p id="footnote-66-1"><sup><a href="#citation-66-1" class="liinternal">1</a></sup> ZendDebugger.dll</p> <p id="footnote-66-2"><sup><a href="#citation-66-2" class="liinternal">2</a></sup> ZendDebugger.so</p> <p id="footnote-66-3"><sup><a href="#citation-66-3" class="liinternal">3</a></sup> extensions</p> <p id="footnote-66-4"><sup><a href="#citation-66-4" class="liinternal">4</a></sup> Stric Google mi je malce pomagal</p></div><img src="http://feeds.feedburner.com/~r/internet-solutions/~4/-T37AKTRxw8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.internet-solutions.si/2008/07/01/zend-studio-601-installer-na-ubuntu-ju-804-ga-biksa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.internet-solutions.si/2008/07/01/zend-studio-601-installer-na-ubuntu-ju-804-ga-biksa/</feedburner:origLink></item>
		<item>
		<title>Dobra vila za SQL</title>
		<link>http://feedproxy.google.com/~r/internet-solutions/~3/wNRQPu51LUI/</link>
		<comments>http://www.internet-solutions.si/2008/06/25/dobra-vila-za-sql/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 11:49:58 +0000</pubDate>
		<dc:creator>alesl</dc:creator>
				<category><![CDATA[Modrüvanje]]></category>
		<category><![CDATA[Tanači]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[YAML]]></category>

		<guid isPermaLink="false">http://www.internet-solutions.si/?p=64</guid>
		<description><![CDATA[Naključje ...
Perl module z imenom SQLFairy (SQL::Translator) sem odkril čisto po naključju med tem ko sem se spoznaval z Doctrine. Ta ORM za PHP do verzije 0.11 ne omogoča da bi mu preprečili avtomatsko "singularizacijo" "podatkovnih modelov" ki jih generiramo iz trenutne baze. Da ponazorim: če imamo tabelo z imenom "files", bo Doctrine generiral model [...]]]></description>
			<content:encoded><![CDATA[<h2>Naključje ...</h2>
Perl module z imenom <a href="http://sqlfairy.sourceforge.net/" class="liexternal">SQLFairy</a> (<a href="http://search.cpan.org/dist/SQL-Translator/" class="liexternal">SQL::Translator</a>) sem odkril čisto po naključju med tem ko sem se spoznaval z <a href="http://www.phpdoctrine.org/" class="liexternal">Doctrine</a>. Ta <a href="http://en.wikipedia.org/wiki/Object-relational_mapping" rel="nofollow" class="liwikipedia">ORM</a> za PHP do verzije 0.11 ne omogoča da bi mu preprečili avtomatsko "singularizacijo" <a href="http://en.wikipedia.org/wiki/Data_model" rel="nofollow" class="liwikipedia">"podatkovnih modelov"</a> ki jih generiramo iz trenutne baze. Da ponazorim: če imamo tabelo z imenom "files", bo Doctrine generiral model z imenom "File" in ne "Files". Čeprav mi ni ravno jasno kako<sup id="citation-64-1" class="footnote"><a href="#footnote-64-1" class="liinternal">1</a></sup>, določeni modeli dobijo kar čudna imena <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> <sup id="citation-64-2" class="footnote"><a href="#footnote-64-2" class="liinternal">2</a></sup> .<br />
Da ne bi vedno znova popravljal <a href="http://www.yaml.org/" class="liexternal">YAML</a> datoteko, ki opisuje shemo podatkovne baze, sem se lotil malega raziskovanja. Naletel sem na ...<br />
<br/>
<span id="more-64"></span>
<h2>SQLFairy ...</h2>
ali z drugim imenom SQL::Translator. To orodje za <a href="http://en.wikipedia.org/wiki/SQL" rel="nofollow" class="liwikipedia">SQL</a>, je trenutno najbolj enostavni način za manipulacijo z "podatkovnimi strukturami"<sup id="citation-64-3" class="footnote"><a href="#footnote-64-3" class="liinternal">3</a></sup> na vse mogoče načine. Služi nam lahko za konvertiranje med različnimi "dialekti" CREATE sintaks (npr: iz MySQL v PostgreSQL), za virtualizacijo shem (pseudo-ER diagrami z uporabo: <a href="http://www.graphviz.org/" class="liexternal">GraphViz</a> ali <a href="http://www.boutell.com/gd/" class="liexternal">GD</a>-ja),  za konvertiranje ne-<a href="http://en.wikipedia.org/wiki/RDBMS" rel="nofollow" class="liwikipedia">RDMBS</a> datotek v SQL sheme (Excelove preglednice), ter še kaj bi se našlo.<br />
Z razbitjem kode v "parserje"<sup id="citation-64-4" class="footnote"><a href="#footnote-64-4" class="liinternal">4</a></sup> in "izdelovalce"<sup id="citation-64-5" class="footnote"><a href="#footnote-64-5" class="liinternal">5</a></sup>, je zmožen kombinacije kateregakoli parserja z izbranim izdelovalcem. Trenutno pa je SQLFairy sposoben uporabljati le definicijski del SQL-a<sup id="citation-64-6" class="footnote"><a href="#footnote-64-6" class="liinternal">6</a></sup>, ne pa same manipulacije s podatki<sup id="citation-64-7" class="footnote"><a href="#footnote-64-7" class="liinternal">7</a></sup>.<br />
<h3>Namestitev in konfiguracija</h3>
Za začetek si prenesite <a href="http://purl.org/net/sqlfairy/download" class="liexternal">SQL::Translator</a> na disk. Ker gre za standardne Perl module, je inštalacija sila preprosta, sledite le navodilam v README fajlu.<sup id="citation-64-8" class="footnote"><a href="#footnote-64-8" class="liinternal">8</a></sup>
Po razpakiranju paketa sledimo navodilom:
<pre class="dos">&nbsp;
$ perl Build.PL
$ ./Build
$ ./Build test
$ su
# ./Build install
&nbsp;</pre>
V primeru da nimate inštaliranih vseh ustreznih modulov, ki jih rabi SQL::Translator se bo skripta Build.PL ustavila. Če do sedaj niste kaj prida uporabljali Perl bo vam najverjetneje manjkal modul z imenom'<a href="http://search.cpan.org/~kwilliams/Module-Build-0.2808/lib/Module/Build.pm" class="liexternal">Module::Build</a>', ki je potreben za grajenje in inštalacijo Perl modulov. Najenostavnejši način, da si inštaliramo manjkajoče zadeve, je z uporabo <a href="http://www.cpan.org/" class="liexternal">CPAN</a>-a. Ukaze lahko vnašamo direktno v konzolo ali pa preko <a href="http://www.shlomifish.org/lecture/Perl/Newbies/lecture4/cpan/mcpan.html" class="liexternal">-MCPAN vmesnika</a>.<sup id="citation-64-9" class="footnote"><a href="#footnote-64-9" class="liinternal">9</a></sup><br />
Primer vnosa direktno v konzolo:
<pre class="dos"># sudo perl -MCPAN -e 'install Module::Build'</pre>
Sledila bo konfiguracija CPAN modula, ter inštalacija Module::Build. Konfiguracija se ustavi, če nimate vseh ustreznih programčkov, ki jih CPAN rabi. Meni sta manjkala: <a href="http://www.ncftpd.com/ncftp/" class="liexternal">NcFtp klient</a> ter  <a href="http://www.gnupg.org/" class="liexternal">GnuPG</a>. Po cca. 15 minutah v pričakovanju vtipkamo nesrečni "./Build install" <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />
<h3>Sqlt</h3>
Če ste se uspešno prebili do te točke bi sedaj morali imeti na voljo ukaz "sqlt". Ukaz konvertira SQL sheme z uporabo SQL::Translator-ja. Tipičen primer uporabe je:
<pre class="dos">sqlt -f MySQL -t PostgreSQL  dump_mysql.sql &gt; dump_postgresql.sql</pre>
Končni rezultat je opis tabel v datoteki dump_postgresql.sql v sintaksi PostgreSQL-a, ki smo ga konvertirali iz MySQL sintakse.<br />
Spisek vseh možnih parserjev in izdelovalcev dobimo:
<pre class="dos">sqlt -l</pre>
<a href="http://www.internet-solutions.si/wp-content/uploads/2008/06/sqlt_l.png" rel="lightbox"><img src="http://www.internet-solutions.si/wp-content/uploads/2008/06/sqlt_l-150x150.png" alt="Spisek vseh možnih parserjev in izdelovalcev" title="Spisek vseh možnih parserjev in izdelovalcev" width="150" height="150" class="alignleft size-thumbnail wp-image-65" /></a><br />
Spisek vseh možnih parserjev in izdelovalcev.<br />
<h3>Use cases</h3>
Kot primer bomo vzeli SQL <a href="http://en.wikipedia.org/wiki/Drop_(SQL)" rel="nofollow" class="liwikipedia">DDL</a> psevdokodo, ki jo bomo iz MySQL sintakse konvertirali v različne formate.<br />
Psevdokoda:
<pre class="sql">&nbsp;
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> bugs <span style="color: #66cc66;">&#40;</span>
  bug_id            INTEGER <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span>,
  bug_description   VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>,
  bug_status        VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span>,
  reported_by       VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>,
  assigned_to       VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>,
  verified_by       VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span> 
<span style="color: #66cc66;">&#41;</span>;
&nbsp;</pre>
MySQL sintaksa:
<pre class="mysql">&nbsp;
<span style="color: #993333; font-weight: bold;">CREATE TABLE</span> `bugs` <span style="color: #66cc66;">&#40;</span>
  `bug_id` <span style="color: #aa9933; font-weight: bold;">INT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span> <span style="color: #aa3399; font-weight: bold;">NOT NULL</span>,
  `bug_description` <span style="color: #aa9933; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span> <span style="color: #aa3399; font-weight: bold;">DEFAULT</span> <span style="color: #aa3399; font-weight: bold;">NULL</span>,
  `bug_status` <span style="color: #aa9933; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span> <span style="color: #aa3399; font-weight: bold;">DEFAULT</span> <span style="color: #aa3399; font-weight: bold;">NULL</span>,
  `reported_by` <span style="color: #aa9933; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span> <span style="color: #aa3399; font-weight: bold;">DEFAULT</span> <span style="color: #aa3399; font-weight: bold;">NULL</span>,
  `assigned_to` <span style="color: #aa9933; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span> <span style="color: #aa3399; font-weight: bold;">DEFAULT</span> <span style="color: #aa3399; font-weight: bold;">NULL</span>,
  `verified_by` <span style="color: #aa9933; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span> <span style="color: #aa3399; font-weight: bold;">DEFAULT</span> <span style="color: #aa3399; font-weight: bold;">NULL</span>,
  <span style="color: #993333; font-weight: bold;">PRIMARY KEY</span>  <span style="color: #66cc66;">&#40;</span>`bug_id`<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span> ENGINE=MyISAM;
&nbsp;</pre>
Konverzija v PostgreSQL:
<pre class="dos">sqlt -f MySQL -t PostgreSQL bugs_mysql.sql &gt; bugs_postgresql.sql</pre>
PostgreSQL sintaksa:
<pre class="sql">&nbsp;
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">&quot;bugs&quot;</span> <span style="color: #66cc66;">&#40;</span>
  <span style="color: #ff0000;">&quot;bug_id&quot;</span> bigint <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span>,
  <span style="color: #ff0000;">&quot;bug_description&quot;</span> character varying<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span>,
  <span style="color: #ff0000;">&quot;bug_status&quot;</span> character varying<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span>,
  <span style="color: #ff0000;">&quot;reported_by&quot;</span> character varying<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span>,
  <span style="color: #ff0000;">&quot;assigned_to&quot;</span> character varying<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span>,
  <span style="color: #ff0000;">&quot;verified_by&quot;</span> character varying<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span>,
  <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;bug_id&quot;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span>;
&nbsp;</pre>
Konverzija v YAML:
<pre class="dos">sqlt -f MySQL -t YAML bugs_mysql.sql &gt; bugs.yaml</pre>
YAML sintaksa:
<pre class="text">&nbsp;
schema:
  procedures: {}
  tables:
    bugs:
      constraints:
        - deferrable: 1
          expression: ''
          fields:
            - bug_id
          match_type: ''
          name: ''
          on_delete: ''
          on_update: ''
          options: []
          reference_fields: []
          reference_table: ''
          type: PRIMARY KEY
      fields:
        assigned_to:
          data_type: varchar
          default_value: NULL
          extra: {}
          is_nullable: 1
          is_primary_key: 0
          is_unique: 0
          name: assigned_to
          order: 5
          size:
            - 100
        bug_description:
          data_type: varchar
          default_value: NULL
          extra: {}
          is_nullable: 1
          is_primary_key: 0
          is_unique: 0
          name: bug_description
          order: 2
          size:
            - 100
        bug_id:
          data_type: int
          default_value: ~
          extra: {}
          is_nullable: 0
          is_primary_key: 1
          is_unique: 0
          name: bug_id
          order: 1
          size:
            - 11
        bug_status:
          data_type: varchar
          default_value: NULL
          extra: {}
          is_nullable: 1
          is_primary_key: 0
          is_unique: 0
          name: bug_status
          order: 3
          size:
            - 20
        reported_by:
          data_type: varchar
          default_value: NULL
          extra: {}
          is_nullable: 1
          is_primary_key: 0
          is_unique: 0
          name: reported_by
          order: 4
          size:
            - 100
        verified_by:
          data_type: varchar
          default_value: NULL
          extra: {}
          is_nullable: 1
          is_primary_key: 0
          is_unique: 0
          name: verified_by
          order: 6
          size:
            - 100
      indices: []
      name: bugs
      options:
        - ENGINE: MyISAM
      order: 1
  triggers: {}
  views: {}
translator:
  add_drop_table: 0
  filename: bugs_mysql.sql
  no_comments: 0
  parser_args:
    db_password: ~
    db_user: ~
    dsn: ~
    field_separator: ~
    mysql_parser_version: ~
    record_separator: ~
    scan_fields: 1
    trim_fields: 1
  parser_type: SQL::Translator::Parser::MySQL
  producer_args:
    add_prefix: ~
    add_truncate: ~
    db_password: ~
    db_user: ~
    dsn: ~
    imap_file: ~
    imap_url: ~
    indent: ~
    newlines: ~
    package_name: ~
    prefix: ~
    pretty: ~
    skip: ~
    skiplike: ~
    title: ~
    tt_conf: {}
    tt_vars: {}
    ttfile: ~
  producer_type: SQL::Translator::Producer::YAML
  show_warnings: 0
  trace: 0
  version: 0.09000
&nbsp;</pre>
Konverzija v XML:
<pre class="dos">sqlt -f MySQL -t XML bugs_mysql.sql &gt; bugs.xml</pre>
XML sintaksa:
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="font-weight: bold; color: black;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- 
Created by SQL::Translator::Producer::XML::SQLFairy
Created on Wed Jun 25 13:40:31 2008
 --&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;schema</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">database</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://sqlfairy.sourceforge.net/sqlfairy.xml&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;extra</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tables<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;table</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;bugs&quot;</span> <span style="color: #000066;">order</span>=<span style="color: #ff0000;">&quot;1&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;extra</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;fields<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;field</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;bug_id&quot;</span> <span style="color: #000066;">data_type</span>=<span style="color: #ff0000;">&quot;int&quot;</span> <span style="color: #000066;">size</span>=<span style="color: #ff0000;">&quot;11&quot;</span> <span style="color: #000066;">is_nullable</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">is_auto_increment</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">is_primary_key</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">is_foreign_key</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">order</span>=<span style="color: #ff0000;">&quot;1&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
          <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;extra</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
          <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;comments<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/comments<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/field<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;field</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;bug_description&quot;</span> <span style="color: #000066;">data_type</span>=<span style="color: #ff0000;">&quot;varchar&quot;</span> <span style="color: #000066;">size</span>=<span style="color: #ff0000;">&quot;100&quot;</span> <span style="color: #000066;">is_nullable</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">default_value</span>=<span style="color: #ff0000;">&quot;NULL&quot;</span> <span style="color: #000066;">is_auto_increment</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">is_primary_key</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">is_foreign_key</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">order</span>=<span style="color: #ff0000;">&quot;2&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
          <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;extra</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
          <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;comments<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/comments<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/field<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;field</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;bug_status&quot;</span> <span style="color: #000066;">data_type</span>=<span style="color: #ff0000;">&quot;varchar&quot;</span> <span style="color: #000066;">size</span>=<span style="color: #ff0000;">&quot;20&quot;</span> <span style="color: #000066;">is_nullable</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">default_value</span>=<span style="color: #ff0000;">&quot;NULL&quot;</span> <span style="color: #000066;">is_auto_increment</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">is_primary_key</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">is_foreign_key</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">order</span>=<span style="color: #ff0000;">&quot;3&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
          <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;extra</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
          <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;comments<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/comments<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/field<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;field</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;reported_by&quot;</span> <span style="color: #000066;">data_type</span>=<span style="color: #ff0000;">&quot;varchar&quot;</span> <span style="color: #000066;">size</span>=<span style="color: #ff0000;">&quot;100&quot;</span> <span style="color: #000066;">is_nullable</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">default_value</span>=<span style="color: #ff0000;">&quot;NULL&quot;</span> <span style="color: #000066;">is_auto_increment</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">is_primary_key</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">is_foreign_key</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">order</span>=<span style="color: #ff0000;">&quot;4&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
          <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;extra</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
          <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;comments<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/comments<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/field<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;field</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;assigned_to&quot;</span> <span style="color: #000066;">data_type</span>=<span style="color: #ff0000;">&quot;varchar&quot;</span> <span style="color: #000066;">size</span>=<span style="color: #ff0000;">&quot;100&quot;</span> <span style="color: #000066;">is_nullable</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">default_value</span>=<span style="color: #ff0000;">&quot;NULL&quot;</span> <span style="color: #000066;">is_auto_increment</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">is_primary_key</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">is_foreign_key</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">order</span>=<span style="color: #ff0000;">&quot;5&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
          <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;extra</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
          <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;comments<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/comments<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/field<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;field</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;verified_by&quot;</span> <span style="color: #000066;">data_type</span>=<span style="color: #ff0000;">&quot;varchar&quot;</span> <span style="color: #000066;">size</span>=<span style="color: #ff0000;">&quot;100&quot;</span> <span style="color: #000066;">is_nullable</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">default_value</span>=<span style="color: #ff0000;">&quot;NULL&quot;</span> <span style="color: #000066;">is_auto_increment</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">is_primary_key</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">is_foreign_key</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">order</span>=<span style="color: #ff0000;">&quot;6&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
          <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;extra</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
          <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;comments<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/comments<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/field<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/fields<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;indices<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/indices<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;constraints<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;constraint</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;PRIMARY KEY&quot;</span> <span style="color: #000066;">fields</span>=<span style="color: #ff0000;">&quot;bug_id&quot;</span> <span style="color: #000066;">reference_table</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">reference_fields</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">on_delete</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">on_update</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">match_type</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">expression</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">options</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">deferrable</span>=<span style="color: #ff0000;">&quot;1&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
          <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;extra</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/constraint<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/constraints<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;comments<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/comments<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/table<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/tables<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;views<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/views<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;triggers<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/triggers<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;procedures<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/procedures<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/schema<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
Happy blogging(coding)!<div class="footnotes"><hr /><p id="footnote-64-1"><sup><a href="#citation-64-1" class="liinternal">1</a></sup> Nisem se poglabljal v kodo ki generira imena modelov</p> <p id="footnote-64-2"><sup><a href="#citation-64-2" class="liinternal">2</a></sup> moneta je postala "Monetum"</p> <p id="footnote-64-3"><sup><a href="#citation-64-3" class="liinternal">3</a></sup> structured data definitions - schemes</p> <p id="footnote-64-4"><sup><a href="#citation-64-4" class="liinternal">4</a></sup> parsers</p> <p id="footnote-64-5"><sup><a href="#citation-64-5" class="liinternal">5</a></sup> producers</p> <p id="footnote-64-6"><sup><a href="#citation-64-6" class="liinternal">6</a></sup> CREATE, ALTER</p> <p id="footnote-64-7"><sup><a href="#citation-64-7" class="liinternal">7</a></sup> INSERT, UPDATE, DELETE</p> <p id="footnote-64-8"><sup><a href="#citation-64-8" class="liinternal">8</a></sup> Tukaj predvidevamo da imate Perl ustrezno inštaliran na vašem računalniku</p> <p id="footnote-64-9"><sup><a href="#citation-64-9" class="liinternal">9</a></sup> kot super-user</p></div><img src="http://feeds.feedburner.com/~r/internet-solutions/~4/wNRQPu51LUI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.internet-solutions.si/2008/06/25/dobra-vila-za-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.internet-solutions.si/2008/06/25/dobra-vila-za-sql/</feedburner:origLink></item>
		<item>
		<title>Ločevanje Apache log datotek z uporabo vlogger-ja</title>
		<link>http://feedproxy.google.com/~r/internet-solutions/~3/I87C8PGRH0U/</link>
		<comments>http://www.internet-solutions.si/2008/06/12/locevanje-apache-log-datotek-z-uporabo-vlogger-ja/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 12:01:12 +0000</pubDate>
		<dc:creator>alesl</dc:creator>
				<category><![CDATA[Tanači]]></category>
		<category><![CDATA[Tehnologija]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[logfile]]></category>
		<category><![CDATA[rotater/parser]]></category>

		<guid isPermaLink="false">http://www.internet-solutions.si/?p=59</guid>
		<description><![CDATA[Long time no see
Po dolgem času spet nekaj za narodov blagor. Od zadnje objave je minilo kar nekaj časa. Delavniki so še vedno enaki: sestanki, ideje, realizacija, skratka ena velika "gužva"  
Doma in v službi sem dokončno prešaltal na linux. Svojemu profilu na LinkedIn lahko počasi dodam napredno znanje in administracija Debian/Ubuntu based linux [...]]]></description>
			<content:encoded><![CDATA[<h2>Long time no see</h2>
Po dolgem času spet nekaj za narodov blagor. Od zadnje objave je minilo kar nekaj časa. Delavniki so še vedno enaki: sestanki, ideje, realizacija, skratka ena velika "gužva" <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> 
Doma in v službi sem dokončno prešaltal na linux. Svojemu profilu na <a href="http://www.linkedin.com/in/alesl" class="liexternal">LinkedIn</a> lahko počasi dodam napredno znanje in administracija Debian/Ubuntu based linux distribucij.<br />
Še vedno veliko raziskujem in testiram. Med zadnjimi uspešnimi eksperimenti je inštalacija <a href="http://www.internet-solutions.si/wp-content/uploads/2008/06/macosx.jpg" rel="lightbox" title="Mac Os X 10.5.2" class="liexternal">Leoparda (Mac Os X 10.5.2)</a> na zunanjem USB disku na dve leti starem PC-ju z AMD Athlon 64 procesorjem. Kako mi je to uspelo, vam ne morem razkriti, saj je celotna stvar namenjena testiranju in ni ravno legalna <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Koga zanima kaj več si naj ogleda <strong><a href="http://www.osx86project.org/" class="liexternal">OSx86 Project</a></strong>. Vsekakor je <a href="http://www.apple.com/macpro/" class="liexternal">Mac Pro</a> moj developer dream machine, saj mi kljub n-odprtim aplikacijam:
<ul>
	<li>Firefox z cca 50 odprtimi tabi</li>
	<li>Opera z cca 20 odprtimi tabi</li>
	<li>Safari z cca 10 odprtimi tabi</li>
	<li>Zend Studio for Eclipse</li>	
        <li>Aptana Studio</li>
        <li>in še eno 20 raznoraznih programčkov</li>
</ul>
na PC-ju ni uspelo preobremenit procesor in s tem OS X, da bi ta vsaj malo počepnil. Kako celotna zadeva deluje na originalnem Macu pa si lahko le zamišljam.<br />
<br/>
<span id="more-59"></span>
<h2>Vlogger</h2>
<a href="http://n0rp.chemlab.org/vlogger/" class="liexternal">Vlogger</a> je majhen programček napisan v perlu s katerim zapisujemo Apache log datoteke razbite na mape virtual hostov. V posameznih mapah se nahajajo dostopi (access.log) po dnevih. Z malenkostnim popravkom skripte pa lahko v istih mapah shranjujemo tudi napake (error.log). Zadeva je zelo podobna <a href="http://www.cronolog.org/" class="liexternal">cronolog-u</a>, le da ne rabimo za vsak virtual host pisat svojo 
direktivo, kar posledično zmanjša število dostop in s tem "file handlov". Zakaj je to pomembo?<br />
Recimo da ima vsak Virtual Host svoje log datoteke in nimamo nobene posebnosti pri zapisovanju logov (ne uporabljamo rotatorja/parserja ampak pustimo da Apache sam skrbi za log datoteke) bomo pri nekaj več sto Virtualnih Hostov kmalu naleteli na težave. Apache-ju bo kaj kmalu zmanjkalo tako imenovanih "<a href="http://httpd.apache.org/docs/2.0/vhosts/fd-limits.html" class="liexternal">file deskriptorjev</a>", ki jih ima na voljo.<br />
Tukaj pridejo na pomoč razni "virtual web logfile rotater/parser" programčki. Med njimi je tudi vlogger. Sam sem stestiral vlogger na Debian/Ubuntu linuxu, Mac Os X ter FreeBSD-ju. Na vseh sistemih sem pred tem Apache2 že inštaliral in vlogger je na vseh deloval kot namazan.
<h3>Inštalacija</h3>
 <b>Linux:</b>
<pre class="dos">sudo apt-get install vlogge</pre>
<b>Mac Os X, FreeBSD:</b><br />
Prenesi datoteko <a href="http://n0rp.chemlab.org/vlogger/vlogger-1.3.tar.gz" class="lizip">vlogger-1.3</a>, odpakiraj in prekopiraj vlogger v /usr/sbin/ direktorij.<br />
<h3>Konfiguracija</h3>
Vse kar moremo narediti, da bo vlogger špilal je da v globalno konfiguracijsko datoteko od Apache strežnika postavimo eno "CustomLog" direktivo in ta bo zapisoval dostopne loge za vsak Virtual Host in dan posebej.<br />
Še prej pa popravimo "LogFormat" vrstico (tisto z imenom combined). Dodamo string %v na začetek le te. Odprimo apache konfiguracijsko datoteko<sup id="citation-59-1" class="footnote"><a href="#footnote-59-1" class="liinternal">1</a></sup>:
<pre class="apache">&nbsp;
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span>
<span style="color: #adadad; font-style: italic;">#LogFormat &quot;%h %V/%v %l %u %t \&quot;%r\&quot; %&gt;s %b \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot;&quot; combined</span>
<span style="color: #00007f;">LogFormat</span> <span style="color: #7f007f;">&quot;%v %h %l %u %t <span style="color: #000099; font-weight: bold;">\&quot;</span>%r<span style="color: #000099; font-weight: bold;">\&quot;</span> %&gt;s %b <span style="color: #000099; font-weight: bold;">\&quot;</span>%{Referer}i<span style="color: #000099; font-weight: bold;">\&quot;</span> <span style="color: #000099; font-weight: bold;">\&quot;</span>%{User-Agent}i<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> combined
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span>
&nbsp;</pre>
Popravimo še "CustomLog" vrstico
<pre class="apache">&nbsp;
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span>
<span style="color: #adadad; font-style: italic;">#CustomLog /var/log/apache2/access.log combined</span>
<span style="color: #00007f;">CustomLog</span> <span style="color: #7f007f;">&quot;| /usr/sbin/vlogger -t <span style="color: #000099; font-weight: bold;">\&quot;</span>access.log.%Y-%m-%d<span style="color: #000099; font-weight: bold;">\&quot;</span> -s access.log /var/log/apache2&quot;</span> combined
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span>
&nbsp;</pre>
Tako bomo zapisovali vse log datoteke v poddirektorije<sup id="citation-59-2" class="footnote"><a href="#footnote-59-2" class="liinternal">2</a></sup>  v "/var/log/apache2" z imenom access.log.yyyy-mm-dd z simbolicnim linkom "access.log"<br />
Kot sem že omenil potrebujemo samo eno "CustomLog" direktivo za celotno konfiguracijo Apache-ja.<br/>
<span style="color:red;">NE POZABITE izključit ostale "CustomLog" direktive, še posebej v Virtual Host konfiguracijah!</span><br/>
Dodatna prednost v eni sami dostopni datoteki, poleg že omenjenega limita "file deskriptorjev", je seveda zmanjšanje server loada še posebej na straneh z veliko prometa.<br />
<a href="http://www.internet-solutions.si/wp-content/uploads/2008/06/access_log.png" rel="lightbox"><img src="http://www.internet-solutions.si/wp-content/uploads/2008/06/access_log-150x150.png" alt="Vlogger access.log na Ubuntu 6.06" title="Vlogger access.log na Ubuntu 6.06" width="150" height="150" class="alignleft size-thumbnail wp-image-61" /></a><br />
Primer zapisa access logov na Ubuntu 6.06<br />
<h3>ErrorLog mode</h3>
Z vlogger-jem lahko parsamo tudi napake. V tem modu je parsanje host-a izključeno in datoteka se zapiše z uporabo template datoteke v podani LOGDIR<sup id="citation-59-3" class="footnote"><a href="#footnote-59-3" class="liinternal">3</a></sup>.
<pre class="apache">&nbsp;
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span>
<span style="color: #adadad; font-style: italic;">#ErrorLog &quot;/var/logs/apache2/error.log&quot;</span>
<span style="color: #00007f;">ErrorLog</span>  <span style="color: #7f007f;">&quot;| /usr/sbin/vlogger -e -t <span style="color: #000099; font-weight: bold;">\&quot;</span>error.log.%Y-%m-%d<span style="color: #000099; font-weight: bold;">\&quot;</span> -s error.log /var/log/apache2/errors&quot;</span>
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span>
&nbsp;</pre>
Prav tako nastavimo level napak, ki se naj shranjujejo v ErrorLog. Za produkcijo je priporočljiv vsaj level <a href="http://httpd.apache.org/docs/2.0/mod/core.html#loglevel" class="liexternal">Critital Conditions</a>.
<pre class="apache">&nbsp;
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span>
<span style="color: #adadad; font-style: italic;">#</span>
<span style="color: #adadad; font-style: italic;"># LogLevel: Control the number of messages logged to the error_log.</span>
<span style="color: #adadad; font-style: italic;"># Possible values include: debug, info, notice, warn, error, crit,</span>
<span style="color: #adadad; font-style: italic;"># alert, emerg.</span>
<span style="color: #adadad; font-style: italic;">#</span>
<span style="color: #00007f;">LogLevel</span> crit
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span>
&nbsp;</pre>
Če želimo v error log ujeti še PHP napake v php.ini-ju nastavimo naslednje:
<pre class="apache">&nbsp;
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span> 
;Log errors into a log file <span style="color: #66cc66;">&#40;</span>server-specific log, stderr, or error_log <span style="color: #66cc66;">&#40;</span>below<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
; As stated above, you<span style="color: #7f007f;">'re strongly advised to use error logging in place of
; error displaying on production web sites.
log_errors = On
[...]
</span></pre>
<a href="http://www.internet-solutions.si/wp-content/uploads/2008/06/error_log.png" rel="lightbox"><img src="http://www.internet-solutions.si/wp-content/uploads/2008/06/error_log-150x150.png" alt="Vlogger error.log na Ubuntu 6.06" title="Vlogger error.log na Ubuntu 6.06" width="150" height="150" class="alignleft size-thumbnail wp-image-62" /></a><br/>
Primer zapisa error loga na Ubuntu 6.06<br />
<h3>Tip</h3>
Z malim popravkom vlogger skripte lahko error.log datoteke zapisujete v Virtual Host mape, kjer se že nahajajo access.log datoteke. <b>Ne priporočam tega v produkciji, saj lahko spet naletimo na problem limita "file deskriptorjev"</b><br />
Gre bolj za pomoč programerjem, saj opažam da nemalokateri razvijalec kliče na pomoč ob prvi napaki.<br />
Odprimo vlogger skripto in spremenimo<sup id="citation-59-4" class="footnote"><a href="#footnote-59-4" class="liinternal">4</a></sup>:
<pre class="perl">&nbsp;
<span style="color: #808080; font-style: italic;">#!/usr/bin/perl - T v</span>
<span style="color: #808080; font-style: italic;">#!/usr/bin/perl</span>
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span>
        <a href="http://perldoc.perl.org/functions/mkdir.html" class="liexternal"><span style="color: #000066;">mkdir</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;$ARGV[0]&quot;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #808080; font-style: italic;">#print STDERR</span>
        <span style="color: #808080; font-style: italic;">#  &quot;[vlogger] target directory $ARGV[0] does not exist - exiting.\n\n&quot;;</span>
        <span style="color: #808080; font-style: italic;">#exit;</span>
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span>
&nbsp;</pre>
S tem najprej disablom da bi perl preverjal tako imenovane "tainting checks", ter kreiramo mapo za error.log če ta ne obstaja. Ker se target direktorij za error log preverja takoj ob zagonu Apache-ja, bi se v nasprotnem primeru skripta ustavila in bi se zapisoval samo access.log.
<br />
Sedaj samo še dodamo direktivo v Virtual Host konfiguracijo
<pre class="apache">&nbsp;
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span>
&lt;VirtualHost *&gt;
    <span style="color: #00007f;">DocumentRoot</span> <span style="color: #7f007f;">&quot;/opt/local/apache2/htdocs/virtualhost&quot;</span>
    <span style="color: #00007f;">ServerName</span> <span style="color: #00007f;">virtualhost</span>
    <span style="color: #00007f;">ErrorLog</span>  <span style="color: #7f007f;">&quot;| /usr/sbin/vlogger -e -t <span style="color: #000099; font-weight: bold;">\&quot;</span>error.log.%Y-%m-%d<span style="color: #000099; font-weight: bold;">\&quot;</span> -s error.log /var/log/apache2/virtualhost&quot;</span>
&lt;/VirtualHost&gt;
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span>
&nbsp;</pre>
<a href="http://www.internet-solutions.si/wp-content/uploads/2008/06/access_error.png" rel="lightbox"><img src="http://www.internet-solutions.si/wp-content/uploads/2008/06/access_error-150x150.png" alt="Access in Error Log v isti mapi od Virtual Hosta" title="Access in Error Log v isti mapi od Virtual Hosta" width="150" height="150" class="alignleft size-thumbnail wp-image-63" /></a><br/>
Access in Error Log v isti mapi od Virtual Hosta.<br/>
<br />
Happy blogging(coding)!<div class="footnotes"><hr /><p id="footnote-59-1"><sup><a href="#citation-59-1" class="liinternal">1</a></sup> linux: /etc/apache2/apache2.conf; mac os x: /opt/local/apache2/conf/httpd.conf; freeBSD: /usr/local/etc/apache22/httpd.conf</p> <p id="footnote-59-2"><sup><a href="#citation-59-2" class="liinternal">2</a></sup> virtualhost.com, virtualhost1.com, ...</p> <p id="footnote-59-3"><sup><a href="#citation-59-3" class="liinternal">3</a></sup> npr: kreiramo mapo /errors v /var/log/apache2</p> <p id="footnote-59-4"><sup><a href="#citation-59-4" class="liinternal">4</a></sup> v vrsticah 1 in 174 </p></div><img src="http://feeds.feedburner.com/~r/internet-solutions/~4/I87C8PGRH0U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.internet-solutions.si/2008/06/12/locevanje-apache-log-datotek-z-uporabo-vlogger-ja/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.internet-solutions.si/2008/06/12/locevanje-apache-log-datotek-z-uporabo-vlogger-ja/</feedburner:origLink></item>
		<item>
		<title>Kako iz nule inštalirati Apache 2.2.8,  MySQL 5.0.51 in PHP 5.2.5 na Ubuntu Dapper (6.06)</title>
		<link>http://feedproxy.google.com/~r/internet-solutions/~3/ufrpW4k7WAU/</link>
		<comments>http://www.internet-solutions.si/2008/01/28/kako-iz-nule-instalirati-apache-228-mysql-5051-in-php-525-na-ubuntu-dapper-606/#comments</comments>
		<pubDate>Sun, 27 Jan 2008 22:26:56 +0000</pubDate>
		<dc:creator>alesl</dc:creator>
				<category><![CDATA[Code snippets]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Ubuntu Dapper]]></category>

		<guid isPermaLink="false">http://www.internet-solutions.si/2008/01/28/kako-iz-nule-instalirati-apache-228-mysql-5051-in-php-525-na-ubuntu-dapper-606/</guid>
		<description><![CDATA[Pred dobrim tednom sem si omislil VPS (virtual private server). Potreba po VPS-ju izhaja predvsem po želji izboljšati znanje Linux-a in administracije strežnikov.
Izbira ponudnika spletnega gostovanja je kar teška odločitev, saj jih je kot gob po dežju. Izbral sem Host Europe, prvensteveno zaradi nizke cene 20 EUR. 
V drugem planu pa me je pritegnila dodatna [...]]]></description>
			<content:encoded><![CDATA[Pred dobrim tednom sem si omislil <a href="http://en.wikipedia.org/wiki/Virtual_private_server" rel="nofollow" class="liwikipedia">VPS</a> (virtual private server). Potreba po VPS-ju izhaja predvsem po želji izboljšati znanje <a href="http://en.wikipedia.org/wiki/Linux" rel="nofollow" class="liwikipedia">Linux</a>-a in administracije strežnikov.<br />
Izbira ponudnika spletnega gostovanja je kar teška odločitev, saj jih je kot gob po dežju. Izbral sem <a href="http://www.hosteurope.de/" class="liexternal">Host Europe</a>, prvensteveno zaradi nizke cene <a href="http://www.hosteurope.de/produkt/Virtual-Server-Linux-XL" class="liexternal">20 EUR</a>. <br />
V drugem planu pa me je pritegnila dodatna ponudba: Hardware, lastna izbira operacijskega sistema (Debian, Ubuntu,  SUSE).  Do sedaj sem imel opravka z <a href="http://www.debian.org/" class="liexternal">Debianom</a> in <a href="http://www.ubuntu.com/" class="liexternal">Ubuntujem</a>.<br />
Ker sem slednjega malenkost več uporabljal, sem se odločil za <strong>Ubuntu brez <a href="http://www.swsoft.com/plesk/" class="liexternal">Pleska</a></strong>. Prvotno veselje je malce popustilo, ko sem pogruntal da je distribucija Ubuntuja, ki je inštalirana na VPS-ju trenutno še verzija 6.06  iz junija 2006, kar dejansko pomeni da so <a href="http://packages.ubuntu.com/dapper/" class="liexternal">softverski paketi</a> že malce zastareli. Next time read <a href="http://www.hosteurope.de/faq/index.php?cpid=11861" class="liexternal">FAQ</a>! <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />
<span id="more-57"></span>
<br />
Za povprečnega uporabnika je to zadovoljivo, saj  lahko z orodjem <strong><a href="http://www.webopedia.com/TERM/A/apt.html" class="liexternal">apt</a></strong> inštaliramo:
<ul>
	<li>Apache: 2.0.55</li>
	<li>PHP HP 4.4.2 in 5.1.2</li>
	<li>MySQL 5.0.22</li>
</ul>
Zadnji moji projekti močno bazirajo na knjižicah <strong>Zend Frameworka</strong>, ki pa rabijo verzijo  PHP-ja vsaj <a href="http://framework.zend.com/manual/en/requirements.html" class="liexternal">5.1.4</a>  (priporočljiva je uporaba 5.2.3 naprej). Kar pomeni, da bi se lahko pod nosom obrisal, da bi VPS uporabljal kot platformo za razvoj, z samo predpripravljenimi paketi seveda.<br />
<br />
Ostali sta mi dve opciji:
<ul>
	<li>building in compiling iz nule</li>
	<li>download in usposobitev <a href="http://www.apachefriends.org/en/xampp-linux.html" class="liexternal">XAMPP</a>-a<sup id="citation-57-1" class="footnote"><a href="#footnote-57-1" class="liinternal">1</a></sup></li>
</ul>
<strong>Predvsem zaradi varnosti</strong> in dejstvu, da imam rad vajeti vedno v rokah, sem se odločil, da bom inštaliral veliko trojico iz nule. Pljunil sem v roke, ter zavihal rokave ...  ./configure, make in make install so bili dva dni moji hardcore spremljevalci. Ker je bil to moj prvi podvig inštalacije apache, mysql in php-ja iz source datotek, je bilo veselje ko je vse skupaj zalaufalo brez napak toliko večje.<br />
<br />
Za vse, ki bi kdaj želeli  ubosti podoben podvig, pa sem pripravil nekaj skript, da vam bo stvar lažje šla od rok.<br />
<br />
<a href="http://www.internet-solutions.si/wp-content/uploads/2008/01/apache_mysql_php.zip" title="How to build Apache 2.2.8, MySQL 5.0.51, PHP 5.2.5 on Ubuntu Dapper (6.06)" class="lizip">How to Build Apache 2.2.8,  MySQL 5.0.51, PHP 5.2.5 on Ubuntu Dapper (6.06)</a><br />
<br />
Poglejmo <a href="http://www.celavi.org/info.php" class="liexternal">konfiguracijo</a>:
<ul>
	<li>Apache/2.2.8 mod_ssl/2.2.8 OpenSSL/0.9.7m DAV/2</li>
	<li>MySQL 5.0.51 z SSL podporo</li>
	<li>PHP 5.2.5 v večino dodatkov ki jih rabim pri razvoju: cURL, OpenSSL, PDO MySQL, IMAP, ...</li>
</ul>
Na kakšne večje težave nisem naletel. OpenSSL verzija 0.9.8 se nikakor ni hotela skompajlirat z MySQL-om, tako da sem potem ubodel eno minor verzijo niže. Nekatere skripte (imap, PDO_MySQL) so v configuracijskih datotekah narobe referencirale nekatere knjižice. To se najlažje reši z simboličnim linkanjem na zahtevane knjižice.<br />
<br />
<strong>Še kratka navodila.</strong> Skripte, ki jih najdete v zip-u prebirajte in zaganjajate v tem vrstem redu<sup id="citation-57-2" class="footnote"><a href="#footnote-57-2" class="liinternal">2</a></sup>:
<ul>
	<li>preberi apache2-pre-install.txt</li>
	<li>zaženi apache2-download.sh</li>
	<li>zaženi apache2-install.sh</li>
	<li>preberi apache2-post-install.txt</li>
	<li>enako storitze še za mysql ter php</li>
</ul>
Apache laufa pod svojim userjem, prav tako MySQL. Ne pozabite še nastavit root gesla za MySQL uporabnika. V primeru da se compiler ustavi  in ne boste vedeli, kaj je narobe, sem vam na voljo <img src='http://www.internet-solutions.si/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />
<br />
Še vpogled v  eno od shell skript - <strong>apache2-download.sh</strong><br />
<pre class="bash">&nbsp;
<span style="color: #808080; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># Downloads and unpacks apache2 with dependencies</span>
<span style="color: #808080; font-style: italic;"># </span>
<span style="color: #808080; font-style: italic;"># @author Ales Loncar &lt;ales.loncar@internet-solutions.si&gt;</span>
<span style="color: #808080; font-style: italic;"># @copyright 	Copyright <span style="color: #7a0874; font-weight: bold;">&#40;</span>c<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000;">2008</span> Internet Solutions</span>
<span style="color: #808080; font-style: italic;"># @license GNU Public License</span>
<span style="color: #808080; font-style: italic;"># @<span style="color: #c20cb9; font-weight: bold;">link</span> http://www.internet-solutions.si</span>
<span style="color: #808080; font-style: italic;"># @version <span style="color: #000000;">1.0</span></span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> apache2-download.<span style="color: #c20cb9; font-weight: bold;">sh</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> - This script downloads and unpacks all prerequisite packages
<span style="color: #7a0874; font-weight: bold;">echo</span> - Run this script before apache2-<span style="color: #c20cb9; font-weight: bold;">install</span>.<span style="color: #c20cb9; font-weight: bold;">sh</span>
<span style="color: #7a0874; font-weight: bold;">echo</span>
<span style="color: #c20cb9; font-weight: bold;">read</span> -p  <span style="color: #ff0000;">&quot;(Press any key to continue)&quot;</span> temp;
<span style="color: #7a0874; font-weight: bold;">echo</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Abort on any errors</span>
<span style="color: #000000; font-weight: bold;">set</span> -e
&nbsp;
<span style="color: #808080; font-style: italic;">#source directory <span style="color: #7a0874; font-weight: bold;">&#40;</span>/usr/<span style="color: #7a0874; font-weight: bold;">local</span>/src<span style="color: #7a0874; font-weight: bold;">&#41;</span></span>
<span style="color: #007800;">SRCDIR=</span>/usr/<span style="color: #7a0874; font-weight: bold;">local</span>/src
&nbsp;
<span style="color: #808080; font-style: italic;"># Set DISTDIR to somewhere persistent, <span style="color: #000000; font-weight: bold;">if</span> you plan to muck around with this</span>
<span style="color: #808080; font-style: italic;"># script and run it several <span style="color: #7a0874; font-weight: bold;">times</span>!</span>
<span style="color: #007800;">DISTDIR=</span>/usr/<span style="color: #7a0874; font-weight: bold;">local</span>/dist
&nbsp;
<span style="color: #808080; font-style: italic;"># Update version information here.</span>
<span style="color: #808080; font-style: italic;"># Zlib</span>
<span style="color: #007800;">ZLIB=</span><span style="color: #ff0000;">&quot;zlib-1.2.3&quot;</span>
<span style="color: #808080; font-style: italic;"># OpenSSL</span>
<span style="color: #007800;">OPENSSL=</span><span style="color: #ff0000;">&quot;openssl-0.9.7m&quot;</span>
<span style="color: #808080; font-style: italic;"># libiconv</span>
<span style="color: #007800;">LIBICONV=</span><span style="color: #ff0000;">&quot;libiconv-1.12&quot;</span>
<span style="color: #808080; font-style: italic;"># apache2</span>
<span style="color: #007800;">HTTPD=</span><span style="color: #ff0000;">&quot;httpd-2.2.8&quot;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>DISTDIR<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Get all the required packages</span>
<span style="color: #7a0874; font-weight: bold;">echo</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> --- Downloading all required packages ---
<span style="color: #7a0874; font-weight: bold;">echo</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Zlib</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> -c http://www.zlib.net/<span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>ZLIB<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>.<span style="color: #c20cb9; font-weight: bold;">tar</span>.gz
<span style="color: #808080; font-style: italic;"># OpenSSL</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> -c http://www.openssl.org/<span style="color: #7a0874; font-weight: bold;">source</span>/<span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>OPENSSL<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>.<span style="color: #c20cb9; font-weight: bold;">tar</span>.gz
<span style="color: #808080; font-style: italic;"># libiconv</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> -c http://<span style="color: #c20cb9; font-weight: bold;">ftp</span>.gnu.org/pub/gnu/libiconv/<span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>LIBICONV<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>.<span style="color: #c20cb9; font-weight: bold;">tar</span>.gz
<span style="color: #808080; font-style: italic;"># apache2</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> -c http://www.apache.si/httpd/<span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>HTTPD<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>.<span style="color: #c20cb9; font-weight: bold;">tar</span>.gz
&nbsp;
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> --- Unpacking downloaded archives. This process may take several minutes! ---
<span style="color: #7a0874; font-weight: bold;">echo</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>SRCDIR<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>
<span style="color: #808080; font-style: italic;"># Unpack them all</span>
<span style="color: #808080; font-style: italic;"># Zlib</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> Extracting <span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>ZLIB<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>...
<span style="color: #c20cb9; font-weight: bold;">tar</span> xzf <span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>DISTDIR<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>/<span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>ZLIB<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>.<span style="color: #c20cb9; font-weight: bold;">tar</span>.gz &gt; /dev/null
<span style="color: #7a0874; font-weight: bold;">echo</span> Done.
<span style="color: #808080; font-style: italic;"># OpenSSL</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> Extracting <span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>OPENSSL<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>...
<span style="color: #c20cb9; font-weight: bold;">tar</span> xzf <span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>DISTDIR<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>/<span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>OPENSSL<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>.<span style="color: #c20cb9; font-weight: bold;">tar</span>.gz &gt; /dev/null
<span style="color: #7a0874; font-weight: bold;">echo</span> Done.
<span style="color: #808080; font-style: italic;"># libiconv</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> Extracting <span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>LIBICONV<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>...
<span style="color: #c20cb9; font-weight: bold;">tar</span> xzf <span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>DISTDIR<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>/<span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>LIBICONV<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>.<span style="color: #c20cb9; font-weight: bold;">tar</span>.gz &gt; /dev/null
<span style="color: #7a0874; font-weight: bold;">echo</span> Done.
<span style="color: #808080; font-style: italic;"># apache2</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> Extracting <span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>HTTPD<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>...
<span style="color: #c20cb9; font-weight: bold;">tar</span> xzf <span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>DISTDIR<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>/<span style="color: #007800;">$<span style="color: #7a0874; font-weight: bold;">&#123;</span>HTTPD<span style="color: #7a0874; font-weight: bold;">&#125;</span></span>.<span style="color: #c20cb9; font-weight: bold;">tar</span>.gz &gt; /dev/null
<span style="color: #7a0874; font-weight: bold;">echo</span> Done.
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> --------------------------------------------------
<span style="color: #7a0874; font-weight: bold;">echo</span> -- Done downloading and unpacking prerequisites --
<span style="color: #7a0874; font-weight: bold;">echo</span> --------------------------------------------------
&nbsp;</pre>
<br />
Happy blogging(coding)!
<div class="footnotes"><hr /><p id="footnote-57-1"><sup><a href="#citation-57-1" class="liinternal">1</a></sup> Uporabo XAMPP-a odsvetujejo v produksijskem okolju, zaradi prešibke varnosti nekaterih procesov, ki laufajo brez gesel</p> <p id="footnote-57-2"><sup><a href="#citation-57-2" class="liinternal">2</a></sup> Za zagon shell skript rabite root privilegije. Ne pozabite jim nastavit execute pravic: chmod +x</p></div><img src="http://feeds.feedburner.com/~r/internet-solutions/~4/ufrpW4k7WAU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.internet-solutions.si/2008/01/28/kako-iz-nule-instalirati-apache-228-mysql-5051-in-php-525-na-ubuntu-dapper-606/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.internet-solutions.si/2008/01/28/kako-iz-nule-instalirati-apache-228-mysql-5051-in-php-525-na-ubuntu-dapper-606/</feedburner:origLink></item>
	</channel>
</rss>
