<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>entwicklungsgedanken &#187; Typolight</title>
	<atom:link href="http://www.entwicklungsgedanken.de/category/typolight/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.entwicklungsgedanken.de</link>
	<description>Verschiedene Gedanken rund um die Softwareentwicklung</description>
	<lastBuildDate>Thu, 29 Jul 2010 11:09:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Fixing TYPOlight-error #145 &#8211; Table &#8216;./tl_search&#8217; is marked as crashed and should be repaired</title>
		<link>http://www.entwicklungsgedanken.de/2009/11/30/fixing-typolight-error-145-table-tl_search-is-marked-as-crashed-and-should-be-repaired/</link>
		<comments>http://www.entwicklungsgedanken.de/2009/11/30/fixing-typolight-error-145-table-tl_search-is-marked-as-crashed-and-should-be-repaired/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 16:30:38 +0000</pubDate>
		<dc:creator>Eric Bartels</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Typolight]]></category>
		<category><![CDATA[crashed]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[repair]]></category>

		<guid isPermaLink="false">http://www.entwicklungsgedanken.de/?p=358</guid>
		<description><![CDATA[Today a website of a customer running with TYPOlight stopped working. The friendly “there is an error”-message appeared. Even the administration-backend was not working anymore. Enabling the “display-error” setting revealed that there was a database-problem (perhaps due to a crash of mysql). #145 - Table './tl_search' is marked as crashed and should be repaired The [...]]]></description>
			<content:encoded><![CDATA[<p>Today a website of a customer running with TYPOlight stopped working. The friendly “there is an error”-message appeared. Even the administration-backend was not working anymore.</p>
<p>Enabling the “display-error” setting revealed that there was a database-problem (perhaps due to a crash of mysql).</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#145 - Table './tl_search' is marked as crashed and should be repaired</span></pre></div></div>

<p>The problem was that I have no shell-access to the server of the hosting provider and no administrative-console for the database. So I built a little “repair-script” to fix this issue.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Typolight table repair script</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'TL_ROOT'</span><span style="color: #339933;">,</span> <span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Load the configuration</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'system/config/localconfig.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$con</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'TL_CONFIG'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dbHost'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
  <span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'TL_CONFIG'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dbUser'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
  <span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'TL_CONFIG'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dbPass'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'TL_CONFIG'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dbDatabase'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$con</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Repair table</span>
<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;REPAIR TABLE tl_search&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$con</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">var_dump</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">mysql_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$con</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Its placed where the “front-controller” (index.php) resides and after executing it via browser the problem is gone and the website is up and running again.</p>
</p>
<pre></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.entwicklungsgedanken.de/2009/11/30/fixing-typolight-error-145-table-tl_search-is-marked-as-crashed-and-should-be-repaired/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
