Articles

Affichage des articles du février, 2013

A Data Scientist's View On Skills, Tools, And Attitude

Image
I recently came across this interview (thanks Dharini for the link!) with Nick Chamandy, a statistician a.k.a a data scientist at Google. I would encourage you to read it; it does have some great points. I found the following snippets interesting: Recruiting data scientists: When posting job opportunities, we are cognizant that people from different academic fields tend to use different language, and we don’t want to miss out on a great candidate because he or she comes from a non-statistics background and doesn’t search for the right keyword. On my team alone, we have had successful “statisticians” with degrees in statistics, electrical engineering, econometrics, mathematics, computer science, and even physics. All are passionate about data and about tackling challenging inference problems. I share the same view. The best scientists I have met are not statisticians by academic training. They are domain experts and design thinkers and they all share one common trait: they love data!

NJVC Announces Winner of Cloudcuity AppDeployer Contest Pilot at George Mason University

Image
CHANTILLY, Va., Feb. 25, 2013— NJVC , an information technology solutions provider headquartered in northern Virginia, is pleased to announce the winner of the George Mason University (GMU) Student PaaS Developer Contest. For the contest, students used the Cloudcuity AppDeployer platform as a service (PaaS) to develop business software-as-a-service (SaaS) applications in the cloud. The winning team entry, “Nimbus Solution Scheduler,” is a workforce scheduling application.    The Nimbus Solution Scheduler team members—James Hays (team leader),  Christopher Le, Anthony Nester and Ed Rubins—each received a monetary award and certificate for their innovative application. The students were honored at a special ceremony on February 22 during National Engineering Week at the Volgeneau School of Engineering Nguyen Engineering Building, Fairfax, Va. Donald Gantz , Ph.D., chair of the GMU Applied Information Technology Department attended the ceremony. The GMU contest is serving a

Add SPF and Domainkeys in cPanel

If you have a cPanel based server, adding an SPF record or domain keys entries for domains are so much easier than manually entering them. cPanel provides the following scripts/commands to help us through this task: # /usr/local/cpanel/bin/domain_keys_installer # /usr/local/cpanel/bin/spf_installer Note:: This would add the records for all domains under this cPanel account. Meaning for all Addon domains too.

Database size doesn't get updated in cPanel.

If the database inside the cPanel shows 0 mb, it is because the database cache file of the user is not updated.  To fix this, login to server via SSH and edit the below file: vi /var/cpanel/cpanel.config check disk_usage_include_sqldbs=0 and change it to disk_usage_include_sqldbs=1, if the line noe found, simply add it to the bottom.  You can do the same via WHM >> Main >> Server Configuration >> Tweak Settings >> SQL >> Include databases in disk usage calculations >> Set that to On. Then run the below command: /scripts/update_db_cache

Bahrain International eGovernment Forum 2013

Image
I am honored to announce that I will be a speaker at the Bahrain International eGovernment Forum , April 8-10, 2013, being held at the Ritz-Carlton Bahrain Hotel and Spa, in Manama, Bahrain. Under the Patronage of His Highness Shaikh Mohammed bin Mubarak Al Khalifa , Deputy Prime Minister and Chairman of the Supreme Committee for Information and Communication Technology (SCICT), the highly-anticipated Bahrain International eGovernment Forum has cemented its place as one of the region's leading ICT events, growing steadily and expanding its reach year-by-year. It aims to share and exchange productive technological concepts, exhibit and highlight innovations as well as provide a platform for the latest technological practices and trends through featuring numerous up-to-date topics and workshops that embrace Innovation and Open Data, Mobile Trends, Cloud Computing and Shared Services, Social Networks, and eGovernment. Planned workshops include:   ICT and Entrepreneurship - Aims to

How to enable alternate port for exim?

Exim is a mail transfer agent (MTA) used on Linux/Unix-like operating systems. It is freely available under the GNU GPL and it aims to be a general and flexible mailer with extensive facilities for checking incoming e-mail. Normally default port for exim is 25. but most of the ISP block port 25. so it is necessary that an altername port for exim is open on server. Following are the steps to configure alternate port on cpanel/WHM installed on the server. 1) Login to WHM as root. 2) In WHM click on  Main >> Service Configuration >> Service Manager 3) Now tick the check box under Exim on another port and also enter the alternate port no: in the corresponding text box.

Not able to login to Horde?

Many times it happens that horde wont allow user to login to webmail. Try following command to fix the issue root@server[~]#/usr/local/cpanel/bin/checkperlmodules root@server[~]#/scripts/fullhordereset root@server[~]#myisamchk -r /var/lib/mysql/horde/horde_sessionhandler.MYI If still you have problem then check the ownership for session directory present in /var/cpanel/userhomes/cpanelhorde directory. root@server[~]#ll /var/cpanel/userhomes/cpanelhorde drwx–x–x 4 cpanelhorde cpanelhorde 4096 June 5 2012 ./ drwx–x–x 7 root root 4096 Dec 17 01:48 ../ drwxr-x— 2 cpanelhorde cpanelhorde 4096 June 5 2012 mail/ drwx—— 2 cpanelhorde cpanelhorde 4096 Jan 27 14:01 sessions/ Session directory should be cpanelhorde.cpanelhorde ownership recursively

How to Enable html view for horde?

Login to shell using root user and follow the following steps to enable HTML view of horde webmail. root@server[~]# vi /usr/local/cpanel/base/horde/imp/config/mime_drivers.php Search for the line —- /** * HTML driver settings */ $mime_drivers['imp']['html']['inline'] = false; —– and replace it with ——– /** * HTML driver settings */ $mime_drivers['imp']['html']['inline'] = true; ——– Save the changes and restart the following services. root@server[~]#service cpanel restart root@server[~]#/scripts/restartsrv_courier

Mysql error : Can’t create new tempfile: ‘*.TMD file

If you are getting error like Can’t create new tempfile: ‘tablesname.TMD file error while repairing corrupted database tables please try use following command to fix it. Solution :  You need to just run below command on the shell. # myisamchk -r -f  tables.MYI Thats all.

Repairing corrupted mysql database !!

Sometimes it happens that your database get corrupted due to many reason like it does not get restored properly or server get rebooted while updating database etc…. and you have tried to repair it using phpmyadmin and it does shows that it has repaired but it is not. Solution : Login to server with root access Stop mysql using following command /etc/init.d/mysql stop Run following command to check all teh tables in teh database /usr/bin/myisamchk /var/lib/mysql/databasename/*.MYI Run following command to repair all teh tables in the database /usr/bin/myisamchk -r /var/lib/mysql/databasename/*.MYI Then recheck again using following command /usr/bin/myisamchk /var/lib/mysql/databasename/*.MYI Restrart MySql service using following command /etc/init.d/mysql restart

Magento – “Failed to mkdir” Error

 Magento – “Failed to mkdir” Error Many times when you try to install a new theme or application from "Magento Connect Manager” , you may encounter the error : ERROR: failed to mkdir To fix this issue follow the below steps : root@server[#] cd /home/username/public_html/downloader root@server[#] vi config.ini It will show something like this : preferred_state=stable use_custom_permissions_mode=1 mkdir_mode=0777 chmod_file_mode=0777 chmod_file_mode_executable=0777 tmp_dir=../var/tmp Now make the below changes : preferred_state=stable use_custom_permissions_mode=0 mkdir_mode=0777 chmod_file_mode=0777 chmod_file_mode_executable=0777 tmp_dir=../var/tmp That’s all you are done.

syslogd status failed in WHM

Sometimes, you may face an issue related to syslogd showing down in service WHM >>  Main >> Server Status >> Service Status The issue can be resolved by Checking related RPM on server # rpm -q sysklogd If its not installed, you can install it by # yum install sysklogd after installation, you will have to restart the service by # /etc/init.d/syslog restart Check the service in Service Manager in WHM, reenable it and check the status in Service Status. Its done!

Fatal error: Unable to read 32654 bytes in /home/xxx/public_html/includes/functions.php on line 0

For zend encoded files, you may face following error Fatal error: Unable to read 32654 bytes in /home/xxx/public_html/includes/functions.php on line 0 Its most probable the related files for the script are uploaded in ASCII mode, all encoded files must be uploaded in binary mode. 01. You need to reupload all files in binary mode, or set the transfer mode to auto in FTP client. 02. Check if short_open_tags in set as On in PHP configuration ie php.ini 03. Check if you have updated versions for Zend optimizer or ionCube loaders. In most cases, files reupload in binary mode resoves the issue.

Commoditizing Data Science

Image
My ongoing conversations with several people continue to reaffirm my belief that Data Science is still perceived to be a sacred discipline and data scientists are perceived to be highly skilled statisticians who walk around wearing white lab coats. The best data scientists are not the ones who know the most about data but they are the ones who are flexible enough to take on any domain with their curiosity to unearth insights. Apparently this is not well-understood. There are two parts to data science: domain and algorithms or in other words knowledge about the problem and knowledge about how to solve it. One of the main aspects of Big Data that I get excited about is an opportunity to commoditize this data science—the how—by making it mainstream. The rise of interest in Big Data platform—disruptive technology and desire to do something interesting about data—opens up opportunities to write some of these known algorithms that are easy to execute without any performance penalty. Run K Me

How to Remove/uninstall MailScanner !!

To remove MailScanner and the MailScanner Front-End, run these commands in shell as root: cd /usr/mscpanel sh uninstall.msfe.sh cd /root wget http://www.configserver.com/free/msinstall.tar.gz tar -xzf msinstall.tar.gz cd msinstall/ sh uninstall.sh Remove the sare rules and MailScanner-specific SpamAssassin configuration files (in shell as root): cd /etc/mail/spamassassin/ rm -fv *sare* configserver.cf mailscanner.cf To remove the MailScanner Configuration icon from cPanel, go to WHM > Packages > Feature Manager. Edit the "disabled" Feature List and uncheck the box for MailScanner Configuration. Remove the root cron jobs that run mscpanel.pl, sa_rules.sh (or rules_du_jour), and the cronjob that restarts clamd (in shell as root): crontab -e Remove the following lines (if they exist - they may or may not be there) from /scripts/postupcp: #!/bin/sh perl /usr/mscpanel/mscheck.pl Reset Exim Configuration (if desired), in WHM > Exim Configuration Editor > Reset All Confi

Plesk External component has thrown an exception

Following error can come in plesk control panel while setting up/updating physical hosting for a domain in the plesk control panel... ------------------ External component has thrown an exception. In IIS7NativeProvider module Exception type: System.Runtime.InteropServices.SEHException at _CxxThrowException(Void* , _s__ThrowInfo* ) at ServerManagerFactory.getHttpRedirectSection(String location) at IIS7ServerManager.getSitesInfo(IIS7ServerManager* , list :allocator >* sitesInfo) ----------------- Here is the quick workaround : Open IIS, expand sites. In my case, I found an entry "SITE_*****" under sites which was stopped. I was not able to delete it directly from IIS. I used the following command to remove the entry from IIS. ------------------- C:\> cd %systemroot%\System32\inetsrv C:\Windows\System32\inetsrv>APPCMD delete site SITE_***** SITE object "SITE_*****" deleted ------------------- You need to restart the IIS. If you still find the entry "SITE

Inbound spam to domain/email users

Inbound spam is the scourge of the modern internet and, the inconvenience to users aside, can cause serious performance and resource issues on the server. These can affect both the server overall and the timely deliver of clean email in particular. The best way to tackle inbound spam is at the entry point into the server - the MTA, i.e. exim the SMTP server of choice for cPanel. By blocking spam before it has even entered the server you save both on server resources used when delivering the email in addition to 3rd party tools to help detect spam further along the email relay process. To do this you need to do work at the RCPT stage of the SMTP protocol. This occurs during the transaction between the sender and recipient SMTP servers and comes before the actual body of an email arrives on a server. The primary form of spam attack is the Dictionary Attack: A common technique for spammers to use is what is known as a dictionary attack on a domain. A dictionary attack, in our context, is

Access denied for user 'mailwatch'@'localhost' (using password: YES)

In MailWatch I am getting MySQL Errors such as "Could not connect to database: Access denied for user 'mailwatch'@'localhost' (using password: YES)". How can I fix it? perl /usr/local/cpanel/whostmgr/docroot/cgi/mailwatch/install/mwadd.pl Above command should fix your issue.

Wordpress showing Blank page !!

If WordPress Permalink shows blankpage, do below [root@server1 ~]# vi /wp-admin/includes/misc.php and change the line as indicated below Search for function got_mod_rewrite and replace below like in it . From $got_rewrite = apache_mod_loaded(‘mod_rewrite’, true); //old line with false negative; To $got_rewrite = true;//force the response to true as we know mod_rewite is installed

enable or disable mod_security for particulate account[error for mod_security, access denied with error code 403]

===================================================== If you are receiving the error for mod_security, access denied with error code 403 when you check the error logs for any account. You can disable the mod_security for that account by adding a ===================================================== simple code in his .htaccess ================== SecFilterEngine Off SecFilterScanPOST Off ========================== And to enable just remove these two line from .htaccess. ============================================ OR ============================================ ===================================================== Disable Mod_Security for any User Domain : ===================================================== Go to : pico /usr/local/apache/conf/modsec2.conf and add following lines within file : ===================================================== SecRule SERVER_NAME "yourdomain.com" phase:1,nolog,allow,ctl:ruleEngine=off ===================================================== N

Enable killwhom command at Linux server

Enable killwhom command at Linux server If killwhom command is not added in your server.then do below steps : pico  /bin/killwhom add following code. --- ps -auxf|grep $1|awk '{print "kill -9 " $2}' --- Save the File chmod 700 /bin/killwhom and run the command    :)

How to enable register_globals for a single website without putting an entire server security at risk?

How to enable register_g lobals for a single website without putting an entire server security at risk? * Go to your control panel and then click on File manager. * In your file manager, enter the public_html folder. * In the public_html folder you will see a file called .htaccess. * Select  the .htaccess  file and click on edit in the upper right hand corner. * Copy and paste the text line shown below at the bottom of .htaccess file and then save it: php_value register_globals 1 This will turn your register_globals on and your script will work properly. Why is register_globals disabled in the first place? Leaving register_globals turned on poses a security risk for an entire web server. It should therefore only be enable on a case by case situation and only per website.

cPanel backend configuration files and Log Files Paths

cPanel backend configuration files and log files paths ======================================= /var/cpanel ======================================= accounting.log - Contains a list of accounting functions performed such as account removal and creation cpanel.config – Tweak settings for whm can be done in this file mainip – Main ip of the server is specified in this file maxemail - Maximum emails per hour for a domain can be specified here The format is like the following domainname=number Run the script /scripts/build_maxemails_ config after editing this file This will create a file named after the corresponding domain name inside the directory maxemailsperdomain with the value specified in it. Maxemailsperhour - Server wide maximum emails per hour can be set in this file. It applies to the whole domains in the server. You only need to insert the corresponding value in the file. A value of zero means unlimited. Resellers-nameservers – This file gives you the name of the nameservers used

SMTP error 535 authentication failed in roundcube OR SMTP Error (435): Authentication failed

If you face SMTP error 535 Authentication Failed while sending an email from round cube, then you can check the following things. vi /usr/local/cpanel/base/3rdparty/roundcube/config/main.inc.php and change $rcmail_config['smtp_user'] = '%u'; to $rcmail_config['smtp_user'] = ''; Save the file FIXED....

sendmail: Not running with correct effective GID. Is sendmail binary setgid mailtrap?

=================================== sendmail: Not running with correct effective GID. Is sendmail binary setgid mailtrap? [Error above error message shows in login SSH screen directly or you are getting this message] just change the send mail permission using below command: -- chmod 2755 /usr/sbin/sendmail -- That's it..:) ===================================

WordPress : error_logs file does not generate the error logs

WordPress issue : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If plugin or theme is not compatible then sometimes site shows blank page and error_logs file does not generate the error logs, then need to enable the WP_DEBUG in wp-config.php file. After enabling this function, it will show an error on the site and it will find out which is the problem plugin or theme. Syntax : ================================= define('WP_DEBUG', true); -- to enable define('WP_DEBUG', false); -- to disable ================================= If 'WP_DEBUG line does not exist inside wp-config.php the add it after define('DB_COLLATE', ''); line. After disabling the problem plugin/theme you need to make define('WP_DEBUG', true); to define('WP_DEBUG', false); . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Missing mysql.sock file on server.

Some times,  MySQL service doesn't work due to missing mysql.sock file , then you need to create manually mysql.sock file. Follow the below steps to create mysql.sock file. First, login your server and check /tmp and /var/lib/mysql , you may see that there is no mysql.sock file(It is called also Symbolic file). Follow the below steps. cd /var/lib/mysql/ touch mysql.sock chmod 1777 mysql.sock chown mysql.mysql mysql.sock Create a symlink for the sock file :- ln -s /var/lib/mysql/mysql.sock /tmp Once created, then restart Mysql service : service mysql restart Your Mysql service should be back normal now.

Mysql Database size shows 0 in cPanel

Some times , database size doesn't update in Cpanel . You can check it through Cpanel===> MySQL database ,  it shows database size “zero” even if there is available database data. You should follow below steps to resolve this. ============================================== root@server [#] vi var/cpanel/cpanel.config and search for following line. disk_usage_include_sqldbs=0 ( set it to 1 instead of 0 ) wq: then you need to  run the below command to update the changes. root@sever[#] /scripts/update_db_cache ================================================== then you check your mysql database site, it will show correct database size,

Warning: POST Content-Length of in Joomla.

Some times, you get below error while posting in Joomla .  “Error  : Warning: POST Content-Length of 9897293 bytes exceeds the limit of 8388608 bytes in Unknown on line 0″ then you need to increase  “post_max_size”  in php.ini file post_max_size =8M Replaced with as per your require. post_max_size = 12 M then check it.

Install LiteSpeed on Cpanel server .!!!

Following post discuss how to install Install LiteSpeed  on Cpanel server. Login to SSH on the server running cPanel. # cd /usr/locel/src # wget http://www.litespeedtech.com/packages/cpanel/lsws_whm_plugin_install.sh # chmod 700 lsws_whm_plugin_install.sh # ./lsws_whm_plugin_install.sh # rm -f lsws_whm_plugin_install.sh Register for 15days trial license: http://www.litespeedtech.com/trial/license * Login to WHM and click the ‘LiteSpeed Web Server’ button. * Click ‘Install LiteSpeed’ and let it run through the installation procedure. * Enter your license information & assign an administrator password (Don’t tick the box to start LiteSpeed immediately) * Click ‘Build matching PHP Binary’ * Click ‘Switch to LiteSpeed’ * Click ‘Admin Web Console’ and login Final stages of setup * Configuration > General > Index Files > Edit Set the following and save. Index Files: index.html, index.php, index.php5, index.htm Auto Index: Yes Auto Index URI => /_autoindex/default.php * In SSH

Enable PHP4 for single domain !!

If your server is running with default php version 5 and you want php 4 for single account so you just can add the following line in .htaccess. Create one .htaccess file under public_html and add the following code. AddHandler application/x-httpd-php4 .php now you can create phpinfo page and check it will show your default php version is php4.

Install ImageMagick on the Cpanel server.

ImageMagick is one of the most requested add-ons that allows for image manupulation.    First, you should check GD on the server , it can be complied through easyapache. First check Imagemagick on the server /scripts/checkimagemagick ======================================= Installation ImageMagick  on the server /scripts/installimagemagick Installation will take a couple minutes as it will install other packages needed by ImageMagick. ========================================================== Check version of Imagemagick /usr/bin/convert --version It will show somthing below output. Version: ImageMagick 6.7.1-7 2011-09-13 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC Features: OpenMP ========================================================== Install ImageMagick through WHM. Go to WHM -> Software -> Module Installers -> PHP Pecl (manage). On the box below “Install a PHP Pecl” enter “imagick” and click “Install Now” button – that’s all.

Images not loading for websites.

If you find that images are not loading in linux  server then you should disable php functions. php.ini is configuration file of PHP. Find exact path of php.ini # php -i | grep php.ini Or you can use the another command like # php.ini Configuration File (php.ini) Path => /usr/local/lib Loaded Configuration File => /usr/local/lib/php.ini then search disabled disable_function in that file and remove  “readfile” optionin in that line. : wq! then restart apache service. All images should be work fine.

How to view webalizer stats without login to cpanel .

Just follow below steps. ============================================== cd /home/ username /www ln -s ../tmp/webalizer   webalizer chown username.username  webalizer cd ../tmp chmod 755 ./ chmod 755 ./webalizer ============================================== It will allow domain.com /webalizer/ for viewing stats without logging in to cpanel

How to update webalizer.

Some times , weblizer doesn’t update automatically. You  have to update manually update it. Follow the below steps to update manually update webalizer. ============================================================= /usr/local/cpanel/3rdparty/bin/english/webalizer  -N  10  -D /home/ username /tmp/webalizer/dns_cache.db -R 250 -p -n domain.com -o /home/ username /tmp/webalizer /usr/local/apache/domlogs/ domain.com =============================================================== Replace username and domain name of your hosting account.

Apache Optimization

httpd.conf is configuration file of apache server and all important options are stored there. httpd.conf is located at /usr/local/apache/conf/httpd.conf. vi /usr/local/apache/conf/httpd.conf MaxClients (Total number of concurrent connections.) It should be set reasonable value because if set high value then there is chance a complete server hang in case of a DOS attack. It can set value as per hardware configuration . If you have 2 GB or RAM set this value to 300. This should be set to a reasonable value. I suggest using this formula to determine the right value for your server. MaxClients = 150 x RAM (GB) If you set low value then it can create timeout problems for your clients if the limit is reached so better set reasonable value. ServerLimit This value should be same as MaxClients ServerLimit = 150 x RAM (GB) MinSpareServers and MaxSpareServers MaxSpareServers and MinSpareServers control how many spare (unused) child-processes Apache will keep alive while waiting for more requests

Directory Index Forbidden Error !!

If you get below in error in error_log ======================================== [Thu  Sept 13  02:09:32 2012] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /home/domainusername/public_html/ [Thu  Sept 13  02:09:32 20129] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /home/domainusername/public_html/ ================================================== Then you need to add below code in .htaccess file. ================================== DirectoryIndex index.html or DirectoryIndex index.php ================================== and then check your site.

Fatal error: Class 'PDO' not found in ...includes/database/database.inc on line 184

Fatal error: Class 'PDO' not found in ...includes/database/database.inc on line 184 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ While browsing domain if you get above error then - Please try to resolved issue with following steps. PDO support had been compiled in, but not enabled .Our server has PHP 5.2.x and 5.3x installed, with PDO support. Adding ------------- extension=pdo.so extension=pdo_mysql.so ------------- to php.ini solved the problem. Steps: 1. Create php.ini file 2. Add two lines ------------- extension=pdo.so extension=pdo_mysql.so ------------- 3.Save 4.restart httpd service That's it.. :) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~