<?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 Shafiq Alibhai</title>
    <link>https://www.shafiq.in/zh/tags/php/</link>
    <description>Recent content in PHP on Shafiq Alibhai</description>
    <generator>Hugo</generator>
    <language>zh-CN</language>
    <copyright>© 2009-2026 All rights reserved.</copyright>
    <lastBuildDate>Tue, 14 Jul 2020 09:11:45 +0000</lastBuildDate>
    <atom:link href="https://www.shafiq.in/zh/tags/php/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How To Install PHP (7.4, 7.3 &amp; 5.6) on Debian 9 Stretch</title>
      <link>https://www.shafiq.in/zh/blog/how-to-install-php-7.4-7.3-5.6-on-debian-9-stretch/</link>
      <pubDate>Tue, 14 Jul 2020 09:11:45 +0000</pubDate>
      <guid>https://www.shafiq.in/zh/blog/how-to-install-php-7.4-7.3-5.6-on-debian-9-stretch/</guid>
      <description>&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;a class=&#34;anchor&#34; href=&#34;#prerequisites&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Login to your Debian 9 system using shell access. For remote systems connect with SSH. Windows users can use Putty or other alternatives applications for SSH connection.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ssh root@debian9&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Run below commands to upgrade the current packages to the latest version.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo apt update &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo apt upgrade&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let&amp;rsquo;s execute the following commands to install the required packages first on your system. Then import packages signing key. After that configure PPA for the PHP packages on your system.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Display the Contents of a Node&#39;s Field as an Array in Drupal 6</title>
      <link>https://www.shafiq.in/zh/blog/how-to-display-the-contents-of-a-nodes-field-as-an-array-in-drupal-6/</link>
      <pubDate>Wed, 11 Sep 2013 09:32:05 +0000</pubDate>
      <guid>https://www.shafiq.in/zh/blog/how-to-display-the-contents-of-a-nodes-field-as-an-array-in-drupal-6/</guid>
      <description>&lt;p&gt;When you&amp;rsquo;re working with Drupal 6, it&amp;rsquo;s sometimes necessary to inspect the data stored in a node&amp;rsquo;s field. This is especially useful for debugging or when you&amp;rsquo;re trying to understand the structure of the content better. One quick way to achieve this is by dumping the field contents as an array. In PHP, the &lt;code&gt;var_export()&lt;/code&gt; function comes in handy for this purpose.&lt;/p&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s how to do it:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;var_export&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;content_fields&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;field_name_of_the_field&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;name_of_the_content_type&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;));&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In this snippet, replace &lt;code&gt;&#39;field_name_of_the_field&#39;&lt;/code&gt; with the actual name of the field you&amp;rsquo;re interested in and &lt;code&gt;&#39;name_of_the_content_type&#39;&lt;/code&gt; with the specific content type containing that field.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ERROR: phpize failed [solved]</title>
      <link>https://www.shafiq.in/zh/blog/error-phpize-failed-solved/</link>
      <pubDate>Mon, 17 Jan 2011 06:51:05 +0000</pubDate>
      <guid>https://www.shafiq.in/zh/blog/error-phpize-failed-solved/</guid>
      <description>&lt;p&gt;&lt;strong&gt;How to install PHP development files&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you want to run &lt;code&gt;phpize&lt;/code&gt; on your system, you need to install the development files of PHP first. Otherwise, you might get an error message like this:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sh: phpize: not found&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ERROR: &lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;phpize&lt;span class=&#34;err&#34;&gt;&amp;#39;&lt;/span&gt; failed&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To install the PHP development files on Ubuntu/Debian, you can use the following command in the terminal:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;apt-get install php5-dev&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That should solve the problem. 🙂&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Install PHP 5.3.1 on Ubuntu 64 bit and 32 bit</title>
      <link>https://www.shafiq.in/zh/blog/how-to-install-php-5.3.1-on-ubuntu-64-bit-and-32-bit/</link>
      <pubDate>Wed, 17 Mar 2010 07:33:06 +0000</pubDate>
      <guid>https://www.shafiq.in/zh/blog/how-to-install-php-5.3.1-on-ubuntu-64-bit-and-32-bit/</guid>
      <description>&lt;h2 id=&#34;yes-just-2-lines&#34;&gt;&amp;hellip;yes just 2 lines&lt;a class=&#34;anchor&#34; href=&#34;#yes-just-2-lines&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;for-ubuntu-x64&#34;&gt;For Ubuntu x64&lt;a class=&#34;anchor&#34; href=&#34;#for-ubuntu-x64&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;sudo su&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;cd /tmp &amp;amp;&amp;amp; mkdir php53 &amp;amp;&amp;amp; cd php53 &amp;amp;&amp;amp; wget &amp;amp;&amp;amp; wget &amp;amp;&amp;amp; dpkg -i *.deb &amp;amp;&amp;amp; echo &amp;ldquo;deb &lt;a href=&#34;http://php53.dotdeb.org&#34;&gt;http://php53.dotdeb.org&lt;/a&gt; stable all&amp;rdquo; &amp;raquo; /etc/apt/sources.list &amp;amp;&amp;amp; aptitude update &amp;amp;&amp;amp; aptitude install libapache2-mod-php5=5.3.1 apache2&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;for-ubuntu-32-bit-i386&#34;&gt;For Ubuntu 32 bit i386&lt;a class=&#34;anchor&#34; href=&#34;#for-ubuntu-32-bit-i386&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;sudo su&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;cd /tmp &amp;amp;&amp;amp; mkdir php53 &amp;amp;&amp;amp; cd php53 &amp;amp;&amp;amp; wget &amp;amp;&amp;amp; wget &amp;amp;&amp;amp; dpkg -i *.deb &amp;amp;&amp;amp; echo &amp;ldquo;deb &lt;a href=&#34;http://php53.dotdeb.org&#34;&gt;http://php53.dotdeb.org&lt;/a&gt; stable all&amp;rdquo; &amp;raquo; /etc/apt/sources.list &amp;amp;&amp;amp; aptitude update &amp;amp;&amp;amp; aptitude install libapache2-mod-php5=5.3.1 apache2&lt;/p&gt;</description>
    </item>
    <item>
      <title>9 skills developers will need in the next five years</title>
      <link>https://www.shafiq.in/zh/blog/9-skills-developers-will-need-in-the-next-five-years/</link>
      <pubDate>Sun, 12 Jul 2009 07:40:57 +0000</pubDate>
      <guid>https://www.shafiq.in/zh/blog/9-skills-developers-will-need-in-the-next-five-years/</guid>
      <description>&lt;p&gt;The economy is changing rapidly, and developers need to keep up with the latest trends and skills to stay relevant and competitive. Here is a list of 9 skills that every developer should master or at least be familiar with in the next five years. This list is not comprehensive, and it does not cover every niche or specialty in the industry. However, for most mainstream development scenarios, these skills will give you an edge over others and help you create better solutions. You should aim to learn at least seven of these skills well enough to use them confidently on the job and to demonstrate them in an interview.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
