![]() |
|
|
Other Products |
Every script comes with detailed installation instructions generated specifically for that script. The information on this page picks up where your custom instructions leave off.
Modifying How the Script Displays Results
Your Custom Instructions are For Unix and My Server is an NT or Running MacPerl! It is often very difficult to determine why an NT machine running Perl will not execute properly. There are simply too many different ways that the server can be configured. The best bet is to ask your server administrator and to consult your server documentation. You can ask your ISP, but often they will tell you that they don't support other people's CGI scripts. If they tell you this, try to install this test script and ask them why it doesn't work. If you are using the ActiveState version of Perl, see here. We'll also try to install the script for you from our Installation Troubleshooting Page.I Have Followed the Instructions, But I Keep Getting a "Can't Find Data File Error" or "Can't Open State File Error" or "Can't Open keyfile.txt," or Related Error If you are getting an error produced by the script (not an "Internal Server Error"), then chances are that your script is complaining because the paths to one or more of your files is incorrect. The good news is that you are not getting an "Internal Server Error." This means, at least, that you are properly pointing to Perl and that your script contains no fatal errors. In order to resolve this problem, you have to provide full or relative paths to your files. Path information never begins with http://, but often looks like the following for full paths:I Keep Getting an Internal Server Error Often when you get an Internal Server type Error, there will some indication of the problem in the error logs, but this information is not always useful and few people on virtual servers have access to their error logs. Your script itself will produce errors if it can't find files at locations you specified in Step B, so if you are getting an Internal Server error, don't spend a lot of time trying to fix locations in Step B, because this is not your problem. The problem is that the server doesn't know what to do with your Perl file because it wasn't able to execute it properly. Any one of the following could cause this error, so be sure to check them in this order.The Script Itself Works, but It is Not Opening My Template File There is really only one thing that could be causing this. You did not specify the the exact location of your template file in Step B where the script asks you for it. Most people who write us and swear that they are pointing to the correct location of the template have a small typo or case mismatch somewhere in the assignment line in Step B. Files on Unix servers are case sensitive. You will have better success if you put your template file and data file in the same directory and use the same information for both, only changing the filename itself for each file. Do not chmod 777 your template file.The Links and/or Images on my Template File Do Not Work Template files are regular HTML files with two major exceptions, both of which you need to understand in order to get this issue resolved. First, the template file is the file that your script will open and insert search results into. Search results are inserted where +++ appears. It is important that close all HTML elements that you open on the template and that you not delete the +++. Second, because this file is opened by the script and not by your browser directly, the template file is displayed on the browser screen of the user as though it were located in the same directory as your script. Because of this, relative links that work fine when you point your browser to your template will not work when the script displays this file from a completely different directory. There are two easy solutions. The first is to build the relative links inside your template file as though your template file were located in your scripting directory--in fact, you can even put it in your scripting directory in some cases (although you should never put your script and data file in the same directory). The second and more reliable way to get your links and images to work is to use full URL's for all links and images. Full URL's begin with http://The Script Runs, But is Produces All Results Rather Than Only Those I Searched For Or It Tells Me To Provide More Information for a Field That is Not Empty This almost always happens when the variables that your HTML form is passing do not match the variables that your script is expecting and was designed to work with. The HTML snippets that were generated with your script can be modified, but when your or your HTML editor changes the names of the fields that are passed to the script, then the script does not see any search terms. If you did not set search restrictions, then the result is that your script will find all matches, otherwise it will complain about insufficient search terms.I Have Pointed my HTML Forms to the Script, But the Browser Keeps Saying that It Can't Find the Script When the Form is Submitted Make sure and then check again that your form is pointing where you think it is. To be absolutely sure, type the URL into the Internet browser you are using. If the script runs, copy and paste that URL into your forms. Filenames on Unix servers are case sensitive.My Script Works Great for the First Page, But the "Next Matches" Button Does Not Work There is generally one thing that could cause the problem of your script working from the initial form, but the next matches button producing a 404 Page Not Found Error. You need to check Step B very carefully where your script asks for the URL of the script itself. To make sure that you get it right, copy the value from your HTML form and paste it into the script in Step B where it asks for the URL of your script. If you are absolutely sure you got it right, investigate any other form commands that may be on your template file. Overlapping form elements will produce problems. Likewise, on some browsers, if one of the form elements on the page is not properly closed, all of the form elements on the page could be affected adversely.My Script Does not Find My Locations and I Know that There are Some Nearby This error could occur if you accidentally transferred the data file in binary mode rather than ASCII mode or if the delimiter that your script is using does not match the delimiter that actually separates the fields of your database. It could also occur if the field order that your script is expecting no longer matches the field structure of your actual data file because you deleted a column from your spreadsheet or otherwise moved fields around. Your Zip code field is explicitly set inside the script, so moving columns around means that you need to reconfigure the script so that it can work with the new field order.My Script Finds Only the Very First Record in the Database This error could occur if you accidentally transferred the data file in binary mode rather than ASCII or if some how the hard returns that separate each record have been cut or otherwise corrupted. If you are using a Macintosh, make sure that you always save your data file as MS Dos Text, since Macs and PC's terminate lines differently.I Have Set Permissions for the Script, But I Keep Getting a Permissions Related Error for For the Script Itself Any time that you move or rename a script, you have to reset its permissions to 755. If you install a script in a directory where CGI scripts are not permitted, the server will often abort and complain in terms of permissions. Ask your server administrator what directories your scripts should go in. This could also happen if your files have the wrong file extension. Some servers expect file extensions of .cgi, others .pl, and others can work with both.I Keep Getting a Can't Rename Data File Error when Editing When a record is edited, the script writes the whole data file to a temporary file to make sure that everything with the edit went OK. If everything went well, then the temporary file is renamed so that it replaces the existing data file. In order to do this, the directory that your data file is in must be accessible to the script for writing. This may mean that you need to chmod 777 the directory that your data file is in.My Script Runs Sporadically. Some Times it Runs and Other Times I Get Internal Server Errors If your script runs when you search for some things and crashes when you search for others and you have not modified the script between it working and not and seems to crash at totally random times, then you need to see how large your data file is. If it is big, there is a chance that your server is killing it off because it is exceeding the allowable resources. The resources that a server is willing to devote to your application may depend on the other jobs it is process at that particular instant, which is why it seems to crash randomly. Since FLATTEXT files are already optimized about as much as they can be, there is not a whole lot that you can do short of decreasing the size of your data or migrating to an SQL solution. Also see the technical information page for a more comprehensive treatment of this.Everything Works but the Darn US Map! There are instructions in your custom instructions page that tells you how to hook the map up. If it doesn't work or if you need more features, just contact us and we'll take a look.I Wasn't Able to Upload My Zip Code Field and Mark the Map. What Went Wrong? The map generator at http://flatmaps.com is very particular about the contents of files that you upload because of issues of security. If you weren't able to upload your list of zip codes, then there is a good chance that one of the following is to blame:Where is the Yahoo Map Patch for Street Level Mapping? The Yahoo patch is located here. The MapQuest patch is located here. This patch goes in the script where your search results are displayed, usually in Step K10 or K15 (depending on the configurations of your script). Please contact us for advice about using the patch and where to install it. Please see the disclaimers at the street level mapping page.Where is the Patch to Allow Users to Select their Own Search Radius? It is located here. Please read cautions about the maximum and minimum recommended distance settings. I Need to Remove the "Search Results by FLATTEXT" Link at the Bottom of My Search Results Your license allows this. Just comment out this whole line in Step L7 by putting a # as the first character of the line.The Script Seems to Run, But I Get a Blank Page or My Search Results Don't Seem to Be Showing Up View the source of this blank search results page using your browser under the "View" menu in Netscape or Explorer. Do you see a web page there or is the source blank too? If you see the code of a web page, then you need to check your template file carefully to make sure that you closed every table that you opened, etc. If something else is going on, contact us and we'll take a look.I Set HTML Font Size or Color Codes in My Template File, but They are Ignored When the Search Results are Displayed If you have set opening and closing font HTML codes around your +++ in your template, your search results should conform to these settings, unless your search results are inside a table generated by the script. One of the limits in how HTML is implemented is that font instructions inside a table have to be set in each cell. The good news is that you simply need to enclose each variable in the table cells of Step K15 of your script with the proper font codes and it will work. An important note, however, make absolutely sure that any HTML you insert into any print statement in the script has a backslash before each and every quote mark:I Don't Want the Full URL for my Hyperlink to an Image to Be Displayed on the Screen, but Something Else Often, with scripts in the generator, the default action is to simply show the full URL of the image or page that you are linking to. Often, having a simple "Click Here" will do. The first thing that you need to do is find which step in Step K this line is being printed at. You should be able to quickly find it by reading the comment lines. Once you find it, you may recognize the elements of a regular hyperlink inside part of a line:I Want One Field to be the URL to Link to and the Contents of Another Field to Be What is Displayed on the Screen as the Hyperlink The same general idea applies here as in the previous example. Suppose that you have two fields in your database, one is named LinkText and the other is named LinkURL. You can combine the two into a single step in Step K of your script by modifying the line to look like:I Want to Remove the "You Search For" And Related Text Easy enough. Search near G4 or G5 for these lines. Make sure that when you comment them out that you make sure that you are also commenting out the closing } of if ($Variable){ statements that may be a part of these lines. |