<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gototake blog &#187; 未分類</title>
	<atom:link href="https://blog.gototake.com/?cat=1&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>https://blog.gototake.com</link>
	<description>自分用メモ</description>
	<lastBuildDate>Mon, 21 Nov 2016 12:04:51 +0000</lastBuildDate>
	<language>ja</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.8.1</generator>
	<item>
		<title>httpd.confのディレクティブの入れ子設定</title>
		<link>https://blog.gototake.com/?p=194</link>
		<comments>https://blog.gototake.com/?p=194#comments</comments>
		<pubDate>Mon, 21 Nov 2016 12:04:51 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[未分類]]></category>

		<guid isPermaLink="false">http://blog.gototake.com/?p=194</guid>
		<description><![CDATA[通常はPHP7(モジュール)で動かしているサイトの、特定ディレクトリだけPHP5(CGI)で動かしたくて試行錯 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>通常はPHP7(モジュール)で動かしているサイトの、特定ディレクトリだけPHP5(CGI)で動かしたくて試行錯誤。</p>
<p>もともと、PHP7のほうは、<br />
SetHandler application/x-httpd-php</p>
<p>PHP5のほうは<br />
AddHandler fcgid-script .php</p>
<p>で、設定していた。</p>
<p>DirectoryMatchとか、FilesMatchでうまいことできないか試してみてもうまくいかず。</p>
<p>結局、まず最初にPHP7の設定を、<br />
AddHandler application/x-httpd-php .php</p>
<p>で、設定して、特定ディレクトリのほうを、<br />
SetHandler fcgid-script</p>
<p>で、上書きすることで対応した。</p>
<p>なんか、あんまスマートじゃない。</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.gototake.com/?feed=rss2&#038;p=194</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>電卓ボタンから電卓の複数起動を回避する試行錯誤</title>
		<link>https://blog.gototake.com/?p=191</link>
		<comments>https://blog.gototake.com/?p=191#comments</comments>
		<pubDate>Thu, 03 Nov 2016 14:41:19 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[未分類]]></category>

		<guid isPermaLink="false">http://blog.gototake.com/?p=191</guid>
		<description><![CDATA[マイクロソフトのエルゴノミック系のキーボードを使っている。 テンキーに電卓ボタンがついていて便利なのだが、押す [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>マイクロソフトのエルゴノミック系のキーボードを使っている。<br />
テンキーに電卓ボタンがついていて便利なのだが、押すたびに電卓が立ち上がる。<br />
複数起動を避けるために試行錯誤したメモ。</p>
<p>system32/calc.exeがランチャーの様子。<br />
これをいじりたかったけど、権限がうんたらでうまくいかず。</p>
<p>batかvbsで、電卓を立ち上げる、立ち上がっていればフォーカスを与えるようにする。</p>
<p>いろいろ試したけど、vbsのWscript.ShellのAppActivateで電卓にフォーカスを与えることができず。<br />
メモ帳とかはOK。UWPだから？<br />
仕方ないので、適当な電卓ソフトを探してきて、設置。</p>
<p>VBSを準備</p>
<style type="text/css">
.bwp-syntax-wrapper li {white-space: normal;}
</style>
<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar" style="right: 15px;" >
<div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a></div>
</div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple" style=" height: 252px;">
<table class="php">
<tbody>
<tr class="li1">
<td class="ln">
<pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
</pre>
</td>
<td class="de1">
<pre class="de1"><span class="kw2">Const</span> strCalcExe <span class="sy0">=</span> <span class="st0">&quot;BunCalc.exe&quot;</span> <span class="st_h">'プロセス名</span>
&nbsp;
<span class="st_h">call ActiveCalc</span>
&nbsp;
<span class="st_h">sub ActiveCalc()</span>
<span class="st_h"> &nbsp; &nbsp;Dim objWshShell</span>
<span class="st_h"> &nbsp; &nbsp;Dim calcID</span>
<span class="st_h"> &nbsp; &nbsp;</span>
<span class="st_h"> &nbsp; &nbsp;calcID=GetProcID(strCalcExe)</span>
&nbsp;
&nbsp;
<span class="st_h"> &nbsp; &nbsp;'</span>MsgBox calcID
&nbsp;
&nbsp; &nbsp; Set objWshShell <span class="sy0">=</span> CreateObject<span class="br0">&#40;</span><span class="st0">&quot;Wscript.Shell&quot;</span><span class="br0">&#41;</span>
&nbsp;
&nbsp; &nbsp; <span class="kw1">IF</span> calcID <span class="sy0">=</span> <span class="nu0">0</span> Then
&nbsp; &nbsp; &nbsp; &nbsp;strCmdLine <span class="sy0">=</span> <span class="st0">&quot;D:<span class="es1">\n</span>onInstallPrograms\BunCalc\BunCalc.exe&quot;</span>
&nbsp; &nbsp; &nbsp; &nbsp;Set objExecCmd <span class="sy0">=</span> objWshShell<span class="sy0">.</span><span class="kw3">Exec</span><span class="br0">&#40;</span>strCmdLine<span class="br0">&#41;</span>
&nbsp; &nbsp; <span class="kw1">Else</span>
&nbsp; &nbsp; &nbsp; &nbsp;objWshShell<span class="sy0">.</span>AppActivate calcID
&nbsp; &nbsp; <span class="kw3">End</span> <span class="kw1">If</span>
&nbsp;
&nbsp;
&nbsp; &nbsp; Set objWshShell <span class="sy0">=</span> Nothing
<span class="kw3">End</span> Sub
&nbsp;
<span class="kw2">Function</span> GetProcID<span class="br0">&#40;</span>ProcessName<span class="br0">&#41;</span>
&nbsp; &nbsp; Dim Service
&nbsp; &nbsp; Dim QfeSet
&nbsp; &nbsp; Dim Qfe
&nbsp; &nbsp; Dim RetInt
&nbsp;
&nbsp; &nbsp; Set Service <span class="sy0">=</span> WScript<span class="sy0">.</span>CreateObject<span class="br0">&#40;</span><span class="st0">&quot;WbemScripting.SWbemLocator&quot;</span><span class="br0">&#41;</span><span class="sy0">.</span>ConnectServer
&nbsp; &nbsp; Set QfeSet <span class="sy0">=</span> Service<span class="sy0">.</span>ExecQuery<span class="br0">&#40;</span><span class="st0">&quot;Select * From Win32_Process Where Caption='&quot;</span><span class="sy0">&amp;</span> ProcessName <span class="sy0">&amp;</span><span class="st0">&quot;'&quot;</span><span class="br0">&#41;</span>
&nbsp;
&nbsp; &nbsp; RetInt <span class="sy0">=</span> <span class="nu0">0</span>
&nbsp; &nbsp; 
&nbsp; &nbsp; <span class="kw1">For</span> <span class="kw3">Each</span> Qfe in QfeSet
&nbsp; &nbsp; &nbsp; &nbsp; RetInt <span class="sy0">=</span> &nbsp;Qfe<span class="sy0">.</span>ProcessId
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">Exit</span> <span class="kw1">For</span>
&nbsp; &nbsp; <span class="kw3">Next</span>
&nbsp;
&nbsp; &nbsp; GetProcID <span class="sy0">=</span> RetInt
<span class="kw3">End</span> <span class="kw2">Function</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="bwp-syntax-source">
<pre class="no-parse">Const strCalcExe = "BunCalc.exe" 'プロセス名

call ActiveCalc
 
sub ActiveCalc()
    Dim objWshShell
    Dim calcID
    
    calcID=GetProcID(strCalcExe)


    'MsgBox calcID

    Set objWshShell = CreateObject("Wscript.Shell")

    IF calcID = 0 Then
       strCmdLine = "D:\nonInstallPrograms\BunCalc\BunCalc.exe"
       Set objExecCmd = objWshShell.Exec(strCmdLine)
    Else
       objWshShell.AppActivate calcID
    End If


    Set objWshShell = Nothing
End Sub
 
Function GetProcID(ProcessName)
    Dim Service
    Dim QfeSet
    Dim Qfe
    Dim RetInt
 
    Set Service = WScript.CreateObject("WbemScripting.SWbemLocator").ConnectServer
    Set QfeSet = Service.ExecQuery("Select * From Win32_Process Where Caption='"&amp; ProcessName &amp;"'")

    RetInt = 0
    
    For Each Qfe in QfeSet
        RetInt =  Qfe.ProcessId
        Exit For
    Next
 
    GetProcID = RetInt
End Function</pre>
</div>
</div>
<p>キーの割り当ては、レジストリ。<br />
電卓ボタンは18番らしい。<br />
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\18<br />
文字列値を新規で追加する</p>
<p>名前 ShellExecute<br />
値 VBSファイルの絶対パス</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.gototake.com/?feed=rss2&#038;p=191</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PLESK11ではまったこと httpd.conf</title>
		<link>https://blog.gototake.com/?p=188</link>
		<comments>https://blog.gototake.com/?p=188#comments</comments>
		<pubDate>Wed, 19 Oct 2016 10:37:06 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[未分類]]></category>

		<guid isPermaLink="false">http://blog.gototake.com/?p=188</guid>
		<description><![CDATA[それぞれのドメインのapacheのconfは、 /var/www/vhosts/DOMAIN_NAME/con [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>それぞれのドメインのapacheのconfは、<br />
/var/www/vhosts/DOMAIN_NAME/conf</p>
<p>に、あるっぽい。そのなかのhttpd.includeは編集してはならず、<br />
vhost.conf<br />
vhost_ssl.conf<br />
を作成してそこに書く必要がある</p>
<p>それだけではだめで、pleskに認識させる必要があるので下記コマンド</p>
<p>/usr/local/psa/admin/sbin/httpdmng &#8211;reconfigure-domain DOMAIN_NAME</p>
<p>/usr/local/psa/admin/sbin/httpdmng &#8211;reconfigure-all</p>
<p>今回は、fcgiのmaxRequestLen</p>
<p><IfModule mod_fcgid.c><br />
    FcgidMaxRequestLen 60485760<br />
</IfModule></p>
]]></content:encoded>
			<wfw:commentRss>https://blog.gototake.com/?feed=rss2&#038;p=188</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP realPath関数が動かない</title>
		<link>https://blog.gototake.com/?p=185</link>
		<comments>https://blog.gototake.com/?p=185#comments</comments>
		<pubDate>Mon, 05 Sep 2016 09:32:05 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[未分類]]></category>

		<guid isPermaLink="false">http://blog.gototake.com/?p=185</guid>
		<description><![CDATA[指定するパスの上位ディレクトリ全部に実行権限がないとだめらしい。 ini_set(&#8216;open_ba [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>指定するパスの上位ディレクトリ全部に実行権限がないとだめらしい。</p>
<p>ini_set(&#8216;open_basedir&#8217;, &#8216;/&#8217;);<br />
で、とりあえず動いた。</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.gototake.com/?feed=rss2&#038;p=185</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fcgiのMaxRequestLenエラー</title>
		<link>https://blog.gototake.com/?p=182</link>
		<comments>https://blog.gototake.com/?p=182#comments</comments>
		<pubDate>Wed, 17 Aug 2016 16:04:18 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[未分類]]></category>

		<guid isPermaLink="false">http://blog.gototake.com/?p=182</guid>
		<description><![CDATA[mod_fcgid: HTTP request length 137460 (so far) exceeds  [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>mod_fcgid: HTTP request length 137460 (so far) exceeds MaxRequestLen (131072)<br />
のエラーがログに記録された。</p>
<p>httpd.confで、<br />
FcgidMaxRequestLen 10485760<br />
を、設定して解決</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.gototake.com/?feed=rss2&#038;p=182</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Win8.1にApacheとPHPをインストールしようとしてはまったこと</title>
		<link>https://blog.gototake.com/?p=178</link>
		<comments>https://blog.gototake.com/?p=178#comments</comments>
		<pubDate>Thu, 09 Jun 2016 16:40:08 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[未分類]]></category>

		<guid isPermaLink="false">http://blog.gototake.com/?p=178</guid>
		<description><![CDATA[モジュールでPHPを読み込んで、httpd.confを書き換えてApacheを起動しようとすると、 httpd [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>モジュールでPHPを読み込んで、httpd.confを書き換えてApacheを起動しようとすると、</p>
<p>httpd:Syntax Error on Line 135 of C:/apache/Apache22/conf/httpd.conf:Cannot load c:\php\php5apache2_2.dll into server &#8212;&#8212;&#8211;</p>
<p>と、なる。</p>
<p>どうやら、PHPが32bit版で、Apacheが64bit版だったのが問題。Apacheを32bitにしたら動いた。</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.gototake.com/?feed=rss2&#038;p=178</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS7とWindows7をデュアルブート</title>
		<link>https://blog.gototake.com/?p=153</link>
		<comments>https://blog.gototake.com/?p=153#comments</comments>
		<pubDate>Fri, 08 Apr 2016 09:36:33 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[未分類]]></category>

		<guid isPermaLink="false">http://blog.gototake.com/?p=153</guid>
		<description><![CDATA[