php strip_tags($value);

strip_tags -> Remove HTML and PHP tags from string
The optional second argument allows you to specify a tag that should not be removed.

$value = "<p>賃貸マンションやマンスリーマンション・賃貸アパートの情報を豊富に取り揃えておりますので、あなたの<b>希望にピッタリの賃貸物件</b>がみつかります。新生活や<a href='https:\/\/wwww.hogehoge.com'>一人暮らし</a>などの賃貸に関するご相談も受け付けております。</p>";

echo $value;
// echo strip_tags($value);

strip_tags();

$value = "<p>賃貸マンションやマンスリーマンション・賃貸アパートの情報を豊富に取り揃えておりますので、あなたの<b>希望にピッタリの賃貸物件</b>がみつかります。新生活や<a href='https:\/\/wwww.hogehoge.com'>一人暮らし</a>などの賃貸に関するご相談も受け付けております。</p>";

// echo $value;
echo strip_tags($value);

show time~♪

SSL certificate renewal

1. Create CSR

openssl req -new -key example.com.key -out example.com.csr

2. Apply SSL certificate to certificate authority
Application of SSL certificate to certificate authority using CSR created.

3. When a certificate is issued from a certificate authority, replace to install.

4. apache server restart

5. Confirm the installation of the certificate.

新規の発行と然程変わらなそうですね。

install OpenVAS for centos

After installing the repository of OpenVAS, install OpenVAS with the following command.

yum -y install openvas

[vagrant@localhost app]$ sudo yum -y install openvas
読み込んだプラグイン:fastestmirror
インストール処理の設定をしています
Determining fastest mirrors
epel/metalink | 6.7 kB 00:00
* base: ftp.riken.jp
* epel: mirror.premi.st
* extras: ftp.riken.jp
* remi-safe: ftp.riken.jp
* updates: ftp.riken.jp
base | 3.7 kB 00:00
epel | 4.7 kB 00:00
epel/primary_db | 6.0 MB 00:11
extras | 3.4 kB 00:00
jenkins | 2.9 kB 00:00
jenkins/primary_db | 126 kB 00:01
mariadb | 2.9 kB 00:00
mysql-connectors-community | 2.5 kB 00:00
mysql-connectors-community/primary_db | 33 kB 00:00
mysql-tools-community | 2.5 kB 00:00
mysql-tools-community/primary_db | 48 kB 00:00
mysql56-community | 2.5 kB 00:00
nginx | 2.9 kB 00:00
nodesource | 2.5 kB 00:00
remi-safe | 3.0 kB 00:00
remi-safe/primary_db | 1.2 MB 00:02
updates | 3.4 kB 00:00
updates/primary_db | 3.0 MB 00:05
パッケージ openvas は利用できません。
エラー: 何もしません

なにいいいいいいいいいい???????
ドキュメントをみると、対象のIPを指定するとスキャンしてくれて、脆弱性レポートを作ってくれるらしい。なるほど。

HTTP Trace method

In HTTP1.1 (RFC2616), eight kinds of methods are defined. GET, POST, HEAD, etc. are familiar, but there are five other types PUT, DELETE, OPTIONS, TRACE and CONNECT.
Of these, the TRACE method returns an HTTP request as “HTTP Parallel” as an HTTP response, and requests the Web server as TRACE instead of GET etc. as follows.

Apache setting file
/etc/httpd/conf/httpd.conf

あれ?TraceEnableないぞ。。

403 404 500 503

There are HTTP status codes from 100 series to 500 series. The 400th to 500th are the codes returned when there is an error with respect to the server or request.

403

403 is the code returned when access restriction etc is set.

It is displayed when IP restriction is applied and access is made from an IP address that is not permitted.
It is considered when there is access from other on the page to be displayed only in the company environment.

404

The code returned if the page does not exist. It is often displayed when deleting a page.

500
500 is a code returned in the case of CGI setting or program mistake. In case of this error, setting is wrong often, so it is necessary to modify permissions and code.

503
503 is the code returned when the number of accesses to the server has been exceeded and the server is under load. It is displayed when a large amount of access to the server gather at the same time.
In the case of a site where there are many instantaneous accesses, it is necessary to consider a server corresponding to that. Also, there is a possibility that may be attacked by a site.

Other representative HTTP status code
200 series
The 200 series means that the request to the server was successful. If you have successfully accessed the WEB, the status code “200” will be returned.

300 series
The 300 series is the code returned when doing redirect processing. Representative items such as “301” and “302” are listed.

create ER diagram with MySQL Workbench

create ER diagram without using actual db table linking.

Edit -> preference

Modeling -> Appearance

Change font to Japanease

How to start the mode to write ER diagram

[Add Diagram]
Create a new diagram with the ER diagram mode.

あーこれこれ^^ いいねーテンション上がってきました。

What is workbench

1. MySQL Workbench
MySQL Workbench is a free tool which realizes databases design, development and management distributed with MySQL Server on the official MySQL site. It corresponds to visual operation(GUI) instead of command line, it is recommended for those who are not good at command operation.

2. Functions of MySQL Workbench
In terms of database design, it is possible to create new ER diagrams, and it is also possible to generate ER diagrams in reverse from existing databases.

In terms of database development, it supports not only query creation and execution of SQL but also visual display that can perform optimization with intuitive operation. In addition to the color highlight display and automatic completion function, the SQL editor also supports SQL execution history display, SQL statement reuse, and object browser, making it a very excellent development tool as a SQL editor.

Download MySQL Workbench 8.0.15

Regular Expression for Space Character Check

/[^\s ]/

Blank letters(\s) and double-byte spaces ( ) other than(^) are included.

– \s is a blank character abbreviation, including single-byte spaces, tabs, and new-line characters.
– The space after \s is full-width space
– Double-byte spaces are treated the same as Kanji, so the are not included in \s.
– Brackets([]) mean one character in parentheses. If there is no [], it will search for chunks of “\s”. If you use ^ outside of [], it means a different meaning.

$value = "富士山 が良く見える";

if (preg_match('/[^\s ]+$/u', $value)){
	echo "スペースが含まれています";
} else {
	echo "スペースが含まれていません";
}

What? Something is not working well.