facebook twitter hatena line email

「Linux/perlインストール」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(defined(%hash) is deprecated at ./jcode.pl エラー)
(defined(%hash) is deprecated at ./jcode.pl エラー)
行35: 行35:
  
 
[[linux/vimメモ]] [ショートカット]
 
[[linux/vimメモ]] [ショートカット]
 +
 +
==Use of "do" to call subroutines is deprecated at ./jcode.plエラー==
 +
エラーメッセージ
 +
AH01215: Use of "do" to call subroutines is deprecated at ./jcode.pl line 328.
 +
 +
以下からjacode.plをDL
 +
https://d-wave.cc/troubleshooting/1283.html
  
 
==defined(%hash) is deprecated at ./jcode.pl エラー==
 
==defined(%hash) is deprecated at ./jcode.pl エラー==

2021年12月31日 (金) 08:20時点における版

インストール

yum install perl
/usr/bin/perl -v

mod_cgi追加

$ sudo vi /etc/httpd/conf/httpd.conf
LoadModule cgi_module modules/mod_cgi.so

参考:https://www.javadrive.jp/apache/php/index5.html

apacheでcgiを動かす

  • /etc/httpd/conf/httpd.conf
#AddHandler cgi-script .cgi
 ↓
AddHandler cgi-script .cgi

オプションにExecCGIを追加する

<Directory "/var/www/html/cgi-bin">
  Options ExecCGI
</Directory>

apache上でcgiを動かす

$chmod 755 test.cgi

-test.cgi

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello, World.";

AH01215: (2)No such file or directory: exec ofエラー

windowsで作ったものは文末にCR+LF(^M)がつくのでLFのみにしないとerrorとなる ^Mを削除するにはviで開いて"%s/^M//g"とする^Mは[Ctrl+v]を押したまま[Ctrl+m]で入力

参考:https://mgng.mugbum.info/664

linux/vimメモ [ショートカット]

Use of "do" to call subroutines is deprecated at ./jcode.plエラー

エラーメッセージ

AH01215: Use of "do" to call subroutines is deprecated at ./jcode.pl line 328.

以下からjacode.plをDL https://d-wave.cc/troubleshooting/1283.html

defined(%hash) is deprecated at ./jcode.pl エラー

エラーメッセージ

defined(%hash) is deprecated at ./jcode.pl line 572.

684行目

- &init_z2h_euc unless defined %z2h_euc;
+ &init_z2h_euc unless defined $z2h_euc_inited;
- &init_z2h_sjis unless %z2h_sjis;
+ &init_z2h_sjis unless defined $z2h_sjis_inited;

参考:http://tottoco.tsuyushiba.com/Entry/20/