{"id":1350,"date":"2011-05-20T12:06:25","date_gmt":"2011-05-20T16:06:25","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=1350"},"modified":"2013-03-20T08:44:21","modified_gmt":"2013-03-20T12:44:21","slug":"how-to-install-php-json-module-on-a-linux-plesk-server","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/how-to-install-php-json-module-on-a-linux-plesk-server","title":{"rendered":"How to install PHP-Json module on a Linux Plesk server?"},"content":{"rendered":"<p>To <strong>install\/enable Json support for PHP on a Linux Plesk server<\/strong>, follow the below steps:<\/p>\n<p><strong>1.<\/strong> Install php-pear and gcc<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># yum install php-pear gcc<\/span><\/pre>\n<\/blockquote>\n<p><strong>2.<\/strong> Install json module<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># pecl install json<\/span><\/pre>\n<\/blockquote>\n<p><strong>3.<\/strong> Now, the <strong>json.so file is created under the php lib directory i.e. \/usr\/lib64\/php\/modules\/<\/strong> and needs to be called in the json.ini so PHP configuration could read it.<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># cd \/etc\/php.d <\/span><\/pre>\n<pre><span style=\"color: #0000ff;\"># echo \"extension=json.so\" &gt;&gt; json.ini<\/span><\/pre>\n<\/blockquote>\n<p><strong>4.<\/strong> Once done, restart the httpd service<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># \/etc\/init.d\/httpd restart<\/span><\/pre>\n<\/blockquote>\n<p>This is it.<\/p>\n<p>However, the <strong>other way is to manually install the php-json module.<\/strong> Follow the below steps:<\/p>\n<p><strong>1. <\/strong>Download the json package<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># wget http:\/\/pecl.php.net\/get\/json-1.2.0.tgz<\/span><\/pre>\n<\/blockquote>\n<p><strong>2. <\/strong>Untar and goto the newly created directory<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># tar -zxf json-1.2.0.tgz <\/span><\/pre>\n<pre><span style=\"color: #0000ff;\"># cd json-1.2.0<\/span><\/pre>\n<\/blockquote>\n<p><strong>3.<\/strong> Create the configuration files and configure json<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># phpize <\/span><\/pre>\n<pre><span style=\"color: #0000ff;\"># .\/configure<\/span><\/pre>\n<\/blockquote>\n<p><strong>4.<\/strong> Create the installation file and install it<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># make <\/span><\/pre>\n<pre><span style=\"color: #0000ff;\"># make install<\/span><\/pre>\n<\/blockquote>\n<p>Once done, json.so will be created in \/usr\/lib64\/php\/modules\/ directory and needs to be called by the php configuration directory<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># cd \/etc\/php.d <\/span><\/pre>\n<pre><span style=\"color: #0000ff;\"># echo \u201cextension=json.so\u201d &gt;&gt; json.ini<\/span><\/pre>\n<\/blockquote>\n<p>Restart the httpd service and check the php-json module by executing<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># php -m | grep json<\/span><\/pre>\n<\/blockquote>\n<p><strong>Note<\/strong>:\u00a0 The manual installation method can be used on a plain Linux server as well, just the extension need to be added in the php.ini file directly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To install\/enable Json support for PHP on a Linux Plesk server, follow the below steps:<br \/>\n1. Install php-pear and gcc<\/p>\n<p># yum install php-pear gcc<\/p>\n<p>2. Install json module<\/p>\n<p># pecl install json<\/p>\n<p>3. Now, the json.so file is created under the php lib directory i.e. \/usr\/lib64\/php\/modules\/ and needs to be called in the json.ini so PHP configuration could read it.<\/p>\n<p># cd \/etc\/php.d<br \/>\n# echo &#8220;extension=json.so&#8221; &gt;&gt; json.ini<\/p>\n<p>4. Once done, restart the httpd service<\/p>\n<p># \/etc\/init.d\/httpd restart<\/p>\n<p>This is it.<br \/>\nHowever, the other way is to manually install the php-json module. Follow the below steps:<br \/>\n1. Download [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1145,4],"tags":[1243,1245,1239,1241,1240,1238,1244,1246],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1350"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=1350"}],"version-history":[{"count":8,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1350\/revisions"}],"predecessor-version":[{"id":2295,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1350\/revisions\/2295"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=1350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=1350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=1350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}