Scripting Languages

[Solved] SocketException Permission denied - CakePHP

cakephp-logo

CakePHP is a PHP development framework used in many projects. CakePHP supports sending mail via built in mail functions of PHP, smtp server. One may face following error message while sending mail: SocketException Permission denied - CakePHP The issue is related to the SELinux policy of the OS. SELinux forbid PHP/Apache to make network connections. In this case, one has …

Read More »

[Solved] libxslt is missing. please visit http://nokogiri.org

While installing Nokogiri on Ubuntu, you may get stuck with error libxslt is missing. please visit http://nokogiri.org/ The error occurs due to missing dependencies required for installing Nokogiri on Ubuntu. Install dependencies: sudo apt-get install libxslt-dev libxml2-dev Install Nokigiri: sudo gem install nokogiri The more information related to Nokogiri installation can be found here. While installing Nokogiri on Ubuntu, you …

Read More »

Disk space usage alert script - Linux

shell image

The disk space usage script is created to check the disk space usage and send alerts when disk space usage is critical. #Purpose: Script to check disk space usage and send alert on critical usage. #Created by: Abhijit Sandhan ##################################################### df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $6 }' | while read output; do …

Read More »

How to install PHP pear mail on CentOS & RedHat

php logo

The PHP mail() function is use inside PHP scripts to send emails. This is the simplest way to send emails but not secure. Sometimes, the PHP mail() function might be missing and scripts migh start displaying warning/error messages. In this case, install PHP Mail extension using PEAR. This is simple and east way. 1) Make sure PHP PEAR is present …

Read More »