I am very new to perl... today is my first encounter. and i think i messed up pretty big.
I was trying to update some info on a website, so i thought I could just open the index.pl file and change what was in there (and i didn't make a back up ) The program i used changed the formatting and i didn't realize this.
Is this an acceptable practice to edit this file as long as you don't change the formatting?
now i get this error on the site Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
any ideas? suggestions?
11 1649
I am very new to perl... today is my first encounter. and i think i messed up pretty big.
I was trying to update some info on a website, so i thought I could just open the index.pl file and change what was in there (and i didn't make a back up ) The program i used changed the formatting and i didn't realize this.
Is this an acceptable practice to edit this file as long as you don't change the formatting?
now i get this error on the site Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
any ideas? suggestions?
Yes, ALWAYS make a back up of any file you are going to modify. It helps you avoid these types of situations.
We would definitely need to know more. What did you change? How did the formatting change? Can you post the code (surrounded by code tags) here?
Regards,
Jeff
-
#!/usr/bin/perluse strict;use warnings;use diagnostics;use CGI;use CGI::Carp qw/fatalsToBrowser/;use DBI;use Data::Dumper;use Registration;my $cgi = new CGI;Registration::print_header($cgi);=headprint <<EOS;<p>Registration for the 2007 SWE Engineering Career Fair is not yet open.To be notified when registration opens, contact the Coordinator, EOSprint email_officer("Coordinator"),". ";=cutprint <<EOS;<p>Registration opens Monday, November 26th, 2007.EOSprint <<EOS;</p><p>Company registration is \$450, and this includes one table/booth, lunch, and sufficient parking passes. Additional tables can be purchased for \$225 each. Hospitality suites overlooking the football field can also be purchased for \$300. This includes unlimited access to the suite during the career fair, private restroom, storage area, television monitors, and comfortable seating for company representatives or an interview room for students, at your discretion.</p><p>This year, for the first time, the Society of Women Engineers is offering a discount of \$150 to 501(c)(3) non-profit organizations and to government agencies. If this applies to you, please check the appropriate box on the registration page. Please note that this discount only applies to the first table, and that it is subject to verification.</p><p>Registration closes Thursday, February 1st, 2007. Late registrations will not be accepted.</p><p>Employer registration is limited to corporations, government agencies, and non-profit employers. We are unable to accept registrations from employment agencies and referral services.</p>EOSRegistration::print_footer($cgi);
-
i just changed some regular txt in here but i don't know how the original format is. I tried putting it all back on one line.
i changed the
Registration opens Monday, November 26th, 2007.
-
#!/usr/bin/perluse strict;use warnings;use diagnostics;use CGI;use CGI::Carp qw/fatalsToBrowser/;use DBI;use Data::Dumper;use Registration;my $cgi = new CGI;Registration::print_header($cgi);=headprint <<EOS;<p>Registration for the 2007 SWE Engineering Career Fair is not yet open.To be notified when registration opens, contact the Coordinator, EOSprint email_officer("Coordinator"),". ";=cutprint <<EOS;<p>Registration opens Monday, November 26th, 2007.EOSprint <<EOS;</p><p>Company registration is \$450, and this includes one table/booth, lunch, and sufficient parking passes. Additional tables can be purchased for \$225 each. Hospitality suites overlooking the football field can also be purchased for \$300. This includes unlimited access to the suite during the career fair, private restroom, storage area, television monitors, and comfortable seating for company representatives or an interview room for students, at your discretion.</p><p>This year, for the first time, the Society of Women Engineers is offering a discount of \$150 to 501(c)(3) non-profit organizations and to government agencies. If this applies to you, please check the appropriate box on the registration page. Please note that this discount only applies to the first table, and that it is subject to verification.</p><p>Registration closes Thursday, February 1st, 2007. Late registrations will not be accepted.</p><p>Employer registration is limited to corporations, government agencies, and non-profit employers. We are unable to accept registrations from employment agencies and referral services.</p>EOSRegistration::print_footer($cgi);
-
i just changed some regular txt in here but i don't know how the original format is. I tried putting it all back on one line.
WOW!!! What did you use to do this again? (editor wise) If this code was formatted correctly before you made any changes, something drastic happened to get it in this condition.
Lets see what we can do: -
#!/usr/bin/perl
-
-
use strict;
-
use warnings;
-
use diagnostics;
-
use CGI;
-
use CGI::Carp qw/fatalsToBrowser/;
-
use DBI;
-
use Data::Dumper;
-
use Registration;
-
-
my $cgi = new CGI;
-
Registration::print_header($cgi);
-
-
=headprint <<EOS;
-
<p>Registration for the 2007 SWE Engineering Career Fair is not yet open.To be notified when registration opens, contact the Coordinator,
-
EOS
-
-
print email_officer("Coordinator"),". ";
-
-
=cut
-
print <<EOS;
-
<p>Registration opens Monday, November 26th, 2007.
-
EOS
-
print <<EOS;
-
</p><p>Company registration is \$450, and this includes one table/booth, lunch, and sufficient parking passes. Additional tables can be purchased for \$225 each. Hospitality suites overlooking the football field can also be purchased for \$300. This includes unlimited access to the suite during the career fair, private restroom, storage area, television monitors, and comfortable seating for company representatives or an interview room for students, at your discretion.</p><p>This year, for the first time, the Society of Women Engineers is offering a discount of \$150 to 501(c)(3) non-profit organizations and to government agencies. If this applies to you, please check the appropriate box on the registration page. Please note that this discount only applies to the first table, and that it is subject to verification.</p><p>Registration closes Thursday, February 1st, 2007. Late registrations will not be accepted.</p><p>Employer registration is limited to corporations, government agencies, and non-profit employers. We are unable to accept registrations from employment agencies and referral services.</p>
-
EOS
-
Registration::print_footer($cgi);
-
I don't know if that is totally correct for formatting, but it is a lot better looking than what you had.
Regards,
Jeff
I used a program called alleycode
when i opened this file in notepad it was all on one line originally. Is it suppost to stay that way?
What program should I be using to edit these?
What program should I be using to edit these?
First, do not EVER use notepad. It is one of the worst programs for editing (IMHO). As you found out, there are not carriage returns and when it does wrap, it usually isn't correctly.
My suggestion would be to find yourself a good editor that does not strip off or not recognize carriage returns. Some more popular editors are Textpad and Notetab Light.
My personal preference when I do anything coding wise is to use my IDE. I lean towards Komodo from Active State, using it for pretty much all of my development.
In my opinion, IDE's are personal preference. Find one you like and stick with it.
Regards,
Jeff
Notepad is OK for editing short perl scripts. The problem is that the first editor is using line ending that notepad does not recognize so it lumps all lines together.
Google for "perl express" it's a free perl IDE that works very well. Not sure how many operating systems it's ported for though.
Keep in mind, you can use any editor for perl files but always save them as text or ascii and not in some other format like rtf or doc.
Notepad is OK for editing short perl scripts. The problem is that the first editor is using line ending that notepad does not recognize so it lumps all lines together.
Google for "perl express" it's a free perl IDE that works very well. Not sure how many operating systems it's ported for though.
Keep in mind, you can use any editor for perl files but always save them as text or ascii and not in some other format like rtf or doc.
OMG, I am probably going to turn you into a hot head (with all the smoke I am blowing up your a%%) but Kevin, YOU ROCK!!!
I had no idea, or even an inkling to check and see if there was a free perl IDE.
Sweet!!!
On to my next project ... creating a CMS with perl and mySQL
thanks!
OMG, I am probably going to turn you into a hot head (with all the smoke I am blowing up your a%%) but Kevin, YOU ROCK!!!
I had no idea, or even an inkling to check and see if there was a free perl IDE.
Sweet!!!
On to my next project ... creating a CMS with perl and mySQL
thanks!
Hey Kevin! I have some sandbags lying around that you can borrow if you need them. Wouldn't want you to float away on us. He he he.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Marina |
last post by:
Hi,
I was playing around with a tool available from gotdotnet to create
documentation from xml comment in vb.net. Part of what I had to do was
install an add in to allow help projects to be...
|
by: ftw |
last post by:
I am using SQL7 Query Analyzer. A simple select * from myMLSview and
then I save results as a .csv file has the commas messed up in quite a
few places. The data is messed up before I save it to the...
|
by: Patrick Sullivan |
last post by:
I am trying to read a text file laid out like, "textfield1, textfield2,
etc," and only extract the first value (textfield1) to add to the listbox.
But instead of listing vertically, I get three...
|
by: Jordan Tiona |
last post by:
I was working on a project. I got an error on one of my runs, and closed the
application by pressing the x, which was followed by a "You have chosen to
close a program that is not responding, etc."...
|
by: David C. Barber |
last post by:
Using SQL Server 2000 and moving to a new computer. We did a full backup of
the existing database to tape, brought up the new computer with a clean
install using the same server name and IP...
|
by: joshua_jacobsen |
last post by:
I have a problem with file downloads. Here is the basic code:
sqlstring = "SELECT * FROM WHERE RecordID = " &
formatDBNumber(RecordID) & ";"
SQLDataSetObject = New DataSet("Image")...
|
by: RZ15 |
last post by:
Hi,
I was working on a query this morning and everything was working fine. Some time in the last half hour, I used the Compact & Repair Database feature. After that, when I went to open the query...
|
by: blaine |
last post by:
The wxPython group is a bit stale compared to this group, so I'll give
it a shot :)
(READ: Originally when I started htis post, Python 2.5 at the shell
did not work (identical behavior to...
|
by: agarwasa2008 |
last post by:
Hi,
I have a perfect file called "Products.xls" that I link to my MS
Access 2003 database and everytthing looks good in that file.
When I view the same file after linking in my database the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |