Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. WEBMASTER HACKS > Running the Scripts in This Chapter

Running the Scripts in This Chapter

To run any of the CGI shell scripts presented in this chapter, you'll need to do a bit more than just name the script appropriately and save it. You must also place the script in the proper location, as determined by the configuration of the web server running on your system.

Unless you've specifically configured your web browser to run .sh scripts as CGI programs, you'll want all of the scripts in this chapter to have a .cgi filename suffix. You should save the .cgi files either in the desired directory on your web server or in its /cgi-bin/ directory, again depending on the configuration. It is important to note that the .cgi file-naming conventions in this chapter assume that you are saving those files in your web server's root directory. If you are instead saving them in its /cgi-bin/ directory, you must add /cgi-bin/ to all of the script paths in this chapter. For example, script-name.cgi becomes /cgi-bin/script-name.cgi. Finally, you'll need to ensure that each .cgi script is readable and executable by everyone, because on most web servers your web queries run as user nobody or similar.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint