激凹みから立ち直る方法

まず、環境はwindows7 32bit xampp v3.2.1

xampp上のコントロールパネル→Admin→CGIのステータスは「開始」となっている。

apacheのv-host.conf上の変更点

<VirtualHost *:80>
DocumentRoot "C:/www1"
ServerName localhost
<Directory "C:/www1">
Options ExecCGI Indexes FollowSymLinks MultiViews
AddOutputFilter INCLUDES .html
AddType text/html .shtml
Order allow,deny
Allow from all
AddHandler image/gif .gif       
AddHandler image/jpeg .jpeg .jpg .jpe 
AddHandler image/png .png        
AddHandler text/html .html .htm    
Require all granted
</Directory>
</VirtualHost>

とした。

http://www.kent-web.com/count/daycount.html

上記のサイトのDAY COUNTERをwindows7 cドライブ直下に以下の様に設定した。



www1/
+- index.html ... ここにカウンタを設置するものとする
|
|         累計カウント : <img src="daycount.cgi?gif">
|          昨日カウント : <img src="daycount.cgi?yes">
|          本日カウント : <img src="daycount.cgi?today">
|
|          と記述
|
+--daycount / daycount.cgi [705]
| init.cgi [604]
| check.cgi [705]
| conv.cgi [705]
|
| .htaccess(AddType application/x-httpd-cgi .cgiと記述)
|
|
+-- lib / gifcat.pl [604]
| magick.pl [604]
|
+-- data / daycount.dat [606]
| today.dat [606]
| yes.dat [606]
|
+-- gif1 / 0.gif ... 9.gif
|
+-- gif2 / 0.gif ... 9.gif

なお、daycount.cgi
   check.cgi
   conv.cgi
   は一行目を#!"C:\xampp\perl\bin\perl.exe"とした。

色々サイトを見てcgi-binフォルダに画像ファイルを入れると画像が見れなくなる事とか
apacheではCGIの入ったフォルダに.htaccess(AddType application/x-httpd-cgi .cgiと記述)
を入れてやらないと動作しないとかの情報を元に上記の様な設定になったのですが上手くいかないようです。
一応画像もアップしておきました。なにかしらの参考になりましたら…

この設定でどこかおかしい所が有ればご指摘願います。

「CGIカウンターの画像が表示されません」の質問画像

A 回答 (1件)

詳しく見ていませんが、



<img src="daycount.cgi?gif">

ではなく

<img src="daycount/daycount.cgi?gif">

ではないですか?
    • good
    • 0
この回答へのお礼

うーむ。やってみたけど上手くいきませんでした…

お礼日時:2013/10/11 12:39

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!


おすすめ情報