How to enable JSON support for PHP in CentOS/Plesk

If you  want to install / enable JSON support for PHP then  
follow the below steps :
  [email protected][#] yum update “*php*”
  [email protected][#] yum install php-pear
  [email protected][#] yum install gcc
  [email protected][#] pecl install json
  [email protected][#] cd /etc/php.d/
  [email protected][#] echo “extension=json.so” >> json.ini
  [email protected][#] /etc/init.d/httpd restart 

Or

If you want to manually install  JSON then  you can download and install 
it from  here : http://pecl.php.net/package/json


That’s all  you are done.

How to check Plesk version from Shell ?

If you want to  check  the Plesk version on the  server from  Shell or SSH  the you just need to execute the below commands :

[email protected][#]  cat /usr/local/psa/version

it will  show the output as :

9.5.2 CentOS 5 95100504.12

Or

[email protected][#] rpm -q psa
It will show the output as :
psa-9.5.2-cos5.build95100504.12

That’s all , easy isn’t it.

spamd has failed, please contact the sysadmin

If spamd is not running on your server means there is some problem with installation of SpamAssassin, so to fix this you need to re-install SpamAssassin on the server. Follow the below steps to install SpamAssassin on your server :

[email protected][#] cd /home/.cpan/sources/authors/id/J/JM/JMASON/
here you found spamAssassin tar.gz file.
[email protected] [/home/.cpan/sources/authors/id/J/JM/JMASON]# ll

total 1196
drwxr-xr-x 3 root root 4096 Mar 13 16:11 ./
drwxr-xr-x 5 root root 4096 Mar 13 16:07 ../
-rw-r–r– 1 root root 4179 Mar 13 16:07 CHECKSUMS
drwxr-xr-x 11 mysql bin 4096 Mar 16 2010 Mail-SpamAssassin-3.3.1/
-rw-r–r– 1 root root 1196842 Mar 13 16:07 Mail-SpamAssassin-3.3.1.tar.gz

Now copy CHECKSUMS in /home/.cpan/sources/authors/id/cPCPAN/
[email protected][/home/.cpan/sources/authors/id/J/JM/JMASON]#
cp CHECKSUMS /home/.cpan/sources/authors/id/cPCPAN/

[email protected][#] /scripts/perlinstaller --force Mail::SpamAssassin

This will forcefully install SpamAssassin

Finally restart the exim service this will update the spam database
Now check the status, it will surely work for you now.
[email protected][#] /scripts/restartsrv_spamd --status
 spamd (spamd child) running as root with PID 9821

That’s all easy isn’t it.