2014/12/19

systemctl

systemctl stop iptables.service
systemctl stop ip6tables.service
systemctl stop ebtables.service

systemctl mask iptables.service
systemctl mask ip6tables.service
systemctl mask ebtables.service


・maskしてサービスを無効にする
sudo systemctl mask httpd.service
=>ln -s '/dev/null' '/etc/systemd/system/httpd.service'
Unitファイルは/etc/systemd/system⇒/usr/lib/systemd/systemの順に参照される。優先度の高い/etc/systemd/system上に/dev/nullへのシンボリックリンクを配置することで、対象Unitへの操作を無効化している事が分かる。


・変更を有効にする
systemctl daemon-reload

・変更ログ
journalctl
該当サービスの直近のシステムログが表示されています。
rsyslogに送られるメッセージは、systemd-journaldというデーモンが監視しており、
すべてsystemd独自のログ(ジャーナル)にも保存されています。
ここで表示されるログは、ジャーナルから取り出しているため、実際のログの出力ファイルに関わらずすべてのログがここで確認できます。
上記のコマンドに-fオプションをつけると、「tail -f」と同じように新たなログが追記されるのを監視することもできます。



・serviceとの比較
systemctlは全てのUnitタイプを扱えるのに対して、serviceはserviceタイプのUnitしか取り扱う事ができない。
service-->**.service serviceは省略可能
systemctl-->**.socket *.mount

・chkconfig確認
systemctl is-enable httpd
systemctl enable httpd
systemctl disable httpd
systemctl restart httpd
systemctl reload httpd
===>[Service]
 ExecReload=/bin/kill
 ==>これはないと、エラーになる

systemctl show sshd.service
systemctl daemon-reload

現在稼働中の
systemctl list-units --type=service
関係なく、全てのサービス
systemctl list-unit-files --type=service

==>起動ON/OFFのチェック

・メリット
プロセスを並行起動する
==>UNITの関係を解析して、最適な順位で並行起動する
==>早くなる

initの場合は/etc/rc.d/rc[runlevel].dディレクトリのシンボリックリンクの命名規則によって起動順を指定していたが、
Systemdでは、Unitに定義されたUnit間の関係を元にSystemd側で起動順を決定する。

・cgroups

★systemctl enable error

test@localhost etc]$ sudo systemctl enable redis
redis.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig redis on
The unit files have no [Install] section. They are not meant to be enabled
using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...)
  

★systemd-cgls
groupsは、Kernelが持つ機能の1つで、CPUやメモリなどのリソースをプロセスグループごとに割り当てることができるものです。
各グループの階層については、systemd-cglsコマンドで確認できます。

★systemd service type?? foring simple
「Type」は、「ExecStart」で指定したコマンドでサービスのプロセスを起動した際に、起動完了をどのように判定するかを指定します

simple==>普通の
forking==>後ろで実行続ける
デーモン型のプロセスではなく、一度だけ指定のコマンドを実行するタイプのサービスについては、「Type=oneshot」とすると、「ExecStart」で指定したコマンドを実行して、それが完了したタイミングで起動完了(かつサービス終了)と判断します。コマンドが完了したあともサービスとしては起動状態として認識させたい場合は、「RemainAfterExit=yes」を指定します。このタイプについては、「Type=simple」とすることも可能ですが、この場合、systemdは、コマンドの実行を開始したタイミングで起動完了と判断します。

svn 衝突

編集 (e)      - マージされたファイルにエディタで変更を加えます
  全差分 (df)   - マージによってファイルに加えられた変更をすべて表示します
  解決版 (r)    - マージされたバージョンのファイルを採用します
  衝突表示 (dc) - (マージされたバージョンを無視して) 衝突をすべて表示します
  衝突自分 (mc) - (同上) すべての衝突に関して自分のバージョンを採用します
  衝突他人 (tc) - (同上) すべての衝突に関して他人のバージョンを採用します
  完全自分 (mf) - (衝突がなくても) ファイル全体で自分のバージョンを採用します
  完全他人 (tf) - (同上) ファイル全体で他人のバージョンを採用します
  延期 (p)      - 競合に、後で解決する予定であるという印をつけます
  起動 (l)      - 競合を解決するために外部ツールを起動します
  全表示 (s)    - この選択肢一覧を表示します
 

linux apache2.4 module memo

■proxyモジュール多いね
LoadModule proxy_module modules/mod_proxy.so
LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_express_module modules/mod_proxy_express.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_scgi_module modules/mod_proxy_scgi.so


/etc/httpd/conf.d/proxy.conf
=->/etc/httpd/conf.modules.d/00-proxy.conf

・apache 設定ファイル

UseCanonicalName
    サーバが自分自身の名前とポートを決定する方法を設定する
    canonical--->正典的。ネーミングは良くない。自分自身でown?

==>onの場合
 ServerName ディレクティブで指定されている ホスト名とポート番号を使って、その正規名 (自己参照の名前) を生成します
 じゃないと、ServerNameは意味がないだね。
==>offの場合
 UseCanonicalName Off の場合、 クライアントがホスト名とポートを指定したときには、 それらを元に自己参照 URL を作成します (指定がなかったときは 上の定義と同様にして正規名を解決します)

これぐらいだね。。。。
====>URL が最後のスラッシュ無しの ディレクトリになっている http://www/splat のようなとき、 Apache はリクエストを http://www.domain.com/splat/ へリダイレクトします


★apache Access Control
=->mod_authz_core
   mod_authz_host
  
・mod_rewrite
   ==>
   RewriteEngine On
   RewriteCond %{TIME_HOUR} >= 20 {OR}
   RewriteCond %{TIME_HOUR} < 07
   RewriteRule ^/fridge - [F]
   ==>The [F] RewriteRule flag causes a 403 Forbidden response to be sent
   07-20の間にOK
  
・ Require
  RequireAll
  RequireAny
  RequireNone
  =>Allow Deny Orderはdeprecated...........

<RequireAll>
    Require all granted
    Require not ip 10.252.46.165
    Require not host host.example.com
</RequireAll>

Require expr %{HTTP_USER_AGENT} != 'BadBot'
==>あいつだけだめ。。。


 Options Includes,FollowSymLinks
  =->FollowSymLinks シンボリックリンクファイルを認識させるかを設定します。
  =->Includes SSI を実行できるかどうかを設定します
 
.htaccess ファイル
==>AllowOverrideはnone、httpd.confで設定すれば、htaccessの設定は無効になる



★apache httpd module

apache mod-dav-------------
文字や画像、音声、動画などの要素を組み合わせて一つのソフトウェアやコンテンツ作品を組み立てること。

異なる種類の素材データを組み合わせ、配置や出現順、利用者の操作に対する反応などを設定していく編集作業を意味するが、(従来は必須であった)プログラミング言語やマークアップ言語などによるコードの記述を極力廃し、マウス操作など直感的な方法で作業を進めるという含意がある。

多くの場合、そのような作業に対応した専用のソフトウェアが用いられ、「オーサリングソフト」「オーサリングツール」などと呼ばれる。多くのツールは上級者が複雑な設定を行うことができるよう、補助的にプログラミングができるようになっていることが多い。

Apache Module mod_lua-------
==>this module allows the server to be extended with scripts written in the Lua programming language

Luaは、C言語のホストプログラムに組み込まれることを目的に設計されており、高速な動作と、高い移植性、組み込みの容易さが特徴である。いったんバイトコードにコンパイルされ、Lua VMで実行される。LuaJITは The Computer Language Benchmarks Game によると、変数に型のないスクリプト言語では最速の言語・処理系である[1]。


event------------------------------------
The event MPM handles some connections in an asynchronous way, where request worker threads are only allocated for short periods of time as needed, and other connections with one request worker thread reserved per connection. This can lead to situations where all workers are tied up and no worker thread is available to handle new work on established async connections.

To mitigate this problem, the event MPM does two things: Firstly, it limits the number of connections accepted per process, depending on the number of idle request workers. Secondly, if all workers are busy, it will close connections in keep-alive state even if the keep-alive timeout has not expired. This allows the respective clients to reconnect to a different process which may still have worker threads available.

This directive can be used to fine-tune the per-process connection limit. A process will only accept new connections if the current number of connections (not counting connections in the "closing" state) is lower than:

ThreadsPerChild + (AsyncRequestWorkerFactor * number of idle workers)

This means the absolute maximum numbers of concurrent connections is:

(AsyncRequestWorkerFactor + 1) * MaxRequestWorkers

MaxRequestWorkers was called MaxClients prior to version 2.3.13. The above value shows that the old name did not accurately describe its meaning for the event MPM.

AsyncRequestWorkerFactor can take non-integer arguments, e.g "1.5".

モジュールhttpd-------------
httpd -l
===>Compiled in modules

httpd -M==>モジュールの一覧

★TraceEnable off
HTTPのメソッドには、よく使うものとしてGETやPOSTというものがありますが、TRACEメソッドというものがありまして、これを有効にしておくと危ないよという話

==>なんか情報漏れので、無効にする


<IfModule mime_module>
 TypesConfig /etc/mime.types

</IfModule>


★mod_filter
This module enables smart, context-sensitive configuration of output content filters.
For example, apache can be configured to process different content-types through different filters,
even when the content-type is not known in advance (e.g. in a proxy).

★indirection -->間接参照、遠回し
AddOutputFilter
complex boolean expressions

FilterDeclare

★Register Providers
    FilterProviders
   
   

★2.4系
LogLevel alert rewrite:trace3

linux command tips

ssh  sed 正規表現

sed -i "s/\r//"
sed "s/aaa/bbb/i"
    ==->i 大文字と小文字区別しない

grep -i

-i Aとaは区別しない


★disown nonhup

disown---->番号が分かれば、disown 番号
nonhup---->事前でやる


★vi 小文字、大文字変換---------------------
g~~===>小文字、大文字変換

★★linux exec----
シェルから
% ls
とコマンドを実行すると、シェルは以下のことを行う。

    システムコール fork(2) を呼び、子プロセスを生成する。
    子プロセスは ls を exec(2) する。
    親プロセスであるシェルは、ls の実行が完了するのを待つ (wait する)。


一方、
% exec ls
と exec を使うと、シェルは fork(2) せず、いきなり ls コマンドを exec(2) する (シェルの内部コマンド exec(1) を実行すると、内部でシステムコール exec(2) が呼ばれるということ)。シェルのプロセス情報は ls のプロセスの情報で上書きされる。なお、子プロセスは生成されないので、シェルと ls のプロセス ID は同じになる。

実際にやってみるとわかるが、kterm などの端末エミュレータ上でシェルを動かしているときに
% exec ls
とすると一瞬 ls の結果が実行されるが、kterm は終了してしまう
(kterm は通常シェルが終わるのを待っているが、シェルのプロセスは ls のプロセスに上書きされるので、
ls が終了すると kterm も終了してしまう)。

★sudo------
sudo -l
==>内容をリストして、確認できる


★linux set オプション---------
set -m
-->-m -o ジョブ制御を有効にする

UNIX では,二つ以上のコマンドを一つの単位として,一度に実行することができます。 この実行の単位のことをジョブ (job) といいます。
例えば, ls -al /etc | more のような パイプラインはジョブの一例です。
==>


★linux echo------
echo $$
==>pid?

★tar 一部解凍

・中身を確認する
    tar tvf some.tar
   
・一部解凍
    tar xzvf some.tar  aa/bb/cc.dd

★ls
ls -d ==>フォルダだけを表示する
   
★linux ssh log-------------
cat /var/log/secure
grep -c invalid /var/log/secure
grep -c Failed /var/log/secure
grep -c Accepted /var/log/secure

★linux rpm -ql
=->

rpmコマンドに、-qオプションと--scriptsオプションを付けて、preinstallのscriptletを確認すれば良い。
==>ここで、rpmでのインストール時に実行されるスクリプトレットを見てみよう


インストールされたRPMパッケージのディレクトリを調べるには、「-ql」オプションを使用する。
pip install
sudo -E pip install mysql-python --proxy=http://10.25.5.10:8080

ファイル取り出す-------------
***src.rpmをダウンロードする
=>
rpm2cpio | cpio -id

★ifconfig
==>eth0,eth1,eth2

ifconfig eth1

ifconfig eth1 up
ifconfig eth1 down

ifconfig -a


★linux watch---------------
whileループとかを利用しなくてもwatchコマンドを使えば簡単

# 1秒間隔で"ls"コマンドを実行
$ watch -n 1 ls

★linux eval ----------------------------
文字列を変数名にする

bashtest$ cat eval-test2.sh
#!/bin/bash

hoge1="one"
hoge2="two"

for (( i=1; i<3; i++ ))
do
    echo $hoge$i
done

echo

for (( i=1; i<3; i++ ))
do
    eval echo '$hoge'${i}
done


==->



1
2

one
two

eval echo '$hoge'${1}
!!

★★linux command 記録----------------------------------
★script test.log
..
..
ctrl+D
===>ログの記録

★history
HISTIMEFORMAT
==>strftimeの形式で指定する
HISTTIMEFORMAT='%F %T'

ECHO HISTCONTROL;
=>ignoredups,==>直前の同じコマンドを記録しない

unset HISTCONTROL;

HISTIGNORE=ls*:pwd:history*

HISTSIZE

「/etc/profile」に設定しておくことで、すべてのアカウントで常に同じ設定が使えるようにしておきます。
※これでも、各アカウントの「~/.bash_profile」を編集されたら、各種の環境設定ファイルの読み込み順序の関係で、「~/.bash_profile」で上書きされてしまいますが...



★ ssh t オプション 複数
 -t
    強制的に仮想端末を割り当てます。
    これはリモートマシン上で任意の画面ベースのプログラムを実行するとき(たとえば、メニューサービスを実装するときなど)に非常に便利です。
    複数の-t をつけると、たとえssh がローカル側での端末を持っていない場合でも強制的に仮想端末を割り当てます。
   
    通常、Linuxの場合、最初の6つの仮想コンソール (/dev/tty1?/dev/tty6) が
    Unixシェルへのログインプロンプトが表示されたテキストターミナルである
   
    ほとんどのアプリケーションがX Window Systemなどのグラフィカルフレームワーク上で動き、それぞれのプログラムがウィンドウを持っていて、
    テキストモードのアプリケーションは端末エミュレータのウィンドウで動く現在、仮想コンソールの必要性は減っている。
    ユーザの簡易切り替え (fast user switching) や異なるXサーバーでのXアプリのデバッグなど、複数のX Window Systemのログインセッションが同時に並行して動く必要がある場合、
    通常はそれぞれのXセッションは異なる仮想コンソールで動く。GNU Screenは一つのテキストログインの中で、複数のテキストモードのアプリケーションを動かし、それらを切り替えられるようにするプログラムである。
   
    ==>何が見た目、セッション管理上必要な物みたい
   
   
   
★route
routeコマンドは、IPパケットをルーティングするためのルーティングテーブルの内容表示と設定を行う。ルーティングテーブルは、おもにOSが管理するルーティング情報を保管したメモリテーブルだ。テーブルのエントリーが経路を表している。経路はネットワークまたはホストへ到達するために通過する必要のあるゲートウェイを表している。

scala study memo

・Predef is a great place to start to understand the Scala Library
==>Predefに定義された関数は、すべてのScalaのソースにおいて自動でimportされている
printやprintlnはPredefで定義されている。JavaのようにSystem.out.printlnという長い記述をしなくても、printlnのみで標準出力ができるのは、これのお陰。

・Array===>scala.collection.mutable.ArrayLike

scala myfirstScript.scala my first script
==>args...引数のこと  args.foreach(println);


追加:
    var oldList=List(1,2)
    val newList=3 :: oldList
    ==>newList 3:2:1
    var theList= newList : +3

the :: method. The job of the :: method is to create a new List with all the existing
elements plus the new element added at the front of the List. To add at the end of
the List, invoke the :+ method:


val afterDelete = newList.filterNot(_ == 3)
==>filterNot(_ == 3)


_  An underscore has a special meaning in Scala, and in this context it’s a placeholder
for a parameter; in your case, use two underscores
==> evenNumbers.foldLeft(0) { _ + _ }

val hasUpperCase = name.exists(_.isUpper)

==>temporary value,variablesだよね。。。



・def breakable(op: => Unit) { ... }
What’s this op: => Unit? The special right arrow (=>) lets Scala know that the
breakable function expects a function as a parameter
The right side of the => defines the return type of the function

def foldLeft(initialValue: Int, operator: (Int, Int) => Int)= { ... }
==>the funuction paramater with two its own paramters!



val files = new java.io.File(".").listFiles
   for(file <- files) {
   val filename = file.getName
   if(fileName.endsWith(".scala")) println(file)
}
 <- In Scala this is called a generator, and the job of a generator is to iterate
through a collection.


for { a <- aList; b <- bList } println(a + b)
for { a <- aList; b <- bList } yield(a + b)
==>yield 新たなListが作成された。。。


mkString(",")
==>java splitだよね。。。


def ordinal(number:Int) = number match{
  case 1 => println("1st")
  case 2 => println("2st")
  case 3 => println("3st")
  case 4 => println("4st")
  case 5 => println("5st")
  case _ =>
}


java.util.Arrays.asList(scalaList.toArray:_*)
====》
:_*
tells the Scala compiler to send the result of toArray as a variable argument to the
Arrays.asList method;


class MongoClient(val host:String, val port:Int)
val client = new MongoClient("127.0.0.1", 123)
==>Scala also uses the new keyword for creating instances of a class. But
wait a minute?where’s the body of the MongoClient class? In Scala that’s optional

private
==>so that the Scale will not create get ,set methord automiclly



class MyScript(host:String) {
    require(host != null, "Have to provide host name")
    if(host == "127.0.0.1") println("host = localhost")
    else println("host = " + host)
}
==>require!


・package is a special object to grouping classes
package com {
  package mongo {
    import ....
    class
  }
}


import java.sql.{Date => SqlDate}
val sqlDate = new SqlDate(now.getTime)

import java.sql.{Date => _ }
==>The Date class from the java.sql package is no longer visible for use.


:load nnnn.scala
:l nnn.scala


object RichConsole {
def p(x: Any) = println(x)
}
Here RichConsole is a singleton object. The object declaration is similar to a class declaration
except instead of class you’re using the object keyword. To invoke the new
p method,


object DB {
def apply(underlying: MongDB) = new DB(underlying)
}
====>factory in scala

Class UpdatableCollection
extends DBCollection(collection(name)) with Updatable
==>with .... trait



class Outer {
    class Inner {
        private[Outer] def f() = "This is f"
        private[innerpkg] def g() = "This is g"
        private[outerpkg] def h() = "This is h"
}
}
==>Outer,innerpkg,outerpkg



final」はクラスやメンバーに対して設定できる修飾詞です。
   finalが設定されたクラスは継承できません。
   finalが設定されたメンバーはオーバーライドできません。
sealed」はクラスに設定できる修飾詞です。
   sealedとされたクラスは、同一ファイル内のクラスからは継承できますが、別ファイル内で定義されたクラスでは継承できません。
   ただし、sealedクラスを継承したクラスは、別ファイルのクラスからも継承できます。



・class Stack[+A] {
class Stack[-A] {
=>Scalaのコレクションクラス(List, Seqなど)は、List[+A]と型名の前に+を付けてcovariant(共変)な型を許すように定義されています。covariantとは、Aのクラスを拡張したクラスBがあれば、List[B]はList[A]として代入できることを意味します
関数側で型パラメーターに縛りが必要ない場合は_を使えばOKだった。
共変はサブクラスを許容する場合に使う


・値クラス (value class) は実行時のオブジェクトの割り当てを回避するための Scala の新しい機構だ
は新たに定義付けされる AnyVal のサブクラスによって実現される
=>    class Wrapper(val underlying: Int) extends AnyVal


・case class VS class
パターンマッチを使う場合にはcase class、
それ以外は普通のclass、と使い分けています
==>case classはcase classを継承することができない



hierarchy

.git
==>index file
The index records
and retains those changes, keeping them safe until you are ready to commit them.


=>content-addressable storage system
location-addressed disk storage with built-in search capability. The search logic was incorporated into the disk controller
First, Git’s object store is based on the hashed computation of the contents of its objects,
not on the file or directory names from the user’s original file layout.
If two separate files have exactly the same content, whether in the same or different
directories, Git stores a single copy of that content as a blob within the object store.

★It’s important to see Git as something more than a VCS: Git is a content tracking system.


★What if you only add, say,one line to a file, doesn’t Git store the complete content of both versions?
Luckily, the answer is “No, not really!”
Instead, Git uses a more efficient storage mechanism called a pack file.

Instead, Git uses a more efficient storage mechanism called a pack file. To create a
packed file, Git first locates files whose content is very similar and stores the complete
content for one of them. It then computes the differences, or deltas, between similar
files and stores just the differences. For example, if you were to just change or add one
line to a file, Git might store the complete, newer version and then take note of the one
line change as a delta and store that in the pack too.



★blod <- tree <- commit <- tag(branch)

INI-style

構造の単純なテキストファイルであり、設定ファイルの標準です。
このファイルは主にWindowsで使用するが、他のプラットフォームでも使われる。
INIファイルという名前はこのファイルの一般的な拡張子「.INI」から来ている。INIとはinitializationである。
その他に「.CFG」や「.conf」、あるいは「.TXT」も使われる。


パラメータ name=value
セクション  [section]
コメント ; comment text


★ansible lineinfile
This module will search a file for a line, and ensure that it is present or absent.
 This is primarily useful when you want to change a single line in a file only.
 For other cases, see the copy or template modules.

 オプション
 ・backrefs->insertbefore and insertafter will be ignored, and if the regexp doesn't match anywhere in the file,
 the file will be left unchanged.
 If the regexp does match, the last matching line will be replaced by the expanded line parameter.
 ・insertafterーー> the line will be inserted after the specified regular expression

jmeter NonGUIDriver Could not find the TestPlan class

結論から言うと親要素が無い不完全なJMXファイルを作成していたから
翻訳のせいかな。。
save=->保存
save Test Plan As =>テスト計画に名前を使って保存する
Save Selection As =>別名で保存
 ==>選択された部分だけ保存する、これは罠である!!

php study memo

Each active resource has a unique identifier. Each identifier is a numerical index into
an internal PHP lookup table that holds information about all the active resources. PHP
maintains information about each resource in this table, including the number of references
to (or uses of) the resource throughout the code. When the last reference to a
resource value goes away, the extension that created the resource is called to free any
memory, close any connection

=->
$res=database_connect();
...
$res="boo"

automatic cleanup

// is_resource()
==>Many modules provide several functions for dealing with the outside world

if(is_resource($..)){
   
}

is_null($x)


★static variables
function updateCounter(){
     static  $counter=0;
     $counter ++;
     echo "Static function variables is now {$counter}\n";
}



★copy on write----------
必要な時だけ、メモリーを使う

Symbol
Each value pointed to by a symbol table has a reference count, a number that represents
the number of ways there are to get to that piece of memory. After the initial assignment
of the array to $worker and $worker to $other, the array pointed to by the symbol table
entries for $worker and $other has a reference count of 2.1 In other words, that memory
can be reached two ways: through $worker or $other. But after $worker[1] is changed,
PHP creates a new array for $worker, and the reference count of each of the arrays is
only 1.


★function parameter----------------------
func_num_args ==>$#?
func_get_args=>
func_get_arg(1)=>$1

isset(a)
isset(b)
==>設定されている?


Single-quoted strings do not interpolate variables.
echo '$name'
==>$name


$a= array(,,)
print_r($a)

Beware of using print_r() or var_dump() on a recursive structure such as $GLOBALS
(which has an entry for GLOBALS that points back to itself). The print_r() function loops
infinitely, while var_dump() cuts off after visiting the same element three times.

var_dump(true)
==>bool(true)


★echo $_COOKIE['PHPSESSID'];
==>これはないと、何もかわらない。。
session_start() ;

Build-in PHP Data Objects
==>PDO
The PHP Data Objects (PDO) extension defines a lightweight, consistent interface for
accessing databases in PHP. Each database driver that implements the PDO interface can
expose database-specific features as regular extension functions. Note that you cannot
perform any database functions using the PDO extension by itself; you must use a database-
specific PDO driver to access a database server.


file_exists($folder)
mkdir
folder
fread
fclose


imagecreate(width,heigth)
imagecolorallocate(image,red,green,blue)
imagegif
imagejpeg

a library vs a framework

・your code call libraries ,frameoworks call your code
・framework==>Don't call us, we'll call you


framework
===>
Frameworks are not the cure for all programming
problems. Putting aside today's awesome state of
development, you should always remember how
frameworks were created a few years ago. Most of them
were more or less unoptimized junk created by one guy to
help him speed up his development process, without much
care for documentation, elegance, ease of use, or even
readability of his code. Then another group of guys took
this code and bloated it with a patchwork of extra
functionalities barely consistent with the original code.
Then it became apparent that this whole lot needs a solid
cleanup in order to be usable, but this would mean either
rewriting it from scratch or packaging code in additional
wrapper classes, further increasing its unnecessary
complexity.
Of course, today the disorganized origin of frameworks is
not as evident as before because the quality of code has
risen considerably. But still, that's why most beefed-up
frameworks have performance issues. That's why they are
39
www.it-ebooks.info
not always easy to learn. And that's why new ones emerge
to cover up weaknesses of older ones. And finally that's
why major frameworks provide completely rewritten 2.0
versions, which address all previously mentioned
problems.

ftp 421 service not available vsftpd

yum install vsftpd
--->サーバー
yum install ftp
--->テスト用のクライアント


★vsftpd tcp_wrappers=YES
    ==>権限/etc/hostsに渡る

★vsftpd tcp_wrappers=YES
500 failed to open file
 =>SeLinux有効になっってる。
  getenforce
  sudo setenforce 0;