<?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>Error &#8211; LarryLai</title>
	<atom:link href="https://larrylai.com/tag/error/feed/" rel="self" type="application/rss+xml" />
	<link>https://larrylai.com</link>
	<description>兼聽則明 偏聽則暗</description>
	<lastBuildDate>Tue, 12 Mar 2019 18:03:16 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://larrylai.com/wp-content/uploads/2017/03/larrylai_com-favicon.png</url>
	<title>Error &#8211; LarryLai</title>
	<link>https://larrylai.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>PHP 7 &#038; Related Issues</title>
		<link>https://larrylai.com/php-7-related-issues/</link>
					<comments>https://larrylai.com/php-7-related-issues/#respond</comments>
		
		<dc:creator><![CDATA[larry]]></dc:creator>
		<pubDate>Tue, 12 Mar 2019 15:15:42 +0000</pubDate>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Middleware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[PHP7]]></category>
		<guid isPermaLink="false">http://larrylai.com/?p=3619</guid>

					<description><![CDATA[<p>Background After installing a WordPress plugin &#8211; WP Health, it&#8217;s reminded that PHP5 had no longer been supported since late 2018, thus there may be risk in all WordPress websites. Issue Since removing PHP5 (retrospectively known that it&#8217;s not necessary), and installed remi&#8217;s repository&#8217;s PHP72, some WordPress sites could not be accessed with message: &#8220;Internal [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://larrylai.com/php-7-related-issues/">PHP 7 &#038; Related Issues</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Background</h2>



<p>After installing a WordPress plugin &#8211; WP Health, it&#8217;s reminded that PHP5 had no longer been supported since late 2018, thus there may be risk in all WordPress websites.</p>



<h2 class="wp-block-heading">Issue</h2>



<p>Since removing PHP5 (retrospectively known that it&#8217;s not necessary), and installed remi&#8217;s repository&#8217;s PHP72, some WordPress sites could not be accessed with message: &#8220;Internal Server Error. The server encountered an internal error or misconfiguration and was unable to complete your request.&#8221; Then using VirtualBox&#8217;s snapshot to roll back and finally got every site back to normal.</p>



<p>However, using re-check configuration of Virtualmin to see if there&#8217;s anything need to follow up, it&#8217;s known that mod_actions of Apache wasn&#8217;t enabled. Then after enabling mod_actions by uncommenting the following: </p>



<pre class="wp-block-preformatted">LoadModule actions_module modules/mod_action.so<br></pre>



<p>in /etc/httpd/conf.modules.d/00-base.conf, something weird that instead of executing php page, these pages were downloaded. Some members on forums suggested that the following in /etc/httpd/conf.d/php.conf should be commented out:</p>



<pre class="wp-block-preformatted">SetHandler application/x-httpd-php</pre>



<p>This really solved the problem of not executing php pages, but another weird thing happened. Some other websites couldn&#8217;t be accessed again with message: 500 Internal Server Error.</p>



<h2 class="wp-block-heading">Solution</h2>



<ol class="wp-block-list"><li>The permission of some html directories all granted to 775 and changed owner as apache.</li><li>In Virtualmin, Server Config -> Website Options -> PHP script execution mode must select FPM if mod_fpm is installed and enable.</li></ol>



<h2 class="wp-block-heading">Tricks</h2>



<p>Before comment out SetHandler application/x-httpd-php, directory permission was not a problem. What and how does something change the permission or why is the permission of html directories should be further granted to eliminated 500 Internal Server Error?</p>



<h2 class="wp-block-heading">Config</h2>



<ul class="wp-block-list"><li>WordPress 5.1</li><li>Virtualmin 6</li><li>PHP7.2 remi</li><li>CentOS7</li></ul>
<p>The post <a rel="nofollow" href="https://larrylai.com/php-7-related-issues/">PHP 7 &#038; Related Issues</a> appeared first on <a rel="nofollow" href="https://larrylai.com">LarryLai</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://larrylai.com/php-7-related-issues/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
