Programming

Programming questions? Ask a programmer for answers ASAP

Ask a Computer Expert,
Get an Answer ASAP!

The search function on my Russian Website does not work. I…

Customer Question
The search function on...

The search function on my Russian Website does not work. I get a 500 Error.
1. Click on Поиск which is the second item from the top of the left navigator panel. The search page will come up.
2. Enter a few characters, such as onan. They do not have to be Russian.
3. Click the search button. I get the following error.
500 Server Error
A misconfiguration on the server caused a hiccup. Check the server logs, fix the problem, then try again.
________________________________________
1. URL: http://russian.godsplanforlife.org/cgi-bin/search.plThe exact same system works on the English, Spanish and French sites.The search.pl file, located in the cgi-bin folder is identical in all three sites except for one line that describes the root folder to search.I can discuss various troubleshooting steps that I have taken.

Technician's Assistant: Is there a specific language you're coding in?

Perl supported by Dreamweaver

Technician's Assistant: What's your objective for this Perl project?

To get the search function working on the Russian page.

Technician's Assistant: Anything else you want the programmer to know before I connect you?

Not yet.

Submitted: 3 months ago.Category: Programming
Show More
Show Less
Ask Your Own Programming Question
Customer reply replied 3 months ago
I tried to add the search.pl file but an unknown error occurred.
Customer reply replied 3 months ago
The websites that work are:
godsplanforlife.org
spanish.godsplanforlife.org
french.godsplanforlife.org
Customer reply replied 3 months ago
Only the russian site search button does not work:
russian.godsplanforlife.org
Customer reply replied 3 months ago
I tried placing the English and then the Spanish search.pl files on the russian site in the cgi-bin folder and they still yielded the 500 error. I have checked that the cgi-bin folder has 755 permissions.
Customer reply replied 3 months ago
I called Bluehost 3 times and they kept saying that the problem is with my search.pl file.
Customer reply replied 3 months ago
Since the file attachment does not work, here is the search.pl file:#!/usr/bin/perl
#search.pl
#All utf8 specifications are essential in order to maintain utf8 encoding in the search field and on the search page.
#utf8 encoding is very important when there are foreign language characters in the search term.
#See http://stackoverflow.com/questions/627661/how-can-i-output-utf8-from-perl/627975#627975 for a good analyis of utf8 issues.use open IN => ":encoding(utf8)"; # Files, HTML output and error messages
binmode STDOUT, ":utf8";# The next four lines import special modules.
use CGI qw( -utf8 );
binmode STDIN; # Don't corrupt the CGI request
use CGI::Carp qw(fatalsToBrowser);
use File::Find;$cgi=new CGI();my $cgi = CGI->new();print $cgi->header(-type => 'text/html', -charset => 'utf-8');$search_term = $cgi->param('search_term');
$page = $cgi->param('page');my $search_term = $cgi->param('search_term');#The root directory is defined by the web hosting company. In this case it is Bluehost using Linux servers.
$root_dir = "/home2/godspla1/public_html/russian";$root_dir =~ s|/$||; #get rid of trailing slash$html_lines= "";#Specify directories to avoid searching.
$excluded = "cgi-bin|cgi_use|derived|images|_notes|_overlay|vti|_vti_cnf";#Walk the directory tree;
#open the file and look for the term.
#See http://perldoc.perl.org/File/Find.html for how the "find" function works.
#\&search refers to the subroutine search() that will do the searching.
find( \&search, $root_dir ) if $search_term;$html_lines ||= "<tr><td>No results found</td></tr>";$search_results = qq{<table border="0" width="100%" align="center">}
.$html_lines.qq{</table>};#Open the requested page to put in the results.
open (RESULTS, "$root_dir/$page") or die "Can't open results page ($root_dir/$page): $!";#Substitute the search results and replace the search term too.
# see http://www.gossland.com/perlcourse/intro/flow for an explanation of while loops.
while ( <RESULTS> ) {#Move the point of printing insertion down to the results area below the form.
s{<!-- search_results -->}{$search_results};
# s{<!-- search_results -->}{căutării}; This was a test.s{name="search_term"\s*?value=""}
{name="search_term" value="$search_term"};
print;
}
close RESULTS;#----- This subroutine uses the find command on line 28 to find the search term and build html strings.
sub search() {$seen = 0;$URL = $File::Find::name;
# !~ means not equal
# -f means the file is a normal file
#Exclude the exluded directories, sidebar.html and footer.html from the search. Files must be html.
if ( $URL !~ m/$excluded|sidebar|footer|vti/ and -f and /.html?/ ) {
$file = $_;
open FILE, $file;
@lines = <FILE>;
close FILE;#Grab the title, and the file name. We could even grab some context, but it gets trickier.
#Each element ($_) of the @lines array is one paragraph from the original file.
for ( @lines ) {$title = $1 if m|<title>(.*?)</title>|;
#The Q and the E are delimiters to escape interpretation of the contents between them as a regular expression.
#Increment $seen by one, which makes it true, if the match is seen.
$seen++ if /\Q$search_term\E/i;
$seen-- if m/\Q$search_term<\/a>\E/i;
}if ( $seen ) {
$URL =~ s|$root_dir||;#Format the found results into URL, title.
$html_lines .= qq{<tr><td><a href="$URL">$URL</a>};
$html_lines .= qq{</td><td>$title</td></tr>\n};
}
}
}
Customer reply replied 3 months ago
The only line that is different among the three search.pl files is the line that defines the root folder:
$root_dir = "/home2/godspla1/public_html/russian";
Answered in 3 days by:
4/3/2018
Programmer: George Sibiya, Computer Hardware Engineer replied 3 months ago
George Sibiya
George Sibiya, Computer Hardware Engineer
Category: Programming
Satisfied Customers: 364
Experience: PhD in Computer Science
Verified

Hi,

Welcome to JustAnswer and thank you for utilizing our services

I will be looking at your code and update you

Regards,

G

Ask Your Own Programming Question
Was this answer helpful?

How JustAnswer works

step-image
Describe your issueThe assistant will guide you
step-image
Chat 1:1 with a programmerLicensed Experts are available 24/7
step-image
100% satisfaction guaranteeGet all the answers you need
Ask ATLPROG Your Own Question
ATLPROG
ATLPROG
ATLPROG, Computer Software Engineer
Category: Programming
Satisfied Customers: 7,677
7,677 Satisfied Customers
Experience: MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

ATLPROG is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

One Happy CustomerNew York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

< Previous | Next >

Meet the Experts:

ATLPROG

ATLPROG

Computer Software Engineer

7,677 satisfied customers

MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

LogicPro

LogicPro

Computer Software Engineer

7,175 satisfied customers

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

unvadim

unvadim

Computer Software Engineer

1,168 satisfied customers

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

lifesaver

lifesaver

Computer Software Engineer

950 satisfied customers

Several years of intensive programming and application development experience in various platforms.

ehabtutor

ehabtutor

Computer Software Engineer

936 satisfied customers

Bachelor of computer science, 5+ years experience in software development, software company owner

TheDoctor

TheDoctor

Software Engineer

893 satisfied customers

M.S. in Internet Information Systems

The-PC-Guy

The-PC-Guy

Software Engineer

848 satisfied customers

Extensive Knowledge in PHP, MYSQL, CSS & Javascript

< Previous | Next >

Related Programming Questions
I am creating an online form (currently an HTML form), that
I am creating an online form (currently an HTML form), that I would like to collect information from those who enter it and have it sent to an email address through submit buttons on the bottom of the… read more
Jerubedo
Jerubedo
Software Engineer
Bachelor\u0027s Degree
7 satisfied customers
1) why my request form at www.thecondoexperts.info is not working
1) why my request form at www.thecondoexperts.info is not working now that transferred it from blue host to go daddy. ***@******.*** dot info and try the form at the top right. I am getting this error… read more
J Paul Richardson
J Paul Richardson
Associate Degree
162 satisfied customers
search engine text indexing, in the search page at https://www.google.
search engine text indexing, in the search page at https://www.google.com/#q=keyzom+bhutti i would like to block the website www.tibetelderlyhelp.org from appearing for the keyword which appears on th… read more
Marco
Marco
Director IT Consultant
Master's Degree
508 satisfied customers
I'm looking for hyperlinks in a web page for a small work
I'm looking for hyperlinks in a web page for a small work project to identify how we want to merge and reduce our sharepoint site right now, we have so many sites, that people don't use, or people upl… read more
Russell H.
Russell H.
Computer Technology Consultant
Vocational, Technical or Trade Scho
790 satisfied customers
***TheDoctor***1.) I got error 404 while trying to open
***TheDoctor*** 1.) I got error 404 while trying to open a link from my website. My website is www.isearchnaija.com and i clicked on a link www.naatnig.com. This is the code that generated the link: '… read more
TheDoctor
TheDoctor
Software Engineer
Master's Degree
893 satisfied customers
I just sent a request through for a .cgi script and was
Hi I just sent a request through for a .cgi script and was confused why this was then sent out to the experts again. This is my first time using JustAnswer so I'm sure this is a dumb question! HAHA. B… read more
unvadim
unvadim
Computer Software Engineer
Diplom
1,168 satisfied customers
Hello I need to be able to create a Fixed width html page to
Hello I need to be able to create a Fixed width html page to use as a slide in I am only using an image with a hyper link and just a plain old singe html file with no css. I have set both the image an… read more
neelimark
neelimark
Embedded Software Engineer
Bachelor\u0027s Degree
458 satisfied customers
I can run Perl as a cgi script. That part works, but how do
I can run Perl as a cgi script. That part works, but how do I get asp pages to recognise that the language used is Perlscript and not Vbscript? I have Microsoft WebMatrix. I have the windows 7 home ad… read more
david
david
Bachelor's Degree
129 satisfied customers
I need help with fixing some web code. Note the error at the
I need help with fixing some web code. Note the error at the page below: http://74.81.80.245/~children/parents/registrationCommit.php Basically, we have an online reigtrstion system that is currently … read more
Danielle-Moderator
Danielle-Moderator
5 satisfied customers
I understand most htm files conecting to a server use Perl
I understand most htm files conecting to a server use Perl language to process a Form in a htm file after pressing the "Submit" button. I have also heard that it can also be done with Visual Basic. Is… read more
Bryan
Bryan
735 satisfied customers
I am using the iBox javascript routine for pop up text.
I am using the iBox javascript routine for "pop up" text. It supports a delay in milliseconds. This delay works well for a smooth fade in on computers, but on phones and ipad it is jumpy. I would like… read more
LimeTrude
LimeTrude
IT Developer / Engineer
Master\u0027s Degree
64 satisfied customers
Lifesaver, I have a CGI/Perl project similar you did for someone
Create an HTML form and a script for Lake College. Name the form c03case1.html. Name the script c03case1.cgi. The shebang line should be with the unix server that I am using is #!/usr/bin/perl The for… read more
Sabertooth
Sabertooth
Freelancer
Bachelor\u0027s Degree
67 satisfied customers
I have a shared hosting plan with GoDaddy where I can host
I have a shared hosting plan with GoDaddy where I can host several domains, but I can only have one email address for form mail — which is my email address, linked to my account. I want to have indivi… read more
Eljon
Eljon
Software Developer Consultant
Associate Degree
562 satisfied customers
Creat an html named c03case1html. your form acton statement
Creat an html named c03case1html. your form acton statement should be as follows , remember to include a submit button This HTML form will allow the user to enter the students name and he number of ho… read more
Sabertooth
Sabertooth
Freelancer
Bachelor\u0027s Degree
67 satisfied customers
I have this code in html for a website. I am trying to get
I have this code in html for a website. I am trying to get the code in html to add my name, email address and phone number for they can have my contact information. WEBSITE UNDER CONSTRUCTION WEBSITE … read more
Ramesh Patil
Ramesh Patil
Master's Degree
417 satisfied customers
I have inserted this code into my WebplusX2 web page - and
I have inserted this code into my WebplusX2 web page - and whilst it works in preview ie I see a nice carousel - when I load it up onto the hosting server it does not display/work. I am at my wits end… read more
Ansh P.
Ansh P.
System Analyst
Bachelor\u0027s Degree
6,393 satisfied customers
I want to produce a web page which performs a simple sequence
I want to produce a web page which performs a simple sequence analysis task on a protein sequence provided as a 1-letter code. So i want basically three components: o An HTML page containing a web for… read more
brainbox nc
brainbox nc
Associate Degree
92 satisfied customers
How do I add robot codes to my website so that search engines
How do I add robot codes to my website so that search engines can find my site. I've already added metatags to my pages but can't seem to edit my source codes. I have a generic Microsoft website that … read more
Dutch Kim
Dutch Kim
Post-Doctoral Degree
44 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x