Tuesday, July 27, 2010

Foreclosure Against A Trust

Apache does not recognize \u0026lt;? = $ variable ">


A nte all we must clarify that

\u0026lt;? = $ Variable ">
is the same as making \u0026lt;? Php echo $ variable;?> If our server does not recognize the short form is that the option of "short tags " is not activated.

If we have control over the Apache server will not only enable short_open_tag option in the php.ini file , that is, indicate the line:


short_open_tag = On

As we see, to use this format must have the certainty that this mode is enabled on the server or have control over it, making it preferable to always use the long form, ie

\u0026lt;? = $ variable ">



Wednesday, July 21, 2010

Mix Unisom With Alcohol

Separate words in a text field with a character in php


S
i need to separate the characters in a variable for a field Specifically we use the function str_replace (). Is an example: We
and finally we want the words are separated by hyphens, ie $ result = "Degree-of-the-expression" .
The expression used is:


$ result = str_replace ("","-",$ title)


Wednesday, June 30, 2010

Progressivism Essentialism

VIM commands to manage security settings


S i and we're using Linux edit any file from the command line, you can use multiple editors. In this case we will learn to manage

VIM, as it is the most powerful of which has the OS • When editing a file editor is opened in normal mode from which we can make shortcuts for operations. It is a way of viewing the content and not editing, that is, not allow us to make changes. • To start editing, and thus enter the edit mode, you type in the sequence

i or press the insert

.

Once we are in the editor so we can check that shows the words / characters in different colors. This is because it automatically detects, by type of content, language is written in the file.

If our vim not have this aspect, you may be overlooking that is installed a basic version of the editor. This is solved by installing the full version with the command: aptitude install

vim-common and typing in the normal way vim: syntax on


At this point it is interesting to know some of the most frequently used commands :


• Text Options (normal mode) or

May + v == Select text or


dd Delete current line ==

or

or undo the last change ==


or CTRL + R

== Redo the last change or


== guu Make current line to lowercase

or GUU

= = Convert to uppercase the current line or


gg ==

position at the beginning of the file or


== G

Positioning at end of file or


:

num == num placed on line

or ga

== Displays ASCII code, hexadecimal and octal current character


• Save and exit (normal) or


:

== q Quit the editor without saving or


: q!

== Exit the editor without saving or prompting

or
: wq

== Save and Exit the editor or


: w file.txt ==

Save in a file called file.txt

or
: e file.txt ==

Closes the current file and open the file.txt


• Useful commands (normal mode)


or delete character x

==

or
:% s/texto_1/texto_2 / ==

replace text or
/ texto_a_buscar /

== Search text (if you click "No" to seek the next match)


• Preferences default (normal mode)

or
: set ts

= num num == set tabulated in

spaces or
: set sw = num ==

set num adding spaces or


: set number / nonumber

== numbered files or


: September backup / nobackup

Automatic Backup ==

or
: set directory = dir == Folder

copies


or: syntax on / off syntax highlighting

==

or
: {color evening / darkblue / desert / elflord / Koehler / morning} == Recolor

or
: set cindent

Auto Indent ==

or
: set mouse = a / mouse = mouse

== Use

or
: set paste / nopaste

paste text mode ==

or
:

== Spell Corrector

spelling or
: setlocal spell spelllang = == Change language is

or
: set spellfile = ~ /. vimdic ==

Dictionary of unknown words


• More commands

or
:! command Run a command ==

or
: Pause == shell

edition (to return to the editor type exit) or


: set number

== Displays the numbered lines

sure many of you know more commands, so I encourage you to share your knowledge with us.


Monday, June 28, 2010

How To Get Bonus Items On Poptropica

SSH Apache server with Ubuntu Problem

S

i want to increase the security of SSH


service of our machine that is configured by default, we will do is change some options for extra safety file / etc / ssh / sshd_config sudo cp / etc / ssh / sshd_config / etc / ssh / sudo chmod sshd_config.original a-w / etc / ssh / sshd_config.original

Once copied to a new file and write-protected can not change it, proceed to its amendment: 1. Assigned to the service port (22) as change by 5301. We sought

line "Port 22"
and instead write
"Port 5301" .
2. We set the maximum number of failed login attempts to 1. If you do not have it yet, add the line
"MaxAuthTries 1"

.


3. Indicate that the maximum number of concurrent unauthenticated connections are 2 with the following line "MaxStartups 2" .

4. Establish the direction of listening to our Private IP:
"ListenAdrress 192.168.2.100 (IP machine)"

.

5. Indicate which users can connect and from which IP:
"AllowUsers usuario@192.168.0.11"

6. We must also realize that probably, when administrators need to connect from any machine regardless of whether it is in our network or not, we must add a user for that purpose:
"user2 user3 user AllowUsers"

.

7. Finally, we disable the option to connect as root, to prevent external intrusion attempts, the line editing
"PermitRootLogin no"

.

If we complete even more security, you can set the permission of the host to attempt to connect to the service. For this we make the following changes:

1. In file / etc / hosts.deny

add the following line:
"ALL: ALL"

.

2.
edit the file / etc / hosts.allow and add the host

those who allow access. In this case we will do only a single computer.

"sshd: 192.168.0.104 (IP notebook)"
.

After saving the changes, we restart the service to take effect:


sudo / etc / init.d / ssh restart