Pages

Custom Search

Friday, December 17, 2010

Help, my script is not working!


Here is a list of tips and tricks to look at two in the morning when you try to lay siege to the bed and d * mn script will only work.

1 Note the error message and type it in Google. Remove your unique paths and file names. Someone has had the same problem, and some nice person will have published a solution.

2. If a server fails, repeat what caused the error. Quickly go to the error log in your web hosting control panel. Any clues?

3. Read the README file. Open on the screen when you are configuring the script.

4. Use a text editor such as WordPad or Notepad to edit scripts. In short, your editor should change nothing beyond the bare text that writes to the screen. Microsoft Word will alter its format with unhappy consequences.

5 Avoid wrapping lines. Make sure that your editor is not configured to do so.

6 Avoid placing characters as ","; If you don't know what you are doing.

The server can read these as programming code. Apostrophes and other alphabet characters cannot 'escape' from a script by placing a backslash ahead of them.

7 Participate the paths to files correctly in the script itself and in html files. Telnet to your site and use the pwd command: 'pwd somename' (without the apostrophes) to know where are the directories and programs on the server.

8 Windows (MS-DOS) you can insert carriage returns that cause errors on Unix. In Perl, you must have a line break after #! / usr/bin/perl. Seems to be there, but you may need to insert manually via Telnet. Otherwise, an error may occur.

9 Permissions: Setting up permissions for scripts to 705 (e.g., ' CHMOD 705 yourscript.cgi' in a telnet session). CHMOD 606 for text you need script files read from or written to. Any file or subdirectory the author of the script asks you to CHMOD 707. You can generally leave the rest with the default 644.

(Use 0 here permissions is to prevent people in the same group that read files).

10 Load scripts in ASCII mode only, or you will get errors in them (the text will move around if you upload in binary).

FTP files with the extensions. tar.gz, .zip, and image files, only in BINARY mode.

11 Check if you have got end, where you're not supposed to, or not slash forward inserts one when you're supposedly!

12. Addresses in a script may need a backward bar before the @ to work.

13. Do not change too much at once. Do the absolute minimum to get the script working, and then change one thing at a time.

14. If you are changing the HTML code of a form page that posts to the script: erase the browser cache memory. You still loads an old version of the page with tags that does not recognize the script now.

Your ISP may also use its cache of your web page. Attempt to connect through another ISP, or use a proxy like http://www.Anonymouse.ws service to view the page.

15. The error 'document contains no data' in the browser usually means a path or a file name is wrong. It can also mean the file you are calling is the size of 0 bytes.

16. Do not attempt to configure script when you're tired. If you have been working for hours, take a break, or go to bed!

17 This is a fact that, after all, the script may have a fault. Check the vendor's website, or general webmaster forums discussion boards to see if it is a common problem. Report exactly what problems you have and your configuration server, for developers. It is unlikely that you're the first person who has it.

0 comments:

Post a Comment

Popular Posts