 
    
<?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>drupal Archives - Complete, Concrete, Concise</title>
	<atom:link href="https://complete-concrete-concise.com/tag/drupal/feed/" rel="self" type="application/rss+xml" />
	<link>https://complete-concrete-concise.com/tag/drupal/</link>
	<description>Practical Information Without The Bloat</description>
	<lastBuildDate>Sun, 01 Sep 2013 19:52:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>WordPress Generating Core Dumps</title>
		<link>https://complete-concrete-concise.com/web-tools/wordpress-generating-core-dumps/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Sun, 01 Sep 2013 19:52:59 +0000</pubDate>
				<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[account suspended]]></category>
		<category><![CDATA[core dump]]></category>
		<category><![CDATA[crashing]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[error_log]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">http://complete-concrete-concise.com/?p=3004</guid>

					<description><![CDATA[<p>Surprisingly, the culprit is probably PHP.</p>
<p>The post <a href="https://complete-concrete-concise.com/web-tools/wordpress-generating-core-dumps/">WordPress Generating Core Dumps</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="c1">
<p>Between 30-August-2013 and 01-September-2013, Complete, Concrete, Concise had its web hosting suspended with a demand that the WordPress installation be deleted.</p>
<p>Not wanting to delete my installation and then reinstall (and hopefully restore all data correctly), I investigated.</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2013/09/core-dump-1-big.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/09/core-dump-1-thumb.png" alt="" border="0" class="centered"/></a></p>
<div class="c2">
<p><strong>Note:</strong> this problem and solution is likely the same for any PHP based application &#8211; like Joomla! or Drupal.</p>
</div>
</div>
<h1>Symptoms</h1>
<p>Most likely, your web hosting provider will inform you that your account has been <strong><u>suspended</u></strong> because your WordPress (or other PHP based application) is generating a lot of core dumps and playing havoc with their server. In my case, I was asked to delete my WordPress installation.</p>
<p>Alternately, you may notice there are a lot of <code>core.xxxx</code> (xxxx being a four digit number) files in your WordPress directory.</p>
<h1>The Cause</h1>
<div class="c1">
<p>There may be other causes for core dumps, but this is what was causing mine.</p>
</div>
<p>When your <code>error_log</code>  file gets to be 2,147,483,647 bytes long, PHP will start crashing and generating core dumps. This is because PHP cannot handle files larger than 2GB.</p>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/09/core-dump-2.png" alt="" border="0" class="centered"/></p>
<p><code>error_log</code> is where PHP stores messages about any errors it encounters.</p>
<p>The most common cause of errors is a corrupt MySQL database file.</p>
<div class="c1">
<p>I suspect this is a fairly common problem but I could only find it mentioned <a href="http://www.stevenwoodson.com/blog/archives/2011/02/16/apache-2gb-file-limit/">here</a>.</p>
<p>PHP&#8217;s failure in dealing with files larger than 2<sup>31</sup> &#8211; 1 bytes long is documented <a href="http://de2.php.net/manual/en/function.filesize.php">here</a> (although, the expression &#8220;<u>unexpected behaviour</u>&#8221; doesn&#8217;t really do it justice). To be fair, the PHP documentation claims this is only a problem on 32-bit systems &#8211; however, since I don&#8217;t know if my web host is running a 32 or 64 bit version of Linux, I can&#8217;t say anything other than &#8220;it is really stupid to not fail gracefully at a known hard limit&#8221;.</p>
</div>
<h1>The Fix</h1>
<div class="c1">
<p>When your account is suspended, you will probably only have <code>ftp</code> access.</p>
</div>
<ol>
<li>Delete the file <code>error_log</code>.</li>
<li>rename <code>index.php</code> to something else (<code>xxx_index.php</code> is good)</li>
<li>inform your hosting provider that:
<ol>
<li>you suspect the problem was PHP&#8217;s inability to handle and <code>error_log</code> larger than 2GB and you have deleted it</li>
<li>you have deactivated your WordPress account by renaming <code>index.php</code> </li>
<li>you would like access to your account restored so you can run MySQL applications to check and repair your database if necessary</li>
</ol>
</li>
<li>Fix the database (if it is corrupted). Instructions for checking and repairing a database can be found <a href="//complete-concrete-concise.com/web-tools/when-your-website-stops-working-properly-it-may-be-a-corrupt-database">here</a>.</li>
<li>restore the name of the file in step (2) back to <code>index.php</code></li>
<li>go to your website and browse a few pages.</li>
<li>verify that <code>core.xxxx</code> files are not being generated. If they are being generated, than you probably have some other problem.</li>
<li>verify that the file <code>error_log</code> is not being generated. If it is being generated, it is a good idea to look at it and see what errors are occurring. Depending on how quickly <code>error_log</code> is growing, it might be a good idea to suspend your site again by renaming <code>index.php</code></li>
</ol>

<p>The post <a href="https://complete-concrete-concise.com/web-tools/wordpress-generating-core-dumps/">WordPress Generating Core Dumps</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>When Your Website Stops Working Properly, it may be a Corrupt Database</title>
		<link>https://complete-concrete-concise.com/web-tools/when-your-website-stops-working-properly-it-may-be-a-corrupt-database/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Thu, 14 Mar 2013 01:02:25 +0000</pubDate>
				<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[databse corrupt]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[site broken]]></category>
		<category><![CDATA[site not working]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">http://complete-concrete-concise.com/?p=2695</guid>

					<description><![CDATA[<p>This tutorial is for people using a web host that uses the cPanel interface (version 11.34.1). Instructions may be the same for other versions or interfaces, but not guarantee is made. When we set up a website, we expect it to keep working. Maybe we have to apply periodic updates and patches, but, in general, [&#8230;]</p>
<p>The post <a href="https://complete-concrete-concise.com/web-tools/when-your-website-stops-working-properly-it-may-be-a-corrupt-database/">When Your Website Stops Working Properly, it may be a Corrupt Database</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="c1">
<p>This tutorial is for people using a web host that uses the <u>cPanel</u> interface (version 11.34.1).</p>
<p>Instructions may be the same for other versions or interfaces, but not guarantee is made.</p>
</div>
<p>When we set up a website, we expect it to keep working. Maybe we have to apply periodic updates and patches, but, in general, we expect it to keep working.</p>
<p>Unfortunately, after a while, you may find your website, powered by Joomla!, WordPress, Drupal or some other CMS, stops working correctly.</p>
<p>Common symptoms include:</p>
<div class="c1">
<p>I have experienced all these on Joomla! and WordPress powered sites I run.</p>
</div>
<ul>
<li>Some or all of the comments disappear</li>
<li>Some or all of the content disappears</li>
<li>You get database connection errors</li>
<li>Your layout / template starts looking a bit funny</li>
<li>Pages you know exist start generating <code>HTTP 404 Not Found</code> errors</li>
<li>URLs start looking funny</li>
</ul>
<p>A common cause of these problems is a corrupted MySQL database.</p>
<div class="c1">
<p>There may be other reasons for these (and other) problems, but a corrupt database is one of them.</p>
</div>
<h1>Checking if the Database is Corrupted</h1>
<p><strong>1) Log into</strong> your web hosting control panel. This is <u>not</u> your website&#8217;s admin panel. For this tutorial, I am assuming it is <u>cPanel</u>. It might look something like this (this is how mine looks):<br />
<a href="//complete-concrete-concise.com/wp-content/uploads/2013/03/site-not-working-1-big.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/03/site-not-working-1-thumb.png" alt="" border="0" class="centered"/></a></p>
<p><strong>2) Click</strong> on <u>MySQL&reg; Databases</u>:<br />
<img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/03/site-not-working-2.png" alt="" border="0" class="centered"/></p>
<p><strong>3) Locate</strong> the section titled <u>Modify Databases</u>. On the line titled <u>Check DB:</u> <strong>select</strong> the database to check from the dropdown box. <strong>Click</strong> the button <u>Check DB</u> (located on the right side):</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2013/03/site-not-working-3-big.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/03/site-not-working-3-thumb.png" alt="" border="0" class="centered"/></a></p>
<div class="c1">
<p><strong>Note:</strong> if you only have one website hosted, then choosing the appropriate database is easy. If you have multiple sites, then you will have to figure out which database belongs to which site.</p>
<p>It does not hurt to check them all.</p>
</div>
<p><strong>4) Examine</strong> the report generated. There should be no errors. If there are errors, then your database is corrupted and needs to be repaired.</p>
<div class="c1">
<p><strong>Note:</strong> if your website is a busy website, you may get errors (usually something along the lines of <code>table not closed</code>) because the database is in the middle of being used. If you run the test again and the errors go away, then it probably is because the database was in use and not because the database is corrupted.</p>
</div>
<p>This is an example of a corrupted WordPress database:</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2013/03/site-not-working-4-big.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/03/site-not-working-4-thumb.png" alt="" border="0" class="centered"/></a></p>
<p>This is an example of a corrupted Joomla! database:</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2013/03/site-not-working-6-big.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/03/site-not-working-6-thumb.png" alt="" border="0" class="centered"/></a></p>
<h1>Repairing the Database</h1>
<div class="c4">
<p>This is <u>not</u> the recommended way, but it should work in most cases.</p>
<p>Most often, the problem is not with the actual database itself, but with the index files used to access the database.</p>
<p>You can read more about how it works <a href="http://dev.mysql.com/doc/refman/5.0/en/check-table.html">here</a> (warning, external site).</p>
<p>The preferred method is to restore the corrupted database with an up to date backup of your database. This supposes you have an up to date backup.</p>
</div>
<p><strong>1) Locate</strong> the section titled <u>Modify Databases</u>. On the line titled <u>Repair DB:</u> <strong>select</strong> the database to repair from the dropdown box. <strong>Click</strong> the button <u>Repair DB</u> (located on the right side):</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2013/03/site-not-working-5-big.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/03/site-not-working-5-thumb.png" alt="" border="0" class="centered"/></a></p>
<p>This will begin a repair operation on the database.</p>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/03/site-not-working-8.png" alt="" border="0" class="centered"/></p>
<p>After the operation has completed, check the database again. If there is still a problem, then run <u>Repair DB</u> again. I have, sometimes had to run it twice.</p>
<div class="c2">
<p>Afterwards, it does not hurt to check your site and content to ensure everything is ok. This is a lot of work if you have many articles to check.</p>
</div>
<h1>Restoring the Database from a Backup</h1>
<p><strong>1) Click</strong> on Backups (located on your cPanel home page):</p>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/03/site-not-working-9.png" alt="" border="0" class="centered"/></p>
<p><strong>2) Locate</strong> the section called <u>Restore a MySQL Database</u> and <strong>click</strong> on <u>Browse…</u> and select the backup database from your computer. <strong>Click</strong> on <u>Upload</u> to upload the database.</p>
<p>During this process, not much may seem to be happening.</p>
<p>The backup database has to be uploaded from your system to your service provider.</p>
<p>Once it is uploaded to the service provider, the existing database is rebuilt from the uploaded one.</p>
<p>The whole process looks something like this:</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2013/03/site-not-working-11-big.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/03/site-not-working-11-thumb.png" alt="" border="0" class="centered"/></a></p>
<p>What you see happening is a whole bunch of MySQL transactions that delete the contents of the old database and replace it with the contents of the backup database.</p>
<p>If you are interested in database development, this is a good instructional example of some MySQL commands in action.</p>
<div class="c2">
<p>Restoring from backup, means you will lose any changes that occurred from the time of the backup until the time of the database corruption. Normally, this will be things like: comments, registrations, traffic information (if thissort of thing is stored in the database). While these things vary in importance, I believe the most important thing is the content.</p>
</div>

<p>The post <a href="https://complete-concrete-concise.com/web-tools/when-your-website-stops-working-properly-it-may-be-a-corrupt-database/">When Your Website Stops Working Properly, it may be a Corrupt Database</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
