アリンコネット – あるSEのログ2


2008 年 9 月 24 日

MasterPageでCS0115エラー

カテゴリー: サイト構築, 開発(備忘録) – Tags: , – teminami 01:10

久しぶりにASP.NET2.0でAJAXを使ってみると・・・

CS0115

arinco.master

ASP:
  1. <%@ Master Language="C#" AutoEventWireup="true" CodeFile="arinco.master.cs" Inherits="arinco" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3.  
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head id="Head1" runat="server">
  6.     <title>Test</title>
  7.     <link rel="stylesheet" href="/styles.css" type="text/css" />
  8.     <style type="text/css">BODY { BACKGROUND-IMAGE: url(/img/arinco.gif); BACKGROUND-REPEAT: no-repeat; background-positin: Left Top }</style>
  9. </head>
  10. <body>
  11.     <form id="frmTest" runat="server">
  12.     <!-- 中略 -->
  13.     </form>
  14.     <hr class="Footer" />
  15. </body>
  16. </html>


arinco.master.cs

C#:
  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11.  
  12. public partial class Arinco : System.Web.UI.MasterPage
  13. {
  14.     protected void Page_Load(object sender, EventArgs e)
  15.     {
  16.     }
  17. }


これだとエラーが出るが、

arinco.master.cs

C#:
  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11.  
  12. public partial class arinco : System.Web.UI.MasterPage
  13. {
  14.     protected void Page_Load(object sender, EventArgs e)
  15.     {
  16.     }
  17. }


こっちはOK。どうも、マスターページのInherits名とマスターページ上のソースでのクラス名が異なると発生する。クラスだから大小文字の違いもだめ。
arinco.master Inherits="arinco"  
arinco.master.cs public partial class Arinco : System.Web.UI.MasterPage ×
arinco.master.cs public partial class arinco : System.Web.UI.MasterPage

2008 年 9 月 19 日

gigabeat MEV41購入

カテゴリー: レビュー – Tags: – teminami 00:45

先日サンコーのDigital MP4 Playerを購入したが、結局東芝のgigabeat MEV41も購入してしまった。決め手は・・・ (続きを読む...)

2008 年 9 月 12 日

サンコーDIGITAL MP4 PLAYERレビュー

カテゴリー: レビュー – Tags: – teminami 23:22

勢いあまって購入したのでレビューしときます。

(続きを読む...)

OpenPNE

カテゴリー: うだうだ, サイト構築 – Tags: – teminami 02:17

OpenPNE(オープンソースmixi)はさくらインターネットでの運用はさけたほうがいいかも。テーブルが多量に生成されるけどPrefixを指定できない(涙)。というかmixiしすぎて使い道に困る。概観や機能の完成度は高いと思う。

2008 年 9 月 10 日

MySQLで1366エラー

カテゴリー: サイト構築 – Tags: , – teminami 01:11

1366 - Incorrect integer value

というのは、int型のauto_incrementのフィールドに''を指定しても発生するように5.xから仕様が変わったせいらしい。詳細は

http://oshiete1.goo.ne.jp/qa2618399.html

http://www.esselbach.com/thread.php?id=533

あたり。意外と日本語の情報が少なくて困った。新規レコード登録時の初期値''をnullに変えればうまく行く・・・かも(未確認)。ClipperzをActiveWebに導入してみたところ発生した。

2008 年 9 月 7 日

さくらインターネットでClipperz

カテゴリー: サイト構築 – Tags: , , – teminami 22:32

結局、前回さくらインターネットでClipperzを動作させるのに挫折したが以前、PHPを自分のHomeディレクトリでコンパイルしていた情報を見かけた記憶があったので調べてみた。参考にしたのはこちら

PHPのバージョンは念のため現時点のさくらインターネット上のバージョン5.2.6にしておいた。

%cd
%mkdir tmp
%cd tmp
%wget http://jp.php.net/distributions/php-5.2.6.tar.gz
%tar -zxvf php-5.2.6.tar.gz
%setenv PHP_PEAR_CACHE_DIR $HOME/php/share/pear/cache;
%cd php-5.2.6
下記のオプションはさくらインターネット上でphpinfo()を実行した結果からちょっと修正したもの。--enable-calendarを付けたのはWordPressの一部プラグインで利用していたから。
%./configure --prefix=$HOME/php/ --enable-force-cgi-redirect --enable-mbstring --enable-mbregex --enable-calendar --enable-bcmath --with-openssl=/usr --with-gd --with-zlib=/usr --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-ttf -with-freetype-dir=/usr/local --with-mysql=/usr/local --with-pdo-mysql=/usr/local --enable-soap --with-curl --with-xsl=/usr/local --with-gettext=/usr/local --enable-exif
%make
%make install
あれ?なんか、パスに//が含まれてWarningが・・・
/home/youraccount/php//bin/ ??
↑こんな感じ
めげずに続行。
%cd ~/www/hoge
%ln ~/php/bin/php php5.cgi
自前PHPモジュールを利用したいディレクトリに.htaccessを下記のように設置。
Action php5-script /www/hoge/php5.cgi
AddHandler php5-script .php

500 Internal Server Error

だめだった。//になっていたPATHのせいか?と思いつつ、生成された実行ファイルもPHP5ではなくPHPだったので見直してた結果、赤字の部分を訂正。
%./configure --prefix=$HOME/php --program-suffix=5 --enable-force-cgi-redirect --enable-mbstring --enable-mbregex --enable-calendar --enable-bcmath --with-openssl=/usr --with-gd --with-zlib=/usr --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-ttf -with-freetype-dir=/usr/local --with-mysql=/usr/local --with-pdo-mysql=/usr/local --enable-soap --with-curl --with-xsl=/usr/local --with-gettext=/usr/local --enable-exif
%cd ~/www/hoge
%ln -f ~/php/bin/php5 php5.cgi
気を取り直して再度、ブラウザでphpinfo()のみを記載したtest.phpを表示すると

500 Internal Server Error

5.2.3からcgi用の実行ファイルはphp-cgiとして生成されるらしい

強制的にハードリンクを上書き。
%ln -f ~/php/bin/php-cgi5 php5.cgi

こっから先は、ClipperzをアップロードしてINSTALL.txtを参照すればOK!

参考にさせて頂いたBlogを運営のみなさまありがとうございました。

2008 年 9 月 4 日

IISでMODx

カテゴリー: サイト構築 – Tags: , – teminami 23:49

XOOPSの解説書を買っておきながら、DreamWeaverとの親和性が高いMODxを再び検証中。その際、エラーが出たので回避方法をメモ。

管理画面にて、設定を変更すると

Error while inserting event log into database

と表示される。不思議に思って、直前のSQLを出力させると・・・

INSERT INTO `modx`.`modx_event_log` (eventid,type,createdon,source,description,user) VALUES(0,2,1220510525,'設定ファイルがまだ書き込み可能になっています','悪意ある人たちはあなたのサイトや関連するあらゆるものを壊すことができてしまいます。本当です! 設定ファイル (/manager/includes/config.inc.php) を書込み不可にしてください!','1')Error while inserting event log into database.

ん?設定ファイルが読み取り専用じゃないからか。そういえば忘れてた。
これLinux上では正常にエラーメッセージ出てた気がするけど、IIS+MySQLでは何か違うのか・・・PHPはZendCoreを使用してます。 一応これで回避できたので、OKとしよ。