ラベル サーバー の投稿を表示しています。 すべての投稿を表示
ラベル サーバー の投稿を表示しています。 すべての投稿を表示

2012年4月30日月曜日

PHP でのエラーとか

Webからphpにアクセスしても真っ白(何も表示されない)な時は
コンソールから
$php -l {ファイルのパス}
とし シンタックスエラーが無いか確認する
PHP Parse error: syntax error, unexpected '*' in ./Filename.php on line Num
と表示された場合 ./filename.phpNum行目付近でパースできないと行ってるので
その行を確認する

No syntax errors detected in ./filename.php
と表示されればシンタックスエラーは無い
それでも表示されない場合は

$php -a ./{ファイル名}
として実際に実行してみる

そして今回は
PHP Fatal error: Allowed memory size of 838860800 bytes exhausted (tried to allocate 983040 bytes) in /var/www/video/public_html/includes/classes/lang.class.php on line 192
と表示されたので
/etc/php.iniの
memory_limitの量を大きくしhttpdをリロードする
service httpd reload
Reloading httpd: [ OK ]

2012年1月7日土曜日

OpenSSHでECDSA unknow key typeエラーが出る場合の対処法

OpenSSH 5.7からECDSA(楕円曲線暗号)がサポート[*]されるようになりました
だがしかし!
sshd起動するとECDSAのホストキーが無いよ!的なエラーメッセージが表示される!
Ω ΩΩ<な、なんだってー
(なかったら自動で生成するんじゃないの?)
と思いつつ
ssh-keygen でECDSAキーを生成しようとしても
[root@blog.m264.com ~]$ ssh-keygen -t ecdsa -N '' -f /etc/ssh/ssh_host_ecdsa_key
ssh-keygen: generating new host keys: ECDSA unknown key type (null)
と表示されて 生成できないんです


最初はOpenSSH側の問題だと思って調べてたんですが エラーメッセージちゃんと読むとECDSAとか知らないから作れねーよ BOKEって言ってたので
じゃぁssh_host_ecdsa_key作ればいんじゃね?って事で
[root@blog.m264.com ~]$ touch /etc/ssh/ssh_host_ecdsa_key

ってやったら普通にエラーメッセージ吐かずに動いてくれました、メデタシメデタシ。
(根本的な解決にはなってない気がするw


2010年10月1日金曜日

libxvidを入れる

yumにlibxvidが無かったのでソースファイルからインストールします
まずlibxvidをダウンロードします
[root@blog.m264.com ~]$ wget http://short.m264.info/xvidcore
--2010-09-30 18:36:51--  http://short.m264.info/xvidcore
downloads.xvid.org をDNSに問いあわせています... 88.198.32.206
downloads.xvid.org|88.198.32.206|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 643344 (628K) [application/x-bzip]
`xvidcore-1.2.2.tar.bz2' に保存中

100%[================================================>] 643,344      155K/s 時間 4.1s

2010-09-30 18:36:56 (155 KB/s) - `xvidcore-1.2.2.tar.bz2' へ保存完了 [643344/643344]
解凍してフォルダを移動します
[root@blog.m264.com ~]$ tar -xf xvidcore-1.2.2.tar.bz2
[root@blog.m264.com ~]$ cd ./xvidcore/build/generic
メイクしてインストールします
[root@blog.m264.com ~]$ ./configure
/root/work/xvidcore/build/generic
[root@localhost generic]# ./configure
checking build system type... i686-pc-linux
checking host system type... i686-pc-linux
checking target system type... i686-pc-linux
checking whether to use default CFLAGS... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking for whether to use assembly code... yes
checking for architecture type... ia32
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for int *... yes
checking size of int *... 4
checking whether byte ordering is bigendian... no
checking for build extensions... .so .a .o
checking for platform specific LDFLAGS/CFLAGS... ok
checking for yasm... no
checking for nasm... no
configure: WARNING: no correct assembler was found - Compiling generic sources only
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking for pthread_join in -lpthread... yes
configure: creating ./config.status
config.status: creating platform.inc
[root@blog.m264.com ~]$ make
D: =build
C: ./decoder.c
C: ./encoder.c
C: ./xvid.c
C: bitstream/bitstream.c
C: bitstream/cbp.c
C: bitstream/mbcoding.c
C: dct/fdct.c
C: dct/idct.c
C: dct/simple_idct.c
C: image/colorspace.c
C: image/image.c
C: image/interpolate8x8.c
C: image/font.c
C: image/postprocessing.c
C: image/qpel.c
C: image/reduced.c
C: motion/estimation_bvop.c
../../src/motion/estimation_bvop.c: In function ‘SMPMotionEstimationBVOP’:
../../src/motion/estimation_bvop.c:1107: 警告: unused variable ‘f_mbs’
C: motion/estimation_common.c
C: motion/estimation_gmc.c
C: motion/estimation_pvop.c
../../src/motion/estimation_pvop.c: In function ‘MotionEstimation’:
../../src/motion/estimation_pvop.c:912: 警告: unused variable ‘skip_thresh’
../../src/motion/estimation_pvop.c:907: 警告: unused variable ‘stat_thresh’
../../src/motion/estimation_pvop.c: In function ‘MotionEstimateSMP’:
../../src/motion/estimation_pvop.c:1015: 警告: unused variable ‘skip_thresh’
../../src/motion/estimation_pvop.c:1008: 警告: unused variable ‘stat_thresh’
C: motion/estimation_rd_based.c
C: motion/estimation_rd_based_bvop.c
C: motion/gmc.c
C: motion/motion_comp.c
C: motion/vop_type_decision.c
C: motion/sad.c
C: prediction/mbprediction.c
C: plugins/plugin_single.c
C: plugins/plugin_2pass1.c
C: plugins/plugin_2pass2.c
C: plugins/plugin_lumimasking.c
C: plugins/plugin_dump.c
C: plugins/plugin_psnr.c
C: plugins/plugin_ssim.c
C: quant/quant_h263.c
C: quant/quant_matrix.c
C: quant/quant_mpeg.c
C: utils/emms.c
C: utils/mbtransquant.c
C: utils/mem_align.c
C: utils/mem_transfer.c
C: utils/timer.c
L: libxvidcore.a
L: libxvidcore.so.4.2

---------------------------------------------------------------
Xvid has been successfully built.

* Binaries are currently located in the '=build' directory
* To install them on your system, you can run '# make install'
as root.
---------------------------------------------------------------
make install
D: /usr/local/lib
I: /usr/local/lib/libxvidcore.so.4.2
I: /usr/local/lib/libxvidcore.a
D: /usr/local/include
I: /usr/local/include/xvid.h

2010年6月14日月曜日

Windows7でプリンターを共有する(サーバ

  1. コンピュータにプリンタを接続します
  2. ホストOSのドライバーを導入します
  3. "コントロール パネル" => ハードウェアとサウンド => デバイスとプリンター
  4. を 開き共有したいプリンターをダブルクリックしてジョブ待機一覧を表示します
  5. "プリンター(P)" => "プロパティ(R)"を選択し共有タブを開きます
  6. この [プリンターを共有する(S)] のチェックボックス及び [クライアント コンピューターに印刷ジョブを表示する(R)] を有効にし適用します
  7. (必要に応じて追加ドライバーをインストールして下 さい)
  8. コンピューターに固定の非パブリックIPを割り当てて下さい(※任意(推奨))
  9. クライアント コンピューターで"コントロール パネル" => ハードウェアとサウンド => デバイスとプリンター を開き プリンターの追加ボタンをクリックします
  10. [ネットワーク、ワイヤレスまたはBluetoothプリンターを追加します(W)] をクリックします
  11. 利用できるプリンターが自動的に検索され表示されます(一覧に必要なプリンターが表示された場合は14へ 表示されない場合は10へ)
  12. [探しているプリンターはこの一覧にありません(R)] をクリックします
  13. [共有プリンターを名前で選択する(S)] が選択されていることを [確認して参照(R)] を選択します
  14. プリンターを接続しているコンピュータ名を選択し共有したいプリン ター名をクリックします
  15. 次へ(N) を押してプリンターを追加します
  16. 必要に応じて自動的にドライバーがイン ストールされます
  17. [テストページの印刷(P)] をクリックして正常に動作することを確認して下さい
  18. 印刷される 事を確認したら [完了(F)] をクリックして下さい