how to deal with a special character in server name? - r

how to deal with server name server\se
have message
Error: '\S' is an unrecognized escape in character string starting "'driver={SQL Server}; server=server\s"
what i need to do?

Related

Nginx REGEX for too long file names

I want to filter out too long file names in the Nginx configuration file.
Sometimes bots try to access my Nginx server with too long file names (longer than 255 bytes) what causes a "File name too long" error on Ubuntu.
https://myserver.com/dir1/dir2/dir3/123456789...255.html
I tried this, but it also counts in the directories the query string:
location ~* /[^/].{255,}$ {
deny all;
}
What do I have to change to count only the file name?
use this regex, which should do excalty what you want:
[^/]{255,}$
matching 255 characters or more which are not / at the end of the line.

Apigee: Unable to authenticate with Management Server

I'm installing Apigee on a single node but when running this command:
/opt/apigee/apigee-setup/bin/setup.sh -p aio -f configFile
I get this stack error at the end:
Checking if management-server is up management-server is up.
Finished edge-management-server setup
Checking for required variables
Checking required variable MSIP...OK
Checking required variable ADMIN_EMAIL...OK
Checking for optional variables
Found optional variable APIGEE_ADMINPW...OK
Found optional variable APIGEE_PORT_HTTP_MS...OK
http://10.10.37.31:8080/v1/servers/self......
Unable to authenticate with Management Server
Error: setup.sh: /opt/apigee/apigee-service/bin/apigee-service exited with unexpected status 1
I've already tried with uninstalling and reinstalling but still getting the same error:
/opt/apigee/apigee-service/bin/apigee-service apigee-service uninstall
This is my configFile:
# With SMTP
IP1=10.10.37.31
HOSTIP=$(hostname -i)
ENABLE_SYSTEM_CHECK=y
ADMIN_EMAIL=name.surname#org.ch
# Admin password must be at least 8 characters long and contain one uppercase
# letter, one lowercase letter, and one digit or special character
APIGEE_ADMINPW=Apigeepw2020
LICENSE_FILE=/tmp/license.txt
MSIP=$IP1
LDAP_TYPE=1
APIGEE_LDAPPW=Apigeepw2020
MP_POD=gateway
REGION=dc-1
ZK_HOSTS="$IP1"
ZK_CLIENT_HOSTS="$IP1"
# Must use IP addresses for CASS_HOSTS, not DNS names.
CASS_HOSTS="$IP1"
# Default is postgres
PG_PWD=postgres
SKIP_SMTP=y
SMTPHOST=smtp.example.com
SMTPUSER=smtp#example.com
# omit for no username
SMTPPASSWORD=SMTP_PASSWORD
# omit for no password
SMTPSSL=n
SMTPPORT=25
SMTPMAILFROM="My Company <myco#company.com>"

"42V18" "ERROR 2848: Could not determine data type of parameter $1"

My application connecting to vertica DB using ODBC connection. It failing with below
"42V18" "ERROR 2848: Could not determine data type of parameter $1"
I am passing string value to the parameter. Any idea how to resolve this error

Nginx Rewrite rule to replace '?' with %3f

Nginx is serving only static files, yet, some of file names contains '?'. Yes, the question mark.
All URLs that contains '?' yield 404 even though file actually exists. e.g.
> GET /foo?lang=ar.html HTTP/1.1
...
...
< HTTP/1.1 404 Not Found
While a file named foo?lang=ar.html does exists in the expected location.
> GET /foo%3flang=ar.html HTTP/1.1
...
...
< HTTP/1.1 200 OK
How do I write a rewrite directive so all '?' will be redirected to %3f?
You should url-encode your query string to escape special characters such as ? and =
Specifically, the name of your file you have to request for, once encoded, is this:
foo%3Flang%3Dar.html
In Javascript you can url-encode the filename with encodeURIComponent() function, in PHP you have urlencode().
You MUST encode the ? as %3F before the http call to nginx.
The reason is that the url rfc reserves the ? character as a special character (specifcally see section 3.3). Consequently nginx will, correctly, interpret an unescaped ? character as the end of the path part of the url

How to ping a computer if the computer name starts with dash "-"

How to ping a computer if the computer name starts with dash "-"
On *nix, use a "--" to allow an argument beginning with a dash:
ping -- -funkyhost
(This probably won't help on Windows, though, because Windows command-line parsing is kind of rudimentary)
On another side note, well-formed DNS names are not allowed to start with a hyphen.
On Windows:
Try escaping out the dash with a backslash ('\') character:
ping \-<hostname>.<domain>
On Microsoft Windows,
use Alt+0151 — Longer Dash
To ping a pc name called "-Quant-"
cmd
type ping
press and hold Alt then type 0151 from num-pad, release Alt
type Quant
press and hold Alt then type 0151 from num-pad, release Alt
press enter
What about using an IP address?

Resources