Welcome to ivorde.ro forum
| Message |
 |
Post subject: Remove "X-Powered-By: PHP/5.2.11" from HTTP headers of your web server Posted: Wed Mar 24, 2010 1:49 pm |
|
|
HTTP 1.1 protocol, as most of the other protocol, uses headers for the communication between client (usually browser) and server.
An example of the header looks like: HTTP/1.1 200 OK Date: Wed, 24 Mar 2010 04:03:41 GMT Server: Apache/2.2.11 (Unix) DAV/2 PHP/5.2.11 with Suhosin-Patch mod_ssl/2.2.15 OpenSSL/0.9.8k X-Powered-By: PHP/5.2.11 Set-Cookie: phpbb3_qxggi_u=1; expires=Thu, 24-Mar-2011 04:03:41 GMT; path=/; domain=forum.ivorde.ro; HttpOnly Set-Cookie: phpbb3_qxggi_k=; expires=Thu, 24-Mar-2011 04:03:41 GMT; path=/; domain=forum.ivorde.ro; HttpOnly Set-Cookie: phpbb3_qxggi_sid=514ad39b91e1e29bcb1a7553dcb8f4a7; expires=Thu, 24-Mar-2011 04:03:41 GMT; path=/; domain=forum.ivorde.ro; HttpOnly ...
Read more : Remove "X-Powered-By: PHP/5.2.11" from HTTP headers of your web server | Views : 3055 | Replies : 0 | Forum : Apache, Nginx, Lighttpd and other web server software
|
|
| Top |
 |
 |
Post subject: Apache 2.2 installation of mod_rewrite module without recompiling whole apache Posted: Tue Mar 23, 2010 6:22 pm |
|
|
|
| Top |
 |
Post subject: mysqlnd cannot connect to MySQL 4.1+ using old authentication Posted: Tue Mar 23, 2010 2:05 pm |
|
|
Php 5.3 introduces a cool new alternative to the old libmysql library: mysqlnd (mysql native driver).
How to compile php with this driver or more details about mysqlnd are not scope of this post, but authentication method is.
By default, Mysql is using old_passwords method of storing passwords in 16 char length. Mysqlnd usses a new authentication engine which stores passwords in 41 character length.
To check how mysql currently stores passwords: mysql> show variables ...
Read more : mysqlnd cannot connect to MySQL 4.1+ using old authentication | Views : 1719 | Replies : 0 | Forum : Apache, Nginx, Lighttpd and other web server software
|
|
| Top |
 |
 |
Post subject: FreeBSD - fuser checking processes that are using a filesystem Posted: Thu Mar 18, 2010 1:58 pm |
|
fuser -- list IDs of all processes that have one or more files open man fuser: Quote: DESCRIPTION The fuser utility shall write to stdout the process IDs of processes that have one or more named files open. For block and character special devices, all processes using files on that device are listed. A file is considered open by a process if it was explicitly opened, is the working directory, root directory, jail root directory, ...
Read more : FreeBSD - fuser checking processes that are using a filesystem | Views : 752 | Replies : 1 | Forum : System administration
|
|
| Top |
 |
 |
Post subject: FreeBSD portupgrade without port vulnerability check Posted: Thu Mar 18, 2010 1:12 pm |
|
Portupgrade, portinstall are two tools used to upgrade installed packages or install new ones via ports or packages systems. man portupgrade: Quote: SYNOPSIS portupgrade [ pkgname_glob ...]
DESCRIPTION The portupgrade command is used to upgrade installed packages via ports or packages. The portinstall command is equivalent to portupgrade -N.
Before reading these instructions, you must understand ...
Read more : FreeBSD portupgrade without port vulnerability check | Views : 547 | Replies : 0 | Forum : BSD Operating Systems
|
|
| Top |
 |
 |
Post subject: Openssl: Commandline base64 string encoding Posted: Fri Mar 05, 2010 6:50 pm |
|
To encode a string into base64, echo and openssl system utilities can be used: Code: # echo -n 'somepassword' | openssl enc -base64 c29tZXBhc3N3b3Jk
The -n switch to echo is used to supress echoing a new line character. For example, below is a difference between base64 encoded string that doesn't contain newline and on that does: Code: # echo -n 'somepassword' | openssl enc -base64 c29tZXBhc3N3b3Jk # echo 'somepassword' | openssl enc -base64 c29tZXBhc3N3b3JkCg==
Read more : Openssl: Commandline base64 string encoding | Views : 2232 | Replies : 1 | Forum : Tutorials for general Unix
|
|
| Top |
 |
 |
Post subject: Using echo, netcat(nc) and tr to create an HTTP connection Posted: Thu Mar 04, 2010 12:01 pm |
|
Fortunately for debugging HTTP connections, there is a very simple way of generating one from command line when elinks or lynx are not available. For this we need the most basic http command and header: GET/POST and Host. Code: # echo 'GET / HTTP/1.1 Host: www.mysite.ro' GET / HTTP/1.1 Host: www.mysite.ro
but the above output is not valid for sending it to a web server. We need some new lines added to it: # echo ...
Read more : Using echo, netcat(nc) and tr to create an HTTP connection | Views : 1692 | Replies : 0 | Forum : Tutorials for general Unix
|
|
| Top |
 |
Post subject: Unix shell - using TR to replace new lines with spaces Posted: Thu Feb 25, 2010 3:08 pm |
|
|
Unix shell - using TR to replace new lines with spaces
There are a few ways of replacing new lines with other characters. Below I'll show a few examples for replacing new lines in strings or standard input/output.
Replace new lines with spaces:
# cat test.file In the first synopsis form, the characters in string1 are translated into the characters in string2 where the first character in string1 is trans- lated into the first ...
Read more : Unix shell - using TR to replace new lines with spaces | Views : 3724 | Replies : 0 | Forum : Shell Scripting and Programming
|
|
| Top |
 |
 |
Post subject: SED how to remove multiple white spaces from a string Posted: Thu Feb 25, 2010 2:14 pm |
|
This article will show only a few example that would be enough for most people: How to remove multiple white spaces from a string:Code: # echo 'some white spaces' | sed 's/ *//g' somewhitespaces
How to replace multiple white spaces from a string:Code: # echo 'some white spaces' | sed 's/ */\ /g' some white spaces
Above sed command replaces multiple spaces with a single space. You can adjust it to replace multiple ...
Read more : SED how to remove multiple white spaces from a string | Views : 7951 | Replies : 0 | Forum : Shell Scripting and Programming
|
|
| Top |
 |
Post subject: Starting nginx: [emerg]: directive "rewrite" is not terminated by ";" Posted: Tue Feb 23, 2010 1:05 pm |
|
Code: Starting nginx: [emerg]: directive "rewrite" is not terminated by ";" in /usr/local/nginx/vhosts/www.site.com.conf:45 Even though the Nginx configuration file contains a rewrite rule which is terminated corectly (with Code: last; ), if a rule contains curly brackets {}, then those brackets finish the location directive in Nginx configuration prematurely, thus making Nginx complaining about line termination. Example: Code: system { listen 80; ... location / { ... rewrite ^/[a-z0-9_-]*-[a-z]{1}([0-9]+)(/(news)+)?(/(digest)+)?(/(short|long)+)?/([a-z0-9_]+)\.xml(\.gz)?$ /gymrss.php?$8=$1&$3&$5&$7&gzip=$9 last; ... } } [hence the curly brackets in ...
Read more : Starting nginx: [emerg]: directive "rewrite" is not terminated by ";" | Views : 1095 | Replies : 0 | Forum : Apache, Nginx, Lighttpd and other web server software
|
|
| Top |
 |
|
Last 10 active topics
|