<?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>Autarchy of the Private Cave &#187; dotProject</title> <atom:link href="https://bogdan.org.ua/tags/dotproject/feed" rel="self" type="application/rss+xml" /><link>https://bogdan.org.ua</link> <description>Tiny bits of bioinformatics, [web-]programming etc</description> <lastBuildDate>Wed, 28 Dec 2022 16:09:04 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>https://wordpress.org/?v=3.8.27</generator> <item><title>dotProject 2.0.4/2.1.2/2.1.3 on shared hosting</title><link>https://bogdan.org.ua/2007/01/22/dotproject-204-on-godaddy-shared-hosting.html</link> <comments>https://bogdan.org.ua/2007/01/22/dotproject-204-on-godaddy-shared-hosting.html#comments</comments> <pubDate>Mon, 22 Jan 2007 18:04:28 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[PHP]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[dotProject]]></category> <category><![CDATA[fix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[project management]]></category> <guid
isPermaLink="false">http://www.bogdan.org.ua/2007/01/22/dotproject-on-godaddycom-shared-hosting.html</guid> <description><![CDATA[Update: the same solution seems to still apply to dotProject 2.1.2; the post instructions have been modified for dP 2.1.2. Update 2: fsmullin suggested a method to fix a similar error in index_table.php, the files_count_max cannot be found error when you click the FILES tab/menu item. His suggestion is now incorporated into the post. Update [&#8230;]]]></description> <content:encoded><![CDATA[<p><ins
datetime="2009-01-17T22:40:24+00:00">Update:</ins> the same solution seems to still apply to dotProject 2.1.2; the post instructions have been modified for dP 2.1.2.</p><p><ins
datetime="2009-01-30T19:21:41+00:00">Update 2:</ins> fsmullin <a
href="http://bogdan.org.ua/2007/01/22/dotproject-204-on-godaddy-shared-hosting.html#comment-97643">suggested</a> a method to fix a similar error in index_table.php, the <strong>files_count_max cannot be found error</strong> when you click the <strong>FILES</strong> tab/menu item. His suggestion is now incorporated into the post.</p><p><ins
datetime="2010-06-21T12:43:39+00:00">Update 3:</ins> this post is still relevant for dotProject 2.1.3.</p><p>In one of my recent posts about <a
href="http://bogdan.org.ua/2007/01/21/project-management-software.html">project management software</a> I stated the desire to extensively test dotProject 2.0.4. However, many shared hosting providers appear incompatible with dotProject: the right to CREATE TEMPORARY TABLES in MySQL is not granted, but is needed by dotProject.</p><p>Here&#8217;s sample error (2.0.4):</p><blockquote><p>query failed(CREATE TEMPORARY TABLE tasks_sum SELECT task_project, COUNT(distinct task_id) AS total_tasks,<br
/> SUM(task_duration * task_percent_complete * IF(task_duration_type = 24, 8.0, task_duration_type))/<br
/> SUM(task_duration * IF(task_duration_type = 24, 8.0, task_duration_type)) AS project_percent_complete FROM `tasks` GROUP BY task_project)</p></blockquote><p>For 2.1.2, sample error would be:</p><blockquote><p>Table &#8216;tasks_total&#8217; doesn&#8217;t exist</p></blockquote><p>I tried looking for solutions, and here&#8217;s what I found&#8230;<br
/> <span
id="more-106"></span><br
/> First of all, I tried issuing the &#8220;grant&#8221; command to try enabling temporary tables:</p><blockquote><p>GRANT CREATE TEMPORARY TABLES ON dot_projects.* to dot_projects@x.myserver.com;</p></blockquote><p>Expectedly, this didn&#8217;t work: &#8220;access denied for user &#8230;.&#8221;.</p><p>Then I tried looking for a ready-to-apply solution. Here are the links relevant to the topic, if you happen to prefer &#8220;the source&#8221;, and not the retelling: <a
href="http://www.dotproject.net/vbulletin/archive/index.php/t-29.html">link 1</a>, <a
href="http://www.dotproject.net/vbulletin/showthread.php?t=2749&#038;highlight=temporary">link 2</a>, <a
href="http://www.dotproject.net/vbulletin/archive/index.php/t-2753.html">link 3</a>, and <a
href="http://www.dotproject.net/vbulletin/showthread.php?t=4261">link 4</a>.</p><p>However, none of the solutions described behind the links worked for me.</p><p><strong>Here&#8217;s my solution (error fix).</strong></p><p>To fix, instead of creating temporary tables each time they are needed (what is impossible on many shared hostings), we need to create the necessary tables once. Then, instead of dropping temporary tables, we just truncate our &#8220;static&#8221; tables.</p><p>Here&#8217;s how we proceed.</p><ol><li>Issue once the following MySQL statements (using, e.g., phpMyAdmin):<div
id="ig-sh-1" class="syntax_hilite"><div
class="code"><ol
class="sql" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #993333; font-weight: bold;">CREATE</span> <span
style="color: #993333; font-weight: bold;">TABLE</span> <span
style="color: #993333; font-weight: bold;">IF</span> <span
style="color: #993333; font-weight: bold;">NOT</span> <span
style="color: #993333; font-weight: bold;">EXISTS</span> <span
style="color: #ff0000;">`tasks_problems`</span> <span
style="color: #66cc66;">&#40;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`task_project`</span> <span
style="color: #993333; 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: #993333; font-weight: bold;">default</span> <span
style="color: #993333; font-weight: bold;">NULL</span> <span
style="color: #66cc66;">,</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`task_log_problem`</span> TINYINT<span
style="color: #66cc66;">&#40;</span><span
style="color: #cc66cc;">1</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></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #66cc66;">&#41;</span> <span
style="color: #993333; font-weight: bold;">TYPE</span><span
style="color: #66cc66;">=</span>MyISAM;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #993333; font-weight: bold;">CREATE</span> <span
style="color: #993333; font-weight: bold;">TABLE</span> <span
style="color: #993333; font-weight: bold;">IF</span> <span
style="color: #993333; font-weight: bold;">NOT</span> <span
style="color: #993333; font-weight: bold;">EXISTS</span> <span
style="color: #ff0000;">`tasks_critical`</span> <span
style="color: #66cc66;">&#40;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`task_project`</span> <span
style="color: #993333; 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: #993333; font-weight: bold;">default</span> <span
style="color: #993333; font-weight: bold;">NULL</span> <span
style="color: #66cc66;">,</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`critical_task`</span> <span
style="color: #993333; 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: #993333; font-weight: bold;">default</span> <span
style="color: #993333; font-weight: bold;">NULL</span> <span
style="color: #66cc66;">,</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`project_actual_end_date`</span> DATETIME <span
style="color: #993333; font-weight: bold;">default</span> <span
style="color: #993333; font-weight: bold;">NULL</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #66cc66;">&#41;</span> <span
style="color: #993333; font-weight: bold;">TYPE</span><span
style="color: #66cc66;">=</span>MyISAM;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #993333; font-weight: bold;">CREATE</span> <span
style="color: #993333; font-weight: bold;">TABLE</span> <span
style="color: #993333; font-weight: bold;">IF</span> <span
style="color: #993333; font-weight: bold;">NOT</span> <span
style="color: #993333; font-weight: bold;">EXISTS</span> <span
style="color: #ff0000;">`tasks_sum`</span> <span
style="color: #66cc66;">&#40;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`task_project`</span> <span
style="color: #993333; 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: #993333; font-weight: bold;">default</span> <span
style="color: #993333; font-weight: bold;">NULL</span> <span
style="color: #66cc66;">,</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`total_tasks`</span> <span
style="color: #993333; font-weight: bold;">INT</span><span
style="color: #66cc66;">&#40;</span> <span
style="color: #cc66cc;">6</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: #66cc66;">,</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`project_percent_complete`</span> <span
style="color: #993333; font-weight: bold;">VARCHAR</span><span
style="color: #66cc66;">&#40;</span> <span
style="color: #cc66cc;">11</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: #66cc66;">,</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`project_duration`</span> <span
style="color: #993333; font-weight: bold;">VARCHAR</span><span
style="color: #66cc66;">&#40;</span> <span
style="color: #cc66cc;">11</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></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #66cc66;">&#41;</span> <span
style="color: #993333; font-weight: bold;">TYPE</span><span
style="color: #66cc66;">=</span>MyISAM;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #993333; font-weight: bold;">CREATE</span> <span
style="color: #993333; font-weight: bold;">TABLE</span> <span
style="color: #993333; font-weight: bold;">IF</span> <span
style="color: #993333; font-weight: bold;">NOT</span> <span
style="color: #993333; font-weight: bold;">EXISTS</span> <span
style="color: #ff0000;">`tasks_summy`</span> <span
style="color: #66cc66;">&#40;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`task_project`</span> <span
style="color: #993333; 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: #993333; font-weight: bold;">default</span> <span
style="color: #993333; font-weight: bold;">NULL</span><span
style="color: #66cc66;">,</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`my_tasks`</span> <span
style="color: #993333; font-weight: bold;">varchar</span><span
style="color: #66cc66;">&#40;</span><span
style="color: #cc66cc;">10</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></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #66cc66;">&#41;</span> <span
style="color: #993333; font-weight: bold;">TYPE</span><span
style="color: #66cc66;">=</span>MyISAM;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #993333; font-weight: bold;">CREATE</span> <span
style="color: #993333; font-weight: bold;">TABLE</span> <span
style="color: #993333; font-weight: bold;">IF</span> <span
style="color: #993333; font-weight: bold;">NOT</span> <span
style="color: #993333; font-weight: bold;">EXISTS</span> <span
style="color: #ff0000;">`tasks_users`</span> <span
style="color: #66cc66;">&#40;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`task_project`</span> <span
style="color: #993333; 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: #993333; font-weight: bold;">default</span> <span
style="color: #993333; font-weight: bold;">NULL</span><span
style="color: #66cc66;">,</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`user_id`</span> <span
style="color: #993333; 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: #993333; font-weight: bold;">default</span> <span
style="color: #993333; font-weight: bold;">NULL</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #66cc66;">&#41;</span> <span
style="color: #993333; font-weight: bold;">TYPE</span><span
style="color: #66cc66;">=</span>MyISAM;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #993333; font-weight: bold;">CREATE</span> <span
style="color: #993333; font-weight: bold;">TABLE</span> <span
style="color: #993333; font-weight: bold;">IF</span> <span
style="color: #993333; font-weight: bold;">NOT</span> <span
style="color: #993333; font-weight: bold;">EXISTS</span> <span
style="color: #ff0000;">`tasks_total`</span> <span
style="color: #66cc66;">&#40;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`task_project`</span> <span
style="color: #993333; 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: #993333; font-weight: bold;">DEFAULT</span> <span
style="color: #993333; font-weight: bold;">NULL</span> <span
style="color: #66cc66;">,</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`total_tasks`</span> <span
style="color: #993333; font-weight: bold;">INT</span><span
style="color: #66cc66;">&#40;</span> <span
style="color: #cc66cc;">6</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></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #66cc66;">&#41;</span> <span
style="color: #993333; font-weight: bold;">TYPE</span><span
style="color: #66cc66;">=</span>MyISAM;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #993333; font-weight: bold;">CREATE</span> <span
style="color: #993333; font-weight: bold;">TABLE</span> <span
style="color: #993333; font-weight: bold;">IF</span> <span
style="color: #993333; font-weight: bold;">NOT</span> <span
style="color: #993333; font-weight: bold;">EXISTS</span> <span
style="color: #ff0000;">`files_count_max`</span> <span
style="color: #66cc66;">&#40;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`file_versions`</span> <span
style="color: #993333; 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: #993333; font-weight: bold;">default</span> <span
style="color: #cc66cc;">0</span><span
style="color: #66cc66;">,</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`file_lastversion`</span> <span
style="color: #993333; font-weight: bold;">float</span> <span
style="color: #993333; font-weight: bold;">default</span> <span
style="color: #ff0000;">'0'</span><span
style="color: #66cc66;">,</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`file_version_id`</span> <span
style="color: #993333; 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: #993333; font-weight: bold;">default</span> <span
style="color: #cc66cc;">0</span><span
style="color: #66cc66;">,</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #ff0000;">`file_project`</span> <span
style="color: #993333; 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: #993333; font-weight: bold;">default</span> <span
style="color: #cc66cc;">0</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #66cc66;">&#41;</span> <span
style="color: #993333; font-weight: bold;">TYPE</span><span
style="color: #66cc66;">=</span>MyISAM;</div></li></ol></div></div><p>This will create all the necessary tables.<br
/> <em>Note:</em> <strong>tasks_total</strong> and <strong>files_count_max</strong> tables are 2.1.2-specific.<br
/> <em>Another note</em>: for 2.1.2, the <strong>tasks_sum</strong> table is one field shorter:<div
id="ig-sh-2" class="syntax_hilite"><div
class="code"><ol
class="sql" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #993333; font-weight: bold;">CREATE</span> <span
style="color: #993333; font-weight: bold;">TABLE</span> <span
style="color: #993333; font-weight: bold;">IF</span> <span
style="color: #993333; font-weight: bold;">NOT</span> <span
style="color: #993333; font-weight: bold;">EXISTS</span> <span
style="color: #ff0000;">`tasks_sum`</span> <span
style="color: #66cc66;">&#40;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span
style="color: #ff0000;">`task_project`</span> <span
style="color: #993333; 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: #993333; font-weight: bold;">default</span> <span
style="color: #993333; font-weight: bold;">NULL</span><span
style="color: #66cc66;">,</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span
style="color: #ff0000;">`project_percent_complete`</span> <span
style="color: #993333; font-weight: bold;">varchar</span><span
style="color: #66cc66;">&#40;</span><span
style="color: #cc66cc;">11</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: #66cc66;">,</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span
style="color: #ff0000;">`project_duration`</span> <span
style="color: #993333; font-weight: bold;">varchar</span><span
style="color: #66cc66;">&#40;</span><span
style="color: #cc66cc;">11</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></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #66cc66;">&#41;</span> <span
style="color: #993333; font-weight: bold;">TYPE</span><span
style="color: #66cc66;">=</span>MyISAM;</div></li></ol></div></div></li><li><a
href="http://www.dotproject.net/vbulletin/showthread.php?t=2753">Now</a>, in <strong>classes/query.class.php</strong> at line 393 (for dotProject 2.0.4; just search for the matching line in 2.1.2) <strong>replace</strong> this line:<div
id="ig-sh-3" class="syntax_hilite"><div
class="code"><ol
class="php" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$q = 'CREATE TEMPORARY TABLE ' . $this-&gt;_table_prefix . $this-&gt;create_table;</div></li></ol></div></div><p>with these:</p><div
id="ig-sh-4" class="syntax_hilite"><div
class="code"><ol
class="php" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">//$q = 'CREATE TEMPORARY TABLE ' . $this-&gt;_table_prefix . $this-&gt;create_table;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$q = 'INSERT INTO ' . $this-&gt;_table_prefix . $this-&gt;create_table;</div></li></ol></div></div><p>Now we won&#8217;t get any errors about the tables which fail to be created.</li><li>Next, <strong>replace</strong> the following text in <strong>modules/projects/projects.class.php</strong> (lines 388-392 for 2.0.4):<div
id="ig-sh-5" class="syntax_hilite"><div
class="code"><ol
class="php" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">// Let's delete temporary tables</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$q &nbsp;= new DBQuery;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$q-&gt;dropTemp('tasks_sum, tasks_summy, tasks_critical, tasks_problems, tasks_users');</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$q-&gt;exec();</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$q-&gt;clear();</div></li></ol></div></div><p>with this code:</p><div
id="ig-sh-6" class="syntax_hilite"><div
class="code"><ol
class="php" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">// Let's delete temporary tables</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$sql = &quot;TRUNCATE TABLE tasks_sum&quot;; db_exec($sql);</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$sql = &quot;TRUNCATE TABLE tasks_summy&quot;; db_exec($sql);</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$sql = &quot;TRUNCATE TABLE tasks_critical&quot;; db_exec($sql);</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$sql = &quot;TRUNCATE TABLE tasks_problems&quot;; db_exec($sql);</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$sql = &quot;TRUNCATE TABLE tasks_users&quot;; db_exec($sql);</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$sql = &quot;TRUNCATE TABLE tasks_total&quot;; db_exec($sql);</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$q &nbsp;= new DBQuery;</div></li></ol></div></div><p>Note: <strong>$sql = &#8220;TRUNCATE TABLE tasks_sum&#8221;; db_exec($sql);</strong> line is 2.1.2-specific.<br
/> At this point, you will no longer receive error messages while on the &#8220;projects&#8221; tab.</li><li><em>(this point applies to 2.1.2 only)</em> <strong>Replace</strong> lines 222 and 223 in <strong>modules/files/index_table.php</strong><div
id="ig-sh-7" class="syntax_hilite"><div
class="code"><ol
class="php" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$r-&gt;dropTemp('files_count_max');</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$r-&gt;exec();</div></li></ol></div></div><p>with:</p><div
id="ig-sh-8" class="syntax_hilite"><div
class="code"><ol
class="php" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">//$r-&gt;dropTemp('files_count_max');</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">//$r-&gt;exec();</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">$sql = &quot;TRUNCATE TABLE files_count_max&quot;; db_exec($sql);</div></li></ol></div></div></li><li><strong>Optionally</strong>, if you want to improve the performance of dotProject specifically for these tables, change the &#8216;engine&#8217; for the above-mentioned tables to &#8216;memory&#8217;. To do that, execute the following SQL statements:<div
id="ig-sh-9" class="syntax_hilite"><div
class="code"><ol
class="sql" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #993333; font-weight: bold;">alter</span> <span
style="color: #993333; font-weight: bold;">table</span> tasks_problems engine<span
style="color: #66cc66;">=</span>memory;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #993333; font-weight: bold;">alter</span> <span
style="color: #993333; font-weight: bold;">table</span> tasks_critical engine<span
style="color: #66cc66;">=</span>memory;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #993333; font-weight: bold;">alter</span> <span
style="color: #993333; font-weight: bold;">table</span> tasks_sum engine<span
style="color: #66cc66;">=</span>memory;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #993333; font-weight: bold;">alter</span> <span
style="color: #993333; font-weight: bold;">table</span> tasks_summy engine<span
style="color: #66cc66;">=</span>memory;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #993333; font-weight: bold;">alter</span> <span
style="color: #993333; font-weight: bold;">table</span> tasks_users engine<span
style="color: #66cc66;">=</span>memory;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #993333; font-weight: bold;">alter</span> <span
style="color: #993333; font-weight: bold;">table</span> tasks_total engine<span
style="color: #66cc66;">=</span>memory;</div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #993333; font-weight: bold;">alter</span> <span
style="color: #993333; font-weight: bold;">table</span> files_count_max engine<span
style="color: #66cc66;">=</span>memory;</div></li></ol></div></div><p>This change will make MySQL keep these tables in RAM. As they are used as temporary tables, this decreases disk I/O a lot while working with dotProject. Of course, YMMV &#8211; to apply this change or not depends on where is your bottleneck.</li><p>Comments and further improvements are welcome.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F01%2F22%2Fdotproject-204-on-godaddy-shared-hosting.html&amp;linkname=dotProject%202.0.4%2F2.1.2%2F2.1.3%20on%20shared%20hosting" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F01%2F22%2Fdotproject-204-on-godaddy-shared-hosting.html&amp;linkname=dotProject%202.0.4%2F2.1.2%2F2.1.3%20on%20shared%20hosting" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F01%2F22%2Fdotproject-204-on-godaddy-shared-hosting.html&amp;linkname=dotProject%202.0.4%2F2.1.2%2F2.1.3%20on%20shared%20hosting" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F01%2F22%2Fdotproject-204-on-godaddy-shared-hosting.html&amp;linkname=dotProject%202.0.4%2F2.1.2%2F2.1.3%20on%20shared%20hosting" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F01%2F22%2Fdotproject-204-on-godaddy-shared-hosting.html&amp;linkname=dotProject%202.0.4%2F2.1.2%2F2.1.3%20on%20shared%20hosting" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2007%2F01%2F22%2Fdotproject-204-on-godaddy-shared-hosting.html&#038;title=dotProject%202.0.4%2F2.1.2%2F2.1.3%20on%20shared%20hosting" data-a2a-url="https://bogdan.org.ua/2007/01/22/dotproject-204-on-godaddy-shared-hosting.html" data-a2a-title="dotProject 2.0.4/2.1.2/2.1.3 on shared hosting"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2007/01/22/dotproject-204-on-godaddy-shared-hosting.html/feed</wfw:commentRss> <slash:comments>10</slash:comments> </item> </channel> </rss>