General

PHP Excel reader

php-excel-reader Parse and retrieve information from XLS files

Download from Code Google

When the excel reader is run on PHP 5.3, below mentioned deprecated warning messages gets shown.

i) Assigning the return value of new by reference is deprecated

Remove & from the line below

$this->_ole =& new OLERead();

and have

$this->_ole = new OLERead();

instead.

ii) Function split() is deprecated

Function split() is deprecated and we can use explode() instead of that.

$parts = split(“;”,$format);

change it to

$parts = explode(“;”,$format);

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Linux hosting and Vendors in the market

Some hosting providers

Dedicated or Virtual Server Options
Monthly or yearly rental charge
Pre-configured hosts

Rackspace

Linode

UK2

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

ASTERISK Configuration: for beginners

This will be a simple step by step tutorial to help beginners catch up with ASTERISK – an open source tool for voice communication. It is a software installation of PBX connecting even the PSTN and VOIP networks.

Originally developed for Linux, Asterisk now runs on a variety of operating systems including Solaris, Windows and MacOS.

Environment setup

Continue Reading…

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

How to move the SSL certificates?

Migrating SSL certificates: CPanel, WHM

Possible Scenarios
i) Server load balancing
ii) Moving web sites between servers

Find where the SSL certificates, private keys are installed in the old server and gzip the certs
$ tar -zxcf /tmp/crt.tar.gz /etc/ssl/certs
$ tar -zxcf /tmp/priv.tar.gz /etc/ssl/private

In the new server, extract the certificates and keys to its respective folder location. Edit httpd.conf file and add the following lines

SSLEngine on
SSLCertificateFile /etc/ssl/certs/example.com.crt
SSLCertificateKeyFile /etc/ssl/private/example.com.key
SSLCACertificateFile /etc/ssl/certs/example.com.cabundle
CustomLog /usr/local/apache/domlogs/exampleuser-ssl_log combined

Sample virtual host configuration setting

<VirtualHost xxx.xxx.xxx.xxx:443>
    ServerName subdomain.example.com
    ServerAlias www.subdomain.example.com
    DocumentRoot /home/emaple/public_html
    ScriptAlias /cgi-bin/ /home/example/public_html/cgi-bin/
    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/example.com.crt
    SSLCertificateKeyFile /etc/ssl/private/example.com.key        
   SSLCACertificateFile /etc/ssl/certs/example.com.cabundle    
  CustomLog /usr/local/apache/domlogs/exampleuser-ssl_log combined
    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
    <Directory "/home/example.com/public_html/cgi-bin">
        SSLOptions +StdEnvVars
    </Directory>

    # To customize this VirtualHost use an include file at the following location
    # Include "/usr/local/apache/conf/userdata/ssl/2/exampleuser/example.com/*.conf"
</VirtualHost>

Restart apache
$ /etc/init.d/httpd restart
(or)
$ /sbin/service httpd restart

Note: Once moving the SSL certificates to the new server, you can also use WHM or CPanel to configure the certs.

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

ANSWER: Failed to open a secure file transfer session

Check for the existence of the file sshd_config (/etc/ssh/sshd_config).

Before editing the file check that path settings for sftp-server
$ locate sftp-server
/usr/libexec/openssh/sftp-server

Check for the existence of following line in sshd_config
Subsystem sftp /usr/libexec/openssh/sftp-server
Continue Reading…

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Perl: How to debug in Perl?

Turn on warnings by
use warning;

To run a perl script with warnings, type -w with the shebang as in
#!/usr/bin/perl -w
print “Content-type: text/html\n\n”;
print “Hello World\n”;

Check if you have the following line in the program
print “Content-type: text/html\n\n”;
This will output the text to the browser from the server.

Print error messages to the browser using
use CGI::Carp qw(fatalsToBrowser);

The other way is to use the print command to debug your program.

Common error messages
» The specified CGI application misbehaved by not returning a complete set of HTTP headers.
» Can’t locate missing-file.pm in @INC (@INC contains: ….. )

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Backup Types

Full backup
Full backup is process of backing up ALL data.
First step towards all other types of backup
Backup time will be longer
Restore operation takes less time

Differential backup
Differential backup is the process of backing up data that has changed since the last FULL backup.
Requires file maintenance as the backup file will be of similar size or larger than its previous backup
Longer backup time than incremental backup
Faster restoration than incremental backup

Incremental backup
Incremental backup is the process of backing up data that has changed since the last Full, Incremental or Differential backup
Takes lesser backup time as it will have small data to archive
Takes longer restoration time

Mirror backup
Mirror backup is similar to full backup and is a direct copy of the files/folders
Files are not compressed in zip files and are not protected with password. They remain the mirror or exact copy of the source.

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

How to convert mp3 to audio (cda) format?

InfraRecorder – available under GPL license and can be used to convert MP3 music to audio (cda) format in Microsoft Windows.

To convert mp3 to audio (cda) format, all you need to do is to select InfraRecorder » choose Audio Disc » drag the MP3 file to file list » Click Burn the current compilation to disc

Using InfraRecorder, you can also compile a CD/DVD, record disc images (ISO, BIN, CUE), record dual layer DVD’s, fixate discs and many such features.

You can check InfraRecorder at http://infrarecorder.org

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

How to import mysql dump (.gz or .sql) into a database?

When moving mysql database from one server to another or, to test that the data backup works as expected we need to import mysql dump file in the testing environment.

Create the database (test-database) in the testing environment and identify the location of the .gz or .sql file.

If the mysql dump was a .gz file, you need to gunzip to uncompress the file by typing
$ gunzip mysqldump.sql.gz

This will uncompress the .gz file and will just store mysqldump.sql in the same location.
Continue Reading…

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn
Kurinchi Calendar
July 2017
M T W T F S S
« Apr    
 12
3456789
10111213141516
17181920212223
24252627282930
31