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

arinco.master
ASP:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="arinco.master.cs" Inherits="arinco" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Test</title>
<link rel="stylesheet" href="/styles.css" type="text/css" />
<style type="text/css">BODY { BACKGROUND-IMAGE: url(/img/arinco.gif); BACKGROUND-REPEAT: no-repeat; background-positin: Left Top }</style>
</head>
<body>
<form id="frmTest" runat="server">
<!-- 中略 -->
</form>
<hr class="Footer" />
</body>
</html>
arinco.master.cs
C#:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Arinco : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
これだとエラーが出るが、
arinco.master.cs
C#:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class arinco : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
こっちは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 |
○ |
先日サンコーのDigital MP4 Playerを購入したが、結局東芝のgigabeat MEV41も購入してしまった。決め手は・・・ (続きを読む...)
勢いあまって購入したのでレビューしときます。
(続きを読む...)
OpenPNE(オープンソースmixi)はさくらインターネットでの運用はさけたほうがいいかも。テーブルが多量に生成されるけどPrefixを指定できない(涙)。というかmixiしすぎて使い道に困る。概観や機能の完成度は高いと思う。
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に導入してみたところ発生した。
結局、前回さくらインターネットでClipperzを動作させるのに挫折したが以前、PHPを自分のHomeディレクトリでコンパイルしていた情報を見かけた記憶があったので調べてみた。参考にしたのはこちら。
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を運営のみなさまありがとうございました。
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としよ。