<?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>PHP &#8211; Scott Mcintyre</title>
	<atom:link href="https://scott.cm/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>https://scott.cm</link>
	<description>Web Operations Engineer,  Linux Systems Administrator,  mySQL DBA,  MongoDB DBA,  Python+PHP Developer,  Performance Engineer</description>
	<lastBuildDate>Tue, 18 Jul 2017 08:53:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.2.3</generator>
	<item>
		<title>Install libmcrypt el6</title>
		<link>https://scott.cm/install-libmcrypt-el6/</link>
				<comments>https://scott.cm/install-libmcrypt-el6/#respond</comments>
				<pubDate>Wed, 29 May 2013 23:35:27 +0000</pubDate>
		<dc:creator><![CDATA[Scott Mcintyre]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[epel libmcrypt]]></category>
		<category><![CDATA[install libmcrypt]]></category>
		<category><![CDATA[install libmcrypt centos]]></category>
		<category><![CDATA[install libmcrypt el6]]></category>
		<category><![CDATA[install php libmcrypt]]></category>
		<category><![CDATA[php mcrypt]]></category>
		<category><![CDATA[php mcrypt centos 6]]></category>

		<guid isPermaLink="false">https://scott.cm/?p=244</guid>
				<description><![CDATA[When trying to compile PHP I noticed the libmcrypt package is no longer provided with EL6 / CentOS 6, checking whether to enable multibyte string support&#8230; no checking whether to enable multibyte regex support&#8230; yes checking whether to check multibyte regex backtrack&#8230; yes checking for external libmbfl&#8230; no checking for]]></description>
								<content:encoded><![CDATA[<p>When trying to compile PHP I noticed the libmcrypt package is no longer provided with EL6 / CentOS 6,</p>
<blockquote><p>
checking whether to enable multibyte string support&#8230; no<br />
checking whether to enable multibyte regex support&#8230; yes<br />
checking whether to check multibyte regex backtrack&#8230; yes<br />
checking for external libmbfl&#8230; no<br />
checking for mcrypt support&#8230; yes<br />
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
</p></blockquote>
<p>Checking if the package exists in the default repos shows it doesn&#8217;t,</p>
<blockquote><p>
# <strong>yum search libmcrypt</strong><br />
Loaded plugins: fastestmirror, security<br />
Loading mirror speeds from cached hostfile<br />
 * base: mirrors.versaweb.com<br />
 * extras: mirrors.usc.edu<br />
 * updates: mirrors.easynews.com<br />
Warning: No matches found for: libmcrypt<br />
No Matches found
</p></blockquote>
<p>You need to obtain this from the epel repos now at http://dl.fedoraproject.org/pub/epel/6/x86_64/ ,  at the time of writing the version is 2.5.8-9 so you can install this with,</p>
<blockquote><p>
mcryptver=2.5.8-9<br />
arch=x86_64<br />
rpm -Uhv http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-$mcryptver.el6.$arch.rpm<br />
rpm -Uhv http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-devel-$mcryptver.el6.$arch.rpm
</p></blockquote>
<p>An example,</p>
<blockquote><p>
# <strong>mcryptver=2.5.8-9</strong><br />
# <strong>arch=x86_64</strong><br />
# <strong>rpm -Uhv http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-$mcryptver.el6.$arch.rpm</strong><br />
Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-2.5.8-9.el6.x86_64.rpm<br />
warning: /var/tmp/rpm-tmp.BoLykl: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY<br />
Preparing&#8230;                ########################################### [100%]<br />
   1:libmcrypt              ########################################### [100%]<br />
# <strong>rpm -Uhv http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-devel-$mcryptver.el6.$arch.rpm</strong><br />
Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-devel-2.5.8-9.el6.x86_64.rpm<br />
warning: /var/tmp/rpm-tmp.6SW2Vh: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY<br />
Preparing&#8230;                ########################################### [100%]<br />
   1:libmcrypt-devel        ########################################### [100%]
</p></blockquote>
]]></content:encoded>
							<wfw:commentRss>https://scott.cm/install-libmcrypt-el6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>nginx rewrite PHP with no extension</title>
		<link>https://scott.cm/nginx-rewrite-php-with-no-extension/</link>
				<comments>https://scott.cm/nginx-rewrite-php-with-no-extension/#respond</comments>
				<pubDate>Thu, 17 Jan 2013 06:14:26 +0000</pubDate>
		<dc:creator><![CDATA[Scott Mcintyre]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[nginx access denied]]></category>
		<category><![CDATA[nginx rewrite no extension]]></category>
		<category><![CDATA[php no extension]]></category>
		<category><![CDATA[php-fpm limit_extensions]]></category>
		<category><![CDATA[php-fpm no extension]]></category>
		<category><![CDATA[security.limit_extensions]]></category>
		<category><![CDATA[security.limit_extensions = false]]></category>

		<guid isPermaLink="false">https://scott.cm/?p=214</guid>
				<description><![CDATA[I recently had to troubleshoot an issue while migrating from cherokee to nginx. This was a PHP application which had a shared set of common scripts , these where accessed by domain/common/file which in turn was translated into /vhosts/shared/common and this then included the necessary files. After doing the rewrite]]></description>
								<content:encoded><![CDATA[<p>I recently had to troubleshoot an issue while migrating from cherokee to nginx.    This was a PHP application which had a shared set of common scripts ,  these where accessed by domain/common/file which in turn was translated into /vhosts/shared/common and this then included the necessary files.</p>
<p>After doing the rewrite for nginx,</p>
<blockquote><p>
                location ^~ /common/ {<br />
                fastcgi_split_path_info ^(/common)(/?.+)$;<br />
                fastcgi_param SCRIPT_FILENAME /vhosts/shared/common$fastcgi_script_name;<br />
                fastcgi_param PATH_INFO $fastcgi_path_info;<br />
                fastcgi_pass   127.0.0.1:9000;<br />
                include        fastcgi_params;<br />
        }
</p></blockquote>
<p>nginx was simply returning access denied.</p>
<blockquote><p>
# curl http://localhost/common/file<br />
Access denied.
</p></blockquote>
<p>Which is because the new file has no extension and PHP-FPM now defaults to only allow .php.  This can be altered by editing security.limit_extensions in the php-fpm.conf (in this case /etc/php-fpm.d/daemon.conf) to allow the extensions you need.  In this case we needed it to support files without extensions so setting security.limit_extensions to FALSE done the job,</p>
<blockquote><p>
security.limit_extensions = FALSE
</p></blockquote>
]]></content:encoded>
							<wfw:commentRss>https://scott.cm/nginx-rewrite-php-with-no-extension/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
	</channel>
</rss>
