Category: Linux/Unix
-
Fix: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ if you are new to installing mysql server you might probably face this error quite often if you type mysql in the shell prompt. > mysql ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ To fix: First start the…
-
Install ModSecurity for Redhat/Centos
How to Install Mod_Security & Mod_Evasive ModSecurity is a free open source web application firewall which can help you to guard against LFI (local file inclusion attacks) and SQL injection vulnerabilities. ModEvasive offers protection against DOS (denial of service attacks) For Redhat/Centos with Cpanel Just go to Cpanel WHM > Plugins > Enable Mod_Security >…
-
Implementing Secure File Upload in PHP
Most PHP scripts and content management system scripts (CMS scripts) require writable permission 777 (rwxrwzrwz) to be set for certain folders for uploading photos and videos. Many security experts warn that setting 777 permission means that anybody can upload any content to your server, install malicious code, run unwanted programs and could potentially misuse your…
-
Easy Install FFmpeg in Linux
FFmpeg is so important if you are planning to run a video website with streaming with conversion of video files to different video formats. This tutorial is intended for Centos/Redhat versions of Linux where any novice user can install ffmpeg without compiling the source which is a more traditional way of installing the FFmpeg…
-
Implementing Secure File Upload in PHP
Most PHP file upload scripts and content management system scripts (CMS scripts) require writable 777 permissions (rwxrwzrwz) to be set for certain folders for uploading photos and videos. Many security experts warn that setting 777 permission means that anybody can upload any content to your server, install malicious code, run unwanted programs and could potentially…
-
Enabling ModRewrite in XAMPP Apache
XAMPP is a very good Linux server package w/ Apache, MySQL,PHP running in Windows just like server runs in linux. You can download http://www.apachefriends.org I noticed that by default mod-rewrite is not enabled with apache server coming with it. It is very important to enable this module if you want to rewrite URLs and generate…