Setting up osTicket to handle customer inquires


osTicket is a widely used open source ticket management systems that can be easily configured to create tickets to inquires via emails, web interface, etc…

Download

It is always advisable to download the latest stable version of osTicket and move it to preferred location to continue the installation process.

Configuration & Database creation

Move the content inside uploads/ to root of the installation folder.

Navigate to includes/ folder and rename ost-config.sample.php to ost-config.php and grant write permission.

$ cp ost-config.sample.php ost-config.php
$ chmod +w ost-config.php

Connect to MYSQL server and create a new database to hold the tables and the corresponding data of the ticket system.

$ mysql -u<username> -p<password>
mysql> create database <database_name>
mysql> show databases;

Basic Installation: Step 1

As shown in Figure 1 provide the relevant information to suite your requirement and click Install to proceed to next step. The information it captured is categorised in to following subsections.

  • Web path & title – Installation URL path and the Title(provide a meaningful title to describe your exact purpose) of the osTicket system
  • System email – The email address which acts as the sender for all the outgoing email via the ticket system.
  • Admin user
  • Database

osTicket - Basic Installation

Figure 1: osTicket – Basic Installation

Basic Installation: Step 2

As shown in Figure 2 once the installation is successful carry out the following two tasks.

  • Revoke write permission from ost-config.php using the following command
    • $ chmod 644 include/ost-config.php
  • Delete the setup directory
    • $ rm -fr setup/

Installation success

Figure 2: osTicket – Installation Successful

Reference

Configuration: General Preferences and Settings

Login to Administration section (http://www.site-url.com/scp/login.php) or click on the Admin Panel link as shown in Figure 2 or invoke Admin Panel (http://www.site-url.com/scp/admin.php) section using the upper navigation bar found on the top right corner. Refer Figure 3.

osTicket - Configuration - Admin Panel

Figure 3: osTicket – Configuration – Admin Panel

Next click on the Settings tab as shown in Figure 3. This section let you manage parameters such as General Settings, Date & Time, Ticket Options & Settings, Email Settings, Autoresponders and Alerts & Notices. I’ll be mainly focusing on parameters found under General Settings and Email Settings.

  • General Settings – Common parameters like Site URL, Title, Site Online/Off-line, Enable Auto Cron, etc…
    • Helpdesk Status – This lets us manage the ticket system go online or off-line.
    • Helpdesk URL – This allows to update the URL fro the ticket system.
    • Default Department – The categorisation which the system used to managed the Staff/Users in the system.
    • Enable Auto Cron – This enables the cronjob tasks scheduled by the system. I’ll be discussing how to configure and set the conjob tasks on the server.
  • Email Settings – Especially important if planning to use the ticket system to fetch email to generate tickets.
    • Incoming Emails – This settings provide the ability to control fetching of emails via POP/IMAP email and email piping.
    • Outgoing Emails – The mail server which outgoing email will be handled.
    • Default System Email – The email address which acts as the sender for all the outgoing email via the ticket system.

Configuration: Admin Panel -> Settings -> API

This section provide the facility to generate the API key used in remote email piping feature. This key needs to be updated in the automail.php or automail.pl files located inside scripts/ folder. Please provide the following two information to generate the API key.

  • Add New IP – Provide the IP address assigned to the server/instance the system is hosted.
  • API Passphrase – This will be used to generated the API key used in email piping feature.

Setting up Email address(es) to automatically fetch to generate tickets.

Lets see how to configure an email account in osTicket to automatically generate a ticket(email ticket) for each email received to the email address. Navigates to Admin Panel -> Email -> Add New Email. Please provide the following information described below.

  • Email Info – Settings are mainly for emailed tickets.
    • Email Address
    • Email Name – The text used as the FROM name of the email.
    • New Ticket Priority – The priority level which the ticket should be assigned.
    • New Ticket Dept – The department which the ticket should get categorised.
    • Login info – Required when IMAP/POP and/or SMTP are enabled
      • Username – The email address or the email ID of the email account.
      • Password – The password of the email account.
  • Mail Account – Setting for fetching incoming emails. Mail fetching must be enabled with autocron active or external cron setup.
    • Status – Enable/Disable email fetch feature
    • Host – Hostname of the POP or IMAP service of the email server
    • Port – The port number which POP or IMAP service available
    • Protocol – IMAP or POP
    • Encryption – Yes or NO
    • Fetch Frequency – The time interval which the ticket system to check for new emails.
    • Maximum Emails Per Fetch
  • SMTP Settings – When enabled the email account will use SMTP server instead of internal PHP mail() function for outgoing emails (optional).
    • Status – Enable/Disable the use of following SMPT details for all out going communication
    • SMTP Host – Hostname of the SMTP service of the email server
    • SMTP Port – The port number which SMTP service available
    • Authentication Required? – Yes or NO

Scheduling the Cron job task

Under General Preferences and Settings we came across a parameter to enables the cronjob tasks scheduled by the system. Open up your favourite editor (preferably vi). and issue following commands.


$ crontab -l //to list already scheduled tasks
$ crontab -e //to scheduled a new task

If this is the first time it will prompt you to select the editor, select one that preferred by you and it will open up the crontab, schedule the task as follows.


# m h dom mon dow command
MAILTO="hayeshais at gmail.com" # this will fire an email upon failure to execute any of the scripts to this email address
*/5 * * * * nobody /usr/bin/php /var/www/api/cron.php
*/5 * * * * nobody wget -q -O /dev/null --user-agent=4816EC4CA293EE2EFCA2C89C88750F4A http://<www.helpdesk.examplesite.com>/api/cron.php
*/5 * * * * nobody /usr/bin/php -q /var/www/api/cron.php

Enjoy.

Amazon s3 with Codeignitor


When selecting the deployment environment as Amazon AWS, it comes up with a nice tool called Amazon S3 (Amazon Simple Storage Service) which can be used as a storage for static content, especially as a content delivery network (CDN).

Amazon S3 provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web, and it also consists with a set of APIs to manipulate it via most of the popular programming laguages.

In our project we maintained a separate server, accessed via FTP to store all the images used in the application. The application was developed on top of CI framework, so we didn’t had any problem communicating with the FTP server since the framework itself was geared with a feature rich FTP library. Amazon AWS environment was selected as the hosting environment. With the introduction of Amazon AWS environment we opted to use Amazon S3 as our image repositiry for the project. I found an Amazon S3 PHP library developed for CI on Git Hub. Later extended it to suite our requirements. It can be downloaded over here.

Continuous integration with Jenkins – PHP


Build automation, the practice of automating various tasks that software developers need to perform in their daily routine. These tasks usually include the compilation of source code into binary code and the running of automated tests as well as the packaging and possibly even the deployment of the resulting binaries. Although PHP is an interpreted language and does not use an explicit compilation step it is common to perform code generation or code transformation tasks during a build nowadays.

Jenkins, an Open Source Continuous Integration(CI) tool, is by far the most popular CI tool on the market. Although I’ll be focusing on a PHP project, Jenkins CI tool can be configured to used for various projects that uses different programming languages.

I got the change to setup Jenkins to monitor our PHP project and hoping to set it up for the Android and iPhone projects. The book mentioned at the end of this post nicely guides the reader towards successfully setting up and configuring a PHP project to work with Jenkins.

Please visit http://jenkins-ci.org/ for a detail guide on installing & setting up the Jenkins CI Server environemnt.

Next step would be to install the required PHP Pear packages

$ sudo pear upgrade PEAR
$ sudo pear config-set auto_discover 1
$ sudo pear install pear.phpqatools.org/phpqatools pear.netpirates.net/phpDox

Above pear packages are required to function following plugins on Jenkins

  • PHPUnit is the de-facto standard for the unit testing of PHP code.
  • PHP_CodeSniffer is the most commonly used tool for static analysis of PHP code. It is typically used to detect violations of code formatting standards but also supports software metrics as well as the detection of potential defects.
  • phpcpd (PHP Copy/Paste Detector) searches for duplicated code in a PHP project.
  • PHP_Depend is a tool for static code analysis of PHP code that is inspired by JDepend.
  • phpmd (PHP Mess Detector) allows the definition of rules that operate on the raw data collected by PHP_Depend.
  • phploc measures the scope of a PHP project by, among other metrics, means of different forms of the Lines of Code (LOC) software metric.
  • PHP_CodeBrowser is a report generator that takes the XML output of the aforementioned tools as well as the sourcecode of the project as its input.
  • phpdox for automated API documentation generation for PHP code

Final step is to install the plugins required to integrate PHP projects for Jenkins CI Server. There are more than 500 plugins to choose from. The installation of the plugin(s) can be achieved either by using the Web-based interface or using the Jenkins command line interface, which can be downloaded as follows:

wget http://<hostname&gt;:8080/jnlpJars/jenkins-cli.jar

Install the respective plugins in the following manner, hostname – localhost

java -jar jenkins-cli.jar -s http://<hostname&gt;:8080 install-plugin <plugin name>
...
...
...
java -jar jenkins-cli.jar -s http://<hostname&gt;:8080 safe-restart

References

Two years have passed


Looking back into the past two years I spend in the industry getting graduated with a B.Sc. in IT, it gave me a chance to experiment on what I learnt in the uni. The period that I spent in the university was so exciting and adventurous, where I got the chance to get involve with some interesting research projects, one project that contributed to the well being of the global community while another one had military involvement. I was so fortunate that during all those involvements I got the privileged to work under the reputed professionals in the industry.

Although the place I joined first didn’t worked out well but there was this one project that I got involved gave me the opportunity to learn and do what I was actually spending most of my free time during the university. The project was all about controlling the presentation layer of the Web Browser using CSS (theming more than 600 websites with 400 to 500 pages per site on top of Drupal CMS using Zen theme and Zenophile module). Initially I got an excellent insight into CSS and Drupal framework from Chris Craig, who spent a couple of weeks with our team. Every time the designers were coming up with crazy and elegant designs which we have to port them back into the newly created Drupal sites without failing to miss a single dot and even missing the slightest fraction of the layout of the components including IE 6, 7 and 8, which was a nightmare in the beginning. Within a month time I managed to release two conversion per week.

As a principal I always try to be honest and straight with what I know, but unfortunately it didn’t worked out well for me with my boss. He always tried to fool me and cheat me in many occasions. So after spending more than one year with them I decided that the time has come to say goodbye. So I took the decision to leave the place and gave them two months advance notice. Next stop was the place where I currently working. Initially the environment was somewhat similar to my previous place but since the entire team consists of energetic young blood, so because of that everybody had our own strengths and weakness where we fought each other over that. But the interesting part of it is that the project (which I’ll discuss about it in the future, but if things turned out well it will be a thing that we all can be proud of for all the hardship we went through) in front of everybody was way beyond our radar. Which I believe that was the reason behind all that. Fortunately our team was blessed with a futuristic and generous management so the things didn’t went bad, instead we got a new light to our team. With this project I’ll be able to explore into various technologies where I’ll never even be dream of, if not which will at least take me more than five years or so.

Beauty of Drupal


Drupal is one of the best PHP based CMS geared with an enormous amount of functionality out of the box to have your dream fulfilled with reliability and guaranteed satisfaction to meet your business goals. The Drupal has been popular among the community as a CMS, but if one digs deeper into it he’ll finds that it can be use as a base framework, one off solution or tool to leverage functionality. This gives both the designers as well as for developers the chance to test their limits to extreme.

The default Drupal solution comes with a collection of functionalities that lets you to create a web site with minimum effort. If you need more functionality into your site then all you have to do is to expand your imaginations to extreme because Drupal has all or most of the functionality that you imagined to do as readily downloadable out of the box solutions. With Drupal even you can build systems without requiring to do a simple programming effort because everything in there is automated. Most of your requirements can be achieved through its very powerful mechanisms such Blocks, Nodes, Views, CCK, etc…

Meeting the design and aesthetics of a site are very important aspects to consider in creating a fresh, appealing, yet still functional and user-friendly website. With Drupal you can very easily achieve them thanks to its inbuilt, easily customizable theming engine. There a wide array of theming modules out there to choose from, such as the popular ‘CSS Zen Garden’ based Zen theme, Garland theme, Bluemarine theme, Acquia Marina theme, etc…

The ‘CSS Zen Garden’ based Zen theme provides a very flexible mechanism to customize the positioning of the components to meet the overall as well as to a specific section of your design while adhering to standards-compliant and semantically correct XHTML that can be highly modified through CSS.

When we look at the design we might find ones with a three column layout having sidebars on either sides or both, or two column layouts with a sidebar on left or right or fluid layout with a sidebar on left or right, etc… With the blend of both the Zen theme and the Zenophile module it’s just a matter of you giving the dimensions of each section and state whether it should be fixed or fluid layout, then the system will do the rest. In simply all you have to do is to provide the correct dimensions of your design, rest is up to the themer to let go the dream design crafted on the site without any limits.

« Older entries

Follow

Get every new post delivered to your Inbox.

Join 933 other followers