Thanks.
=== CODE ======
# BEGINNING of cgi52_search_header_us01.pl
#
print " Content-type: text/html\n\n" ;
print "
Search Result of $query_performer_name.
" ;
print "
$query_performer_name
";
# Here is border line ===========================================================
So stupid to myself. But this is the daily life of not-so-bright programmer. Thanks so much !!
]]>I will post the references.
==== httpd error_log about 10 lines ================
"error_log" 30085L, 10087905B
Entering Ex mode. Type "visual" to go to Normal mode.
[Fri May 19 08:09:31.243913 2023] [http:error] [pid 563189:tid 563250] [client 106.154.124.30:35684] AH02429: Response header name ' Content-
type' contains invalid characters, aborting request, referer: http://110.3.33.130/cgi-bin/cgi53_1_us01.pl?performer_name=alfred_brendel
[Fri May 19 08:10:08.223604 2023] [http:error] [pid 563189:tid 563253] [client 106.154.124.30:35696] AH02429: Response header name ' Content-
type' contains invalid characters, aborting request, referer: http://110.3.33.130/cgi-bin/cgi53_1_us01.pl?performer_name=alfred_brendel
[Fri May 19 08:11:59.726934 2023] [http:error] [pid 563189:tid 563236] [client 106.154.124.30:35710] AH02429: Response header name ' Content-
type' contains invalid characters, aborting request, referer: http://110.3.33.130/cgi-bin/cgi53_1_us01.pl?performer_name=alicia_de_larrocha
[Fri May 19 08:26:02.674690 2023] [http:error] [pid 563189:tid 563241] [client 106.154.124.30:35714] AH02429: Response header name ' Content-
type' contains invalid characters, aborting request, referer: http://110.3.33.130/cgi-bin/cgi53_1_us01.pl?performer_name=alicia_de_larrocha
[Fri May 19 08:26:10.607154 2023] [http:error] [pid 563189:tid 563243] [client 106.154.124.30:35716] AH02429: Response header name ' Content-
type' contains invalid characters, aborting request, referer: http://110.3.33.130/cgi-bin/cgi53_1_us01.pl?performer_name=alicia_de_larrocha
=== CODE ===================
# BEGINNING of cgi53_search_header_us01.pl
print "Content-type: text/html \n\n";
print "
<html>
<head><title>Search Reuslt of $query_performer_name.</title></head>
<body bgcolor=\"#ffffff\">
";
print "
<table>
<tr>
<td width=\"50\"> </td>
<td width=\"600\"><font size=\"5\"><b> $query_performer_name </b></font> </td>
</tr>
</table>
<hr />
";
# Here is border line ===========================================================
use lib ' . '; has fixed my problem.
Thanks so much. I don't have the habit of reading error log.
/var/log/httpd/error_log
I should do so (reading error log more frequently). Thank you for all of your comments.
]]>Let.'s me test the directory search path fix. I have never made any Perl module yet. Is it easy to make it? How to make it? Is there any good introduction to read for making simple part of Perl codes into a Perl module?
]]>After the movement a pair of Perl scripts (script_main.pl and script_sub.pl), in which I integrated the minor script_sub.pl into the main part (script_main.pl) by using "require".
In the main script_main.pl, I just inserted the following line,
require 'script_sub.pl';
By this way, two scripts worked as if one. While Perl version was 5.8.8. (Redhat Fedora Core 7) this way worked.
However, it appeared that when in Perl 5.32.1 (Rocky9.1) it encountered an error. I studied a little bit of Perl 5.32.1. There are "require", "use", and "import" as possible vocabulary. In my case, it is just joining two pieces of Perl code by the way of "require". What do you suggest in order to chop down into two pieces from a long full Perl script code CGI, and then to join them together ?
Thanks for your help !
By the way, I have a tiny question related with character encoding. To clearly present my question, I want to post screenshot (png or jpg) here. May I use graphics file attachment here?
]]>Perl Script, check.pl
#!/usr/bin/env perl
use strict;
use warnings;
use CGI;
my $q = CGI->new;
print $q->header();
print "OK";
===================
OUTPUT
mkido@localhost$check.pl [Enter to run it.]
Content-Type: text/html; charset=ISO-8859-1
OK
mkido@localhost$
This output result evoked my recognition. Is this Rocky 9.1 Web Server running to provide charset=ISO-8859-1 ?? I want to set all replies from the Server to charset=UTF-8. The httpd.conf is already set to charset=UTF-8. Is there any other setting adjustment somewhere in environmental configuration on my server to change from charset=ISO-8859-1 to charset=UTF-8 ?? Thanks, thanks.
I am not perfect to understand what you say, but at least I am getting into it. It appears to me that the script starting with
#!/usr/bin/env perl
use strict;
use warnings;
is popular nowadays. So, I will follow this way to see what will happen. I will also study your links too. Thanks, thanks so much.
]]>Until recently I runs all of my Perl scripts as well as Perl_CGI scripts by starting the folowing salutation,
#! /usr/bin/perl -w
The script with this beginning runs well at BASH shell at (/home/mkido/bin) LINUX such as Fedora, Ubuntu, Rocky (Alma-derivative). However, almost right now I noticed some of Perl example around has the different first line as below,
#! /usr/bin/env perl
And it doesn't seem to run at HOME BASH shell (/home/mkido/bin) by simple way of executing it by-itself by the command line. Will someone explain me about what is this [env perl] stuff? Thank you so much.
Mitsuru Kido
]]>Dear Dave Cross, Hi ! Thank you again. I even don't know how to check the Perl version number. I just made proximity guess from recent Fedora Release. What I meant Perl 5.36 is somewhere near around Perl 5.36, and I didn't know the exact Perl version in Rocky 9.1.
]]>