Create a script file, e.g. named my_file.sh, in the /etc/profile.d/ directory.
Put #!/bin/bash as the first line.
Write whatever command(s) you want to be executed immediately after logging in, e.g. pgrep udhcpd.
Mark your file as executable: chmod +x /etc/profile.d/my_file.sh
*It should get executed after login. In case it doesn’t or you don’t have the ability to use root privileges, creating the same file under ~/.config/autostart should work fine (I haven’t tried this directory before).
You can add those lines at the end of your ~/.bashrc file which will get executed when you login.
I’m talking about the ~/.bashrc serverside. When you have added your lines and logout and ssh back in these lines will get executed. You can leave out the last line of your script.
If the ~/.bashrc does not exist you can simply create it or even better copy it:
cp /etc/skel/.bashrc ~/.bashrc
and make sure your ~/.profile file contains the following lines:
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
After wasting a lot of time with character variables and mysql configurations, I fixed the problem with a simple solution that is base64_encode. Passing the input string through base64_encode and later using base64_decode to show them worked in this case. However the strings take up more space than earlier but this solution is really simple and worthy. I just posted this question to know if someone ever faced something similar but people really do not get the main point of the question. That is where the people on SO get really exhausting. Anyways thanks for your help people! 🙂
The most commonly used storage engine in MySQL are MyISAM and InnoDB.
With these storage engine there are some advantages and disadvantages according to application needs.
As you all know, the default storage engine chosen by MySQL database is MyISAM.
The main difference between MyISAM and INNODB are :
MyISAM does not support transactions by tables while InnoDB supports.
There are no possibility of row-level locking, relational integrity in MyISAM but with InnoDB this is possible. MyISAM has table-level locking.
InnoDB does not support FULLTEXT index while MyISAM supports.
Performance speed of MyISAM table is much higher as compared with tables in InnoDB.
InnoDB is better option while you are dealing with larger database because it supports transactions, volume while MyISAM is suitable for small project.
As InnoDB supports row-level locking which means inserting and updating is much faster as compared with MyISAM.
InnoDB supports ACID (Atomicity, Consistency, Isolation and Durability) property while MyISAM does not support.
In InnoDB table,AUTO_INCREMENT field is a part of index.
Once table in InnoDB is deleted then it can not re-establish.
InnoDB does not save data as table level so while implementation of select count(*) from table will again scan the whole table to calculate the number of rows while MyISAM save data as table level so you can easily read out the saved row number.
MyISAM does not support FOREIGN-KEY referential-integrity constraints while InnoDB supports.
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'db.table.col' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
It’s likely because you have the ONLY_FULL_GROUP_BY function enabled. To fix this, you have to disable it.
Run this command:
mysql > SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
Another way to turn it off is that to find and modify the config file my.cnf. Usually it’s in /etc/my.cnf or /etc/mysql/my.cnf.
Following are the ways to integrate Opencart with ShipRocket. Before you proceed with these steps, make sure that you have installed the Shiprocket plugin on your Opencart account.
In case that you have Ubuntu in your machine, the following steps will help you:
Check first in your php testing file if you have soap (client / server)or not by using phpinfo(); and check results in the browser. In case that you have it, it will seems like the following image ( If not go to step 2 ):
Open your terminal and paste: sudo apt-get install php-soap.
Restart your apache2 server in terminal : sudo service apache2 restart.
To check use your php test file again to be seems like mine in step 1.