SET CGI EXECUTABLE

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2004


SET CGI EXECUTABLE (url1{; url2})

ParameterTypeDescription
url1StringAccess URL
url2StringAccess URL

Description

The SET CGI EXECUTABLE command is used to execute a CGI without it being visible to the Web user in the URL. This command can be used in particular in the On Web Authentication Database Method to determine, for example, which CGI to execute. It operates both under Mac OS X and Windows.

Note: For more information about CGIs, refer to the Using CGIs section.

In url1, pass the access URL for the CGI to be executed. For example, if you write SET CGI EXECUTABLE("/myfile.pl"), the 4D Web server will execute the CGI myfile.pl — this application must be located in the default folder of the Web server.

If you pass an empty string ("") in url1, 4th Dimension will execute the CGI specified in the URL sent by the browser directly, where applicable.

In the optional url2 parameter, pass the access URL for the file that you want to be processed by the CGI. For example, if you write SET CGI EXECUTABLE("cgi-bin/Perl2.cgi";"Perl2.pl"), the Web server will execute the CGI Perl2.cgi (located in the cgi-bin folder) by passing it the Perl2.pl file.

If you pass an empty string ("") in url2, 4th Dimension will pass the file specified in the URL sent by the browser to the CGI for processing. This mechanism is used more particularly by PHP. Example: SET CGI EXECUTABLE("/cgi-bin/php";"").

If the access URL indicated by the command is incorrect, the browser will display the "File not found" error page.

Keep in mind that the SET CGI EXECUTABLE command does not return an error directly. This command only sets a "current value" that will be used subsequently when the CGI is called. In the event of multiple calls with this command, only the value indicated by the last call will be used.

Example

In this example, the example.php file, which is not located in the cgi-bin folder, is processed by the CGI Perl2.cgi, located in the cgi-bin folder:

   SET CGI EXECUTABLE("/cgi-bin/Perl2.cgi";"example.php")

See Also

Using CGIs.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next