test
tete
test
tete
いつも愛用させていただいている MargeDoc ProjectさんのPleiades All in One Eclipse(Eclipse 2019-09)環境を新規に構築
PDTを起動した状態でPHPが動くたびにデバッグパースペクティブが開き、最初の行でブレイクしてくれてうざかった
なんでかな~?っと思って調べてみたら
php.iniの設定が
xdebug.remote_autostart = 1
になっていて、この設定だとデバッガーが勝手に起動してくれるんだそう
ある意味便利なんだけど、けっこううざいのでOFFにします
xdebug.remote_autostart = off
ってすればOK
Windowsを再インストールする時にプロダクトキーなんだっけ?
ってなるそんな時、コマンドプロンプトで次のコマンドを実行すると幸せになれる。
wmic path SoftwareLicensingService get OA3xOriginalProductKey
Chromeの開発者ツールが最近優秀だと聞いたので調べてみた。
■公式の説明
https://developers.google.com/web/tools/chrome-devtools/
公式はちょっと見ずらいので他を探してみた
http://www.buildinsider.net/web/chromedevtools/01
http://commte.net/blog/archives/5882
まぁググればいいんですけどね(;´・ω・)
先日仕事用のPCをWindows10にたのですが、タスクバーにある「タスクビュー」なるものを見つけて「仮想デスクトップ」なる機能をみつけました。
仕事中に別な作業依頼が来て画面にウインドウがあふれるなんてことがよくある私なのですけど、この仮想デスクトップでお仕事を切り分けられます!
Win10にしていろいろ不便を感じることがあるけど、久しぶりに「いいね!」って思う機能をみつけて喜びを感じたひと時でした(笑
ショートカット
新規:[Win]+[CTL]+[N]
切り替え:[Win]+[CTL]+([←] or [→])
mysql -u ユーザー名 -pパスワード –default-character-set=utf8 データベース名 < ファイルのパス っという風にdefault-character-setを指定してあげる必要があるみたい
WordPressのURLは設定→パーマリンク設定でパターンカスタマイズできるので、その設定毎のURLを示します
■デフォルト
ページ種別 | テーマファイル | URL |
---|---|---|
個別記事 | single.php | /?p=[リビジョン番号] |
固定ページ | page.php | /?page_id=[リビジョン番号] |
アーカイブ | archive.php | /?m=[年月] |
カテゴリー | category.php | /?cat=[カテゴリID] |
タグ | tag.php | /?tag=[slug] |
検索 | search.php | /?s=[検索文字] |
■日付と投稿名
ページ種別 | テーマファイル | URL |
---|---|---|
個別記事 | single.php | /[年]/[月]/[日]/[slug] |
固定ページ | page.php | /[slug] |
アーカイブ | archive.php | /[年]/[月]/ |
カテゴリー | category.php | /category/[slug] |
タグ | tag.php | /tag/[slug] |
検索 | search.php | /?s=[検索文字] |
■月と投稿名
ページ種別 | テーマファイル | URL |
---|---|---|
個別記事 | single.php | /[年]/[月]/[slug] |
固定ページ | page.php | /[slug] |
アーカイブ | archive.php | /[年]/[月]/ |
カテゴリー | category.php | /category/[slug] |
タグ | tag.php | /tag/[slug] |
検索 | search.php | /?s=[検索文字] |
■数字ベース
ページ種別 | テーマファイル | URL |
---|---|---|
個別記事 | single.php | /archve/[リビジョン番号] |
固定ページ | page.php | /[slug] |
アーカイブ | archive.php | /archve/date/[年]/[月]/ |
カテゴリー | category.php | /archve/category/tag/[slug]/ |
タグ | tag.php | /archve/tag/[slug] |
検索 | search.php | /?s=[検索文字] |
■投稿名ベース
ページ種別 | テーマファイル | URL |
---|---|---|
個別記事 | single.php | /[slug] |
固定ページ | page.php | /[slug] |
アーカイブ | archive.php | /[年]/[月]/ |
カテゴリー | category.php | /category/[slug] |
タグ | tag.php | /tag/[slug] |
検索 | search.php | /?s=[検索文字] |
XAMPPでSSLを利用する場合、localhostへのアクセスは特に設定をすることなくでるけど、バーチャルホストでSSLを利用する場合は認証鍵の作成などが必要になるのでその方法を残します。
■認証鍵の作成に必要なものと在り処
ファイル名 | PATH |
---|---|
openssl.exe | %XAMPP_PATH%\apache\bin\openssl.exe |
openssl.cnf | %XAMPP_PATH%\apache\conf\openssl.cnf |
■SSL作成手順
※%XAMPP_PATH%の部分はそれぞれの環境に合わせて置換してください
cd %PATH_TO_DIR%
set path=%path%;%XAMPP_PATH%\apache\bin
set OPENSSL_CONF=%XAMPP_PATH%\apache\conf\openssl.cnf
openssl genrsa -des3 -out example.com.key 1024 Loading 'screen' into random state - done Generating RSA private key, 1024 bit long modulus ..++++++ ..................++++++ e is 65537 (0x10001) Enter pass phrase for ec-movie.local.key: #パスフレーズを入力 Verifying - Enter pass phrase for ec-movie.local.key: #もう一度入力
openssl req -new -key example.com.key -out example.com.csr Enter pass phrase for ec-movie.local.key: #パスフレーズを入力 Loading 'screen' into random state - done You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:JA State or Province Name (full name) [Some-State]: #都道府県を入力 Locality Name (eg, city) []: #市区町村を入力 Organization Name (eg, company) [Internet Widgits Pty Ltd]: #会社名 Organizational Unit Name (eg, section) []: #部署名 Common Name (e.g. server FQDN or YOUR name) []: #ドメイン Email Address []: #空 Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: #空 An optional company name []: #空
openssl req -new -x509 -days 365 -key example.com.key -out example.com.crt Enter pass phrase for ec-movie.local.key: #パスフレーズ Loading 'screen' into random state - done You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:JA State or Province Name (full name) [Some-State]: #都道府県を入力 Locality Name (eg, city) []: #市区町村を入力 Organization Name (eg, company) [Internet Widgits Pty Ltd]: #会社名 Organizational Unit Name (eg, section) []: #部署名 Common Name (e.g. server FQDN or YOUR name) []: #ドメイン Email Address []: #空
openssl rsa -in example.com.key -out example.com.key Enter pass phrase for ec-movie.local.key: #パスフレーズ writing RSA key
■Apacheに反映
<VirtualHost *:443> ServerAdmin webmaster@dummy-host.example.com DocumentRoot "c:\path\to\document\root" ServerName example.com ServerAlias www.example.com ErrorLog "logs/ec.example.com.com-error.log" CustomLog "logs/ec.example.com.com-access.log" common SSLEngine on SSLProtocol all -SSLv2 SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW SSLCertificateFile "conf/ssl.crt/example.com.crt" SSLCertificateKeyFile "conf/ssl.key/example.com.key" <Directory "c:\path\to\document\root"> Options FollowSymLinks AllowOverride All Require all granted </Directory> </VirtualHost>
※非SSL(http)のバーチャルホスト定義をコピペしてSSL(443)ポートの定義を書き、SSLキーファイルを追記してます
あとはxamppを起動して動作確認してください。
久しぶりにCentOS(6.4-i386)をインストールしたので備忘ログ
1. /etc/sysconfig/networkに以下を追加。
vi /etc/sysconfig/network
NETWORKING_IPV6=no
2. /etc/modprobe.d/disable-ipv6.confファイルを作成して以下を書く。
vi /etc/modprobe.d/disable-ipv6.conf
options ipv6 disable=1
3. 以下を実行。
chkconfig ip6tables off
4. /etc/sysconfig/network-scripts/ifcfg-eth0を変更
vi /etc/sysconfig/network-scripts/ifcfg-eth0
IPV6INIT=”no”
IPV6_AUTOCONF=”no”
5. 再起動。
reboot
サービスを止める
/etc/init.d/iptables stop /etc/init.d/ip6tables stop
再起動時に起動しないように設定
chkconfig iptables off chkconfig ip6tables off
※ntpが入っていること
ntpdate ntp.nict.jp
http://centossrv.com/rpmforge.shtml
※clamd startする前に下のコマンドが必要
http://centossrv.com/clamav.shtml
freshclam
yum -y install httpd
デフォルトは/etc/httpd/conf/httpd.confにすべての情報が入っている
AllowOverrideをAllにする
Options のIndexesを削除する
virtualhostの設定をしやすくするため、最後に次の1行を設定
Includes conf/virtualhost/*.conf
virtualhostディレクトリを作成
mkdir /etc/httpd/conf/virtualhost
バーチャルホストのテンプレを作成
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/virtualhost/default.conf.tpl
default.conf.tplを編集して、Virtualhostディレクティブのみにする
yum -y install mysql-server
yum -y install php yum y- install php-pdo yum y- install php-mysql