<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Php on Daniel Pomfret</title>
    <link>https://pomfret.uk/tags/php/</link>
    <description>Recent content in Php on Daniel Pomfret</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>© Daniel Pomfret</copyright>
    <lastBuildDate>Mon, 05 Feb 2018 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://pomfret.uk/tags/php/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Install PHP 5.6 on CentOS/RHEL 7 via YUM (Webtatic and IUS)</title>
      <link>https://pomfret.uk/posts/install-php-5-6-centos-rhel-7-via-yum-webtatic-ius/</link>
      <pubDate>Mon, 05 Feb 2018 00:00:00 +0000</pubDate>
      <guid>https://pomfret.uk/posts/install-php-5-6-centos-rhel-7-via-yum-webtatic-ius/</guid>
      <description>&lt;p&gt;Again, another brain dump for future use. A stock installation of CentOS 7 will be packaged with PHP 5.4 which is now end of life. This is how to install PHP 5.6, which is currently only receiving security updates.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Side note: These commands install the basic &lt;a href=&#34;http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-centos.html&#34;&gt;PHP requirements for Magento&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;installing-php-56-on-centos-7-via-webtatic&#34;&gt;Installing PHP 5.6 on CentOS 7 via Webtatic&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ yum install php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring php56w-bcmath php56w-soap&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;&#xA;&lt;h3 id=&#34;installing-php-56-on-centos-7-via-ius&#34;&gt;Installing PHP 5.6 on CentOS 7 via IUS&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ yum -y install epel-release &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ wget https://centos6.iuscommunity.org/ius-release.rpm &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ rpm -Uvh ius-release*.rpm yum -y update yum -y install php56u php56u-opcache php56u-xml php56u-mcrypt php56u-gd php56u-devel php56u-mysql php56u-intl php56u-mbstring php56u-bcmath php56u-soap&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;&#xA;&lt;p&gt;You can also install php-fpm via these repositories. For example: &lt;strong&gt;yum install php56w-fpm&lt;/strong&gt; (webtatic) or &lt;strong&gt;yum install php56u-fpm&lt;/strong&gt; (ius)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Basic Steam RCON Example (Rust)</title>
      <link>https://pomfret.uk/posts/basic-steam-rcon-example-rust/</link>
      <pubDate>Sun, 22 Jan 2017 00:00:00 +0000</pubDate>
      <guid>https://pomfret.uk/posts/basic-steam-rcon-example-rust/</guid>
      <description>&lt;p&gt;After spending time over Christmas coding a tool to query Steam servers for information. I&amp;rsquo;ve now been taking the next steps&amp;hellip; Sending data to a Steam server!&lt;/p&gt;&#xA;&lt;p&gt;For this example, I&amp;rsquo;m going to be using a Rust Dedicated Server, to send a simple command, then in future posts show how I sent scheduled commands (such as adverts, messages and other routine tasks which you would expect a Rust server to run).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Querying Source Servers with PHP : Part 2</title>
      <link>https://pomfret.uk/posts/querying-source-servers-php-part-2/</link>
      <pubDate>Wed, 11 Jan 2017 00:00:00 +0000</pubDate>
      <guid>https://pomfret.uk/posts/querying-source-servers-php-part-2/</guid>
      <description>&lt;p&gt;So I have my JSON data which contains all the query information which was returned from the Source Query Protocol. I&amp;rsquo;m storing it as a flat JSON file - the reason being (as discussed in my &lt;a href=&#34;https://pomfret.uk/posts/querying-source-servers-php-part-1/&#34;&gt;last post&lt;/a&gt;) is simply due to speed (or the assumption it would be faster). I don&amp;rsquo;t want to be getting into caching database queries, optimising the indexes, normalisation etc&amp;hellip; As this project is for fun, let&amp;rsquo;s just store the JSON on the file system, and pull the data out when we need it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Querying Source Servers with PHP : Part 1</title>
      <link>https://pomfret.uk/posts/querying-source-servers-php-part-1/</link>
      <pubDate>Tue, 03 Jan 2017 00:00:00 +0000</pubDate>
      <guid>https://pomfret.uk/posts/querying-source-servers-php-part-1/</guid>
      <description>&lt;p&gt;Over the Christmas Period, I decided to develop a website to monitor the multitude of gaming servers that I host. As a game server provider, I&amp;rsquo;ve often wondered how many players are actively playing across the network.&lt;/p&gt;&#xA;&lt;p&gt;For this, I decided to use a simple LEMP (Linux, NGINX, MySQL, PHP) environment. Furthermore, I wanted this website to be heavily reliant on JSON data, and would try to avoid pulling data from MySQL where possible - as I&amp;rsquo;m assuming pulling from a JSON file (using caching), is faster than from MySQL.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Shorthand If/Else (ternary) Statements - C#, C&#43;&#43;, Python &amp; PHP</title>
      <link>https://pomfret.uk/posts/shorthand-ifelse-ternary-statements-c-c-python-php/</link>
      <pubDate>Mon, 05 Dec 2016 00:00:00 +0000</pubDate>
      <guid>https://pomfret.uk/posts/shorthand-ifelse-ternary-statements-c-c-python-php/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been going through the multiple languages I know recently, and refreshing my knowledge. After working with Python for a few months, I found going back to C# very easy.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve noticed many similarities except for a few; In my opinion the ternary operator slightly differs from each language. So I&amp;rsquo;d thought I&amp;rsquo;d write these findings down for future use.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;C# &amp;amp; C++&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;variable = (input &amp;gt; 0) ? &amp;rsquo;true&amp;rsquo; : &amp;lsquo;false&amp;rsquo;;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
