Friday, February 5, 2016

Magento 2 - 403 forbidden error after file system permissions and ownership according to official Magento site

After successful installing Magento 2 we get some trouble with folder permission on some specific server configuration.

Official Magneto site recommends to set 770 for folders and 660 as file permissions but after that we may get 403 forbidden error or CSS and JS would not load properly.

In my case 775 for folders and 664 as file permissions works properly. But still it creates issues for some template folders and files which Magento generates on the fly, because Magento creates them with default Magento permissions 770 and 660.  If we do below changes in code this issue can be resolved.

Thursday, November 5, 2015

How to put Cs-Cart store offline or maintenance mode ?

Many times we need to put our CS-Cart store offline for maintenance or upgrade work. CS - Cart by default provides option to close store for admin.

It asks to enter access_key to enter when we select option to close store. That key admin user can use to access public store.  So only user knows that key can access store when it is closed.

To close CS-Cart store for public follow below steps -

iTransact payment gateway integration with php


iTransact is a 20 year old, full service payment processing company powered by the largest processors on the planet servicing millions, while at the same time providing personal, world-class customer support and assistance. iTransact’s end-to-end merchant solutions include mobile, internet, as well as traditional retail services from virtually any legitimate industry within the United States. Other offerings include custom gateway services with access to a virtual terminal, recurring billing, all types of equipment and point of sale solutions, Applepay, EMV, electronic check and ACH services, and much more.

For more details click here - http://itransact.com

In this tutorial we will learn how to integrate  PHP application with iTransact payment gateway.

Wednesday, November 4, 2015

How to create Virtual Host on Ubuntu Apache ?

Step 1: Create First Virtual Host

In Apache on Ubuntu all the virtual host configuration files are stored under /etc/apache2/sites-available directory.
Create a new Virtual Host configuration file by copying default file.
By using following linux terminal command.

cp /etc/apache2/sites-available/default /etc/apache2/sites-available/site1.example.com

Configure SMTP on Xampp


Step 1 – Open php.ini
Add below lines under [mail function]
smtp_port=587
sendmail_from =youremail@domain.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

Friday, March 20, 2015

Centos - xz compression is not available error when trying to install any package

Generally this issue comes when we install the wrong epel-release package.  I have fixed this issue by using below command

 yum remove epel-release

which removes that wrong package.
 

Thursday, March 12, 2015

Vtiger - How to do settings for outgoing server when you don't now about SMTP server details

By doing some minor tweaks in core file we can easily enable default sendmail instead of SMTP settings.

In CRM, open file vtigercrm/modules/Emails/class.phpmailer.php

Changes should be as below:

function IsSMTP() {
$this->Mailer = "smtp"

to

function IsSMTP() {
$this->Mailer = "sendmail"

Now go to outgoing server settings in CRM admin and enter details like below -

mail.yourdomain.com
youremail@anydomain.com
Your password for above email
Set as per your choice
Set as per your choice


How to turn off auto complete on html form ?

Auto complete on/off is the functionality provided in HTML. The objective of using "Auto-complete off/on" is to control form auto completing your details. By default auto complete is on.
To disable this just add autocomplete = "off" in respective form tag
We can also use auto complete in particular input fields of a form. 

Wednesday, December 11, 2013

Mysql kill all process listed in process list

Use below steps in terminal to kill all running mysql process -

mysql> select concat('KILL ',id,';') from information_schema.processlist into outfile '/tmp/process.txt';
 

we can also filter process list here by user host etc. by applying them in where clause.

mysql> source /tmp/process.txt;

Monday, November 18, 2013

Generate CSR & Install ssl certfication on linux server

It's 2 Step Process -

Step 1 - Create CSR field and send & receiving your SSL cert from your authority of choice -

Start with below command in terminal - 

openssl req -nodes -newkey rsa:2048 -keyout domain.key -out domain.csr

Thursday, June 20, 2013

Linux command - How to create a zip file of whole directory

We can use below linux command to zip archive a directory -

zip -r finename.zip /path/to/folder

Tuesday, June 18, 2013

How to configure send mail on linux dedicated server

Step 1 - Install Sendmail

          yum install sendmail

It will install sendmail on server. If already installed pleas skip this step

Step 2 - Enable sendmail

     setsebool -P httpd_can_sendmail 1

Step 3 - Start Sendmail Service

          service sendmail start


Wednesday, April 3, 2013

Linux Command to unzip zip file


Use below command to extract all files into the /path_to_dir directory:

$ unzip /path_to_file/file.zip  -d /path_to_extract

For example if you want to extract /var/www/html/file.zip to /var/www/html/site/

$ unzip /var/www/html/file.zip  -d /var/www/html/site/

Make sure you have installed zip / unzip utility 

if not use below commands to install

$ yum install zip

$yum install unzip

Tuesday, March 19, 2013

Which Linux distribution we choose Centos or Fedora

There are many different versions of Linux, and unlike other commercial operating systems that are controlled, distributed and supported by only one company, the core of Linux is free to distribute and use. This creates a situation in which numerous companies, organizations and individuals have developed their own specific version of the Linux operating system. When these versions are made publically available for use, they are known as “distributions”.

Monday, March 11, 2013

Centos 6.3 Screen resolution - GUI not fit for default resolution and we not able to change it. No other option available in screen display settings



Centos screen resolution - GUI not fit for default resolution and no other option was in screen display settings.
Remove xorg.conf file having resolution setting. Follow below steps:
  1. Go to /etc/x11/ 
  2. Remove xorg.conf file
  3. Reboot System
When system starts and comes to gui. Now go to screen display settings. All other options for screen resolution will be visible now. We can set it now.
 

Saturday, March 2, 2013

Set selinux to allow Apache and Samba on the same folder



First off, you can view the context of something with ls using ls -Z
[root@servername www]# ls -dZ /var/www/html
drwxr-xr-x  root root system_u:object_r:httpd_sys_content_t /var/www/html
 
Second, there are two options for giving Samba and Apache access to the same directory.
The simple way is to just allow samba read/write access everywhere with:

PHP files not working after LAMP (linux, PHP, Mysql, Installation) Add entries in IPtable for port 80 and 443

After successfully installing PHP, Mysql, Apache if still you are not able to execute php files. You need to check firewall settings on server. Check entries in iptable and allow access to port 80 and 443

open /etc/sysconfig/iptables

Add below lines :
# Allow traffic on port 80 (HTTP traffic)
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
#Allow traffic on 443 (HTTPS traffic)
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT


 Save and restart apache.

Try to run now your php files in browser it will work.

How to configue screen resolution after centos/linux installation if no option to change resolution

Sometimes after Centos installation screen resolution creates issue as you will not be able to view full window and configuration options tabs will be hidden.

The simplest way to sortout this issue is delete xorg.conf file.

Follow belwo steps :
  1. Navigate /etc/XII/ directory
  2. Remove or rename xorg.conf configuration file
  3. Restart the system (Type init 6 in terminal)
After restart system will automatically open configuration screen for set screen resolution.. You can select according to your choice.

Monday, January 21, 2013

Run web pages or console to be served via common HTTP or HTTPS that runs on port 80 and port 443 with Skype

Many developer face problem when they run http apache in xampp,wamp and  skype conversation tool simultaniously. You can not run both at a time because skype also uses port 80 and 443 as alternatives for incomming connections.

In oeder to solve this issue and run  both web pages or console to be served via common HTTP or HTTPS that runs on port 80 and port 443 and Skype you need to change configuration setting for listning post in either webserver or skype.

Linux command for starting samba service

Samba is a suite of utilities that allows your Linux to share files and other resources, such as printers, with Windows.

In order to start/stop samba service on linux machine you need use following commands -

To start :    /etc/init.d/smb start

To Stop :   /etc/init.d/smb stop

To Restart : /etc/init.d/smb restart