<?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>SupportSages &#187; 500 ISE</title>
	<atom:link href="http://www.supportsages.com/blog/tag/500-ise/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.supportsages.com/blog</link>
	<description>Technical Support and Server Management : Musings in the fox hole.</description>
	<lastBuildDate>Thu, 05 Jan 2012 03:05:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Why are you getting 500 internal server error on your php pages</title>
		<link>http://www.supportsages.com/blog/2009/04/why-are-you-getting-500-internal-server-error-on-your-php-pages/</link>
		<comments>http://www.supportsages.com/blog/2009/04/why-are-you-getting-500-internal-server-error-on-your-php-pages/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 14:39:23 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[cPanel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[500 ISE]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[suPHP]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=85</guid>
		<description><![CDATA[Usually this happens in a suPHP environment. There could be few reasons why this could happen. We list here a few. The solution is intended for those with shell access.
<ul>
	<li><strong>Ownership issues</strong>
In a suPHP environment, depending on the mode of suPHP enabled on the VPS or server, there is a min_uid setting, which is configurable in suPHP.conf under /etc or /usr/local/etc or /opt/suphp/etc . By default the setting is 100, which means if the file is owned by a UID less than that value (100), it shouldn't parse the php code and will result in 500 Internal Server Error. In a ...]]></description>
			<content:encoded><![CDATA[<p>Usually this happens in a suPHP environment. There could be few reasons why this could happen. We list here a few. The solution is intended for those with shell access.</p>
<ul>
<li><strong>Ownership issues</strong><br />
In a suPHP environment, depending on the mode of suPHP enabled on the VPS or server, there is a min_uid setting, which is configurable in suPHP.conf under /etc or /usr/local/etc or /opt/suphp/etc . By default the setting is 100, which means if the file is owned by a UID less than that value (100), it shouldn&#8217;t parse the php code and will result in 500 Internal Server Error. In a cPanel server, the error will be shown @ /usr/local/apache/logs/suphp.log. This restriction would enable better security, since even if a php can do some privilege escalation, it wont affect the server. Solution would be</p>
<blockquote><p>chown your_username.your_username path_of_your_php_file</p></blockquote>
<p>If that fixes only that file and not your entire php files, use the below command to change all the php files.</p>
<blockquote><p>find . -type f -name &#8220;*.php&#8221; -exec chown username.username {} \;<br />
find . -type d -exec chown username.username {} \;</p></blockquote>
<p>Ignore &#8220;*.php&#8221; in the above command if it still errors out for a php file. If it still don&#8217;t fix, move on to other solutions below.</li>
<li><strong>Permission issues</strong><br />
It could be the world writable directories or files which is causing the issue. In a non-suphp environment, if a php script has to upload a file on a folder, (eg:  php based gallery script where customers are able to upload photos) inorder to get it uploaded to the folder, it needs to have world writable permissions. Or else apache can&#8217;t write to the folder. Here in suPHP, since the php is executed as the user itself who already have the permissions you don&#8217;t need to change it to 777 permissions and is happy with 755 (rwxr-xr-x) permissions. When a customer is moved from a non suPHP env to suPHP enabled server, we need to adjust the permissions then. Often a command like below should help</p>
<blockquote><p>find . -name &#8220;*.php&#8221; -type f -exec chmod 644 {} \;<br />
find . -type d -exec chmod 755 {} \;</p></blockquote>
<p>Often, you can do the above command without the -name &#8220;*.php&#8221; in the command.</li>
<li><strong>suphp.log exceeds 2GB size.</strong>If the entire servers&#8217; php application gives you internal server error, next chance is that the suPHP log has exceeded 2GB space. Just clear the file and you are on track again. To null it, execute the command below. Below command assumes you are having the issue in a cPanel server<br />
<blockquote><p>cat /dev/null &gt; /usr/local/apache/logs/error_log</p></blockquote>
</li>
<li><strong>suPHP log don&#8217;t exist </strong><br />
In a Plesk or Webmin or other servers, often the suPHP will be installed but /var/log/httpd or such folders where the suPHP.log can be created wont exist. suphp can understand and create a non-existent suphp.log, but you would need to manually create the folder /var/log/httpd. I hope you know how to create a folder though.</li>
<p>If you know any other cases which require another solution for this, please comment here or edit the blog.</ul>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=Why+are+you+getting+500+internal+server+error+on+your+php+pages+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F85" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=Why+are+you+getting+500+internal+server+error+on+your+php+pages+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F85" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2009/04/why-are-you-getting-500-internal-server-error-on-your-php-pages/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Internal server errors while accessing Fantastico and phpmyadmin in cPanel &amp; WHM</title>
		<link>http://www.supportsages.com/blog/2009/04/internal-server-errors-while-accessing-fantastico-and-phpmyadmin-in-cpanel-whm/</link>
		<comments>http://www.supportsages.com/blog/2009/04/internal-server-errors-while-accessing-fantastico-and-phpmyadmin-in-cpanel-whm/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 07:44:12 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[cPanel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[500 ISE]]></category>
		<category><![CDATA[Fantastico]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=36</guid>
		<description><![CDATA[Not a common issue. But sometimes this happens. If you have noticed, when you are logged into cPanel or WHM using the root password, you wont be able to install Fantastico applications or access MySQL DBs using phpmyAdmin. Most of the times, the error occurs will be similar to below

<blockquote>Internal Server Error

Premature end of script headers: php: Please check /usr/local/cpanel/logs/error_log for the exact error.</blockquote>

So far, the solution of this issue didn't get complicated and a simple recompilation of cPanel PHP used to solve the error. To recompile cPanel PHP, issue the command below

<strong><code>/scripts/makecpphp</code></strong>

This would make sure that cPanel PHP, suPHP ...]]></description>
			<content:encoded><![CDATA[<p>Not a common issue. But sometimes this happens. If you have noticed, when you are logged into cPanel or WHM using the root password, you wont be able to install Fantastico applications or access MySQL DBs using phpmyAdmin. Most of the times, the error occurs will be similar to below</p>
<blockquote><p>Internal Server Error</p>
<p>Premature end of script headers: php: Please check /usr/local/cpanel/logs/error_log for the exact error.</p></blockquote>
<p>So far, the solution of this issue didn&#8217;t get complicated and a simple recompilation of cPanel PHP used to solve the error. To recompile cPanel PHP, issue the command below</p>
<p><strong><code>/scripts/makecpphp</code></strong></p>
<p>This would make sure that cPanel PHP, suPHP and other permissions will get set properly. Good luck.</p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=Internal+server+errors+while+accessing+Fantastico+and+phpmyadmin+in+cPanel+%26+WHM+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F36" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=Internal+server+errors+while+accessing+Fantastico+and+phpmyadmin+in+cPanel+%26+WHM+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F36" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2009/04/internal-server-errors-while-accessing-fantastico-and-phpmyadmin-in-cpanel-whm/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

