Backslash added before single quote in magmi ruin my day - magmi

I know it's such a dump question, but it makes my life difficult. I wonder why in my server, there will be added a backslash before ' (single quote). So if I input script like '/home/user/public_html/file.csv' it will be \'/home/user/public_html/file.csv\' when I save the profile. It causes some error because magmi misinterpret the script. I tried to remove it from conf file manually, but then it will be added again everytime I save it. But it only happen in the server with linux, it doesn't happen in my localhost with windows. Is there any solution for this issue?

Your server may have magic_quotes_gpc enabled, which automatically escapes double and single quotes with a backslash.
You can try disabling it by adding the following in your .htaccess file:
php_flag magic_quotes_gpc Off
or using a php.ini override:
magic_quotes_gpc = Off
You can read more about disabling magic quotes at PHP: Disable Magic Quotes - Manual

Related

wget is not working with special parameter

I am trying to download a file from this link with wget.
https://sfirmware.com/downloads/downloader.php?fileid=257457&hash=458cd40aa7824c3d25fe096c0b01d4b7
I am aware that & is a special character in shell environment.
So far i've tried double quote,single quote ,putting %26 replacing '&' (as per some suggestion) but the solution doesn't seem to work with this error-
Hash not exist in db!Back to Home Page
It seems the hash number from the link is ignoring while requesting.
How do I modify the code to download this file with wget?

Ansible include single quotes with a variable issue using lineinfile

I am trying to use pass double quote and single quote with a variable but I am getting missing quotes error when I run the playbook. Anyone can help with this ?
Final output should be = PASS="'test#123'"
I was able to include double quotes but when I include the single quotes every time it's failing with the missing quotes error.
I'm trying to add this with a loop using the below code. This is working without an issue when I try to add this without a loop.
{ line: "PASS="'{{ passphrase }}'""}

git bash on windows: interactive mode doesn't work

Well, the problem is any command involving manipulations with patches refuses to work in the following manner:
<stdin>:16: trailing whitespace.
<stdin>:17: trailing whitespace.
<stdin>:18: trailing whitespace.
<stdin>:19: trailing whitespace.
<stdin>:20: trailing whitespace.
warning: recount: unexpected line:
fatal: corrupt patch at line 101
(As a result?) Interactive mode doesn't work.
Tried to tweak core.whitespace with no success.
Please help me to resolve this annoying issue.
This message usually comes from the pre-commit hook when its checking for non-ascii content.
The sample pre-commit hook may be doing a check for trailing whitespace.
To disable it, look in .git/hooks and make sure the files there are not executable.
###git-stripspace
Read
https://www.kernel.org/pub/software/scm/git/docs/git-stripspace.html

Installing emacs plugins on windows

I already looked through other topics, but I still couldn't find a solution. I'm trying to install "nxhtml" plugin for Emacs in windows 7. I already setup my "HOME" environment variable as "C:\". So, my .emacs.d folder is there, and I put the nxhtml in there and added the following line to my "_emacs.d" file, as the readme says:
(load "C:\.emacs.d\nxhtml\autostart.el")
But it doesn't load.
I also tried putting:
(add-to-list 'load-path "C:\.emacs.d\nxhtml")
(load "autostart.el")
But to no avail... can anyone shed some light here? tnx.
A number of points here:
Firstly, _emacs.d is not a default file name for your init file, ie emacs will not load it automatically. Try ~/.emacs.d/init.el, or ~/.emacs instead.
Secondly, Windows 7 has a feature where it prevents programs from writing to certain system directories, but for backwards compatibility for the many old programs that do this, rather than causing them to fail, it silently redirects the write elsewhere, in an application specific directory. C:\ is one of those directories, so setting your HOME to point there is asking for trouble.
Thirdly, see the other response about backslash being an escape character in Lisp strings.
\ is special in the (double-quote) read syntax for strings, as certain characters take on a new meaning when prefixed by a backslash (e.g. \n is a newline, \t is a tab, and \" is a double-quote character). When the following character does not have any special meaning in conjunction with the backslash, that character is used verbatim, and the backslash is ignored.
"C:\.emacs.d\nxhtml\autostart.el" is actually the string:
C:.emacs.d
xhtml^Gutostart.el
To include a \ in the string you need to write \\
However, although it will understand the backslashes, Emacs is nowadays consistent across all platforms in allowing / as a directory separator1; so just do that instead.
1 and the obsolete directory-sep-char variable has been removed entirely.

Using environment variables to form paths in Make and windows

I have a make file and I am trying to use it to copy files to a directory. The path of the directory is stored in an environment variable. The problem is when I run make the C:\Data from the environment variable is interpreted as C:Data. How do I stop this being intrepreted as an escape character?
copyData : buildData
cp Release/*.tbl $(DATA)/index
results in:
cp Release/*.tbl C:\Data/index
cp: `C:Data/index': specified destination directory does not exist
Try `cp --help' for more information.
Actually, using forward slashes is the best, and correct, solution. Windows utilities always support forward slashes so it works, and trying to remember to always quote pathnames to avoid issues with backslashes is a major hassle.
In this case the first thing to note is that the problem is not a problem with make. make is passing the right content to the shell; it's the shell which is parsing the backslash as an escape character.
As I said above the right answer is to use forward slashes BUT if you want to allow people to use backslashes you'll have to go through your makefile and quote all arguments where a backslash might appear. For example:
copyData : buildData
cp Release/*.tbl '$(DATA)'/index
will fix your immediate problem.
If you have just a couple of these variables you could also do something like:
QDATA = '$(DATA)'
then remember to use $(QDATA) where you wanted the quoted value:
copyData : buildData
cp Release/*.tbl $(QDATA)/index
PS. Use forward slashes!! :-)

Resources