KeyFocus - KFWS Support
 
 
 

KF Web Server Frequently Asked Questions

CGI Questions

  • How do I configure PHP to work?

  • How do I configure PERL to work?

  • How do I configure Python to work?

  • How do I configure Active Server Pages (ASP) to work?

  • How do I configure CGI EXE application to run directly?

  • How do I configure MySQL to work?




  • Questions & Answers


    CGI Questions


    How do I configure PHP to work?

    First you will need to download PHP. Go to the PGP download page and select one of the to Windows binary distributions. Install PHP according to the instructions.

    To configure KF Web Server to recognise PHP go to the Administration page and then to the MIME menu.

    The following MIME type should already be configured "application/x-httpd-php", "php php3 php4"

    This maps .html extensions onto the php mime type. You may want to alter this if your extensions are different.

    Next go to the "CGI Filter Mappings" menu and press the add button.
    Enter "application/x-httpd-php" as the MIME type and then add the full path of the PHP.EXE file. This will be located where you installed PHP. e.g. C:\php\php.exe".

    If you are using PHP 5.0 then use PHP-CGI.EXE, instead of PHP.EXE.

    Select "EXE, system variables only" for the "Interface" field.

    Press "OK" and then press "Save and Restart".

    If everything is OK you will now see your PHP processed pages.

    If you see an "Internal Server Error" message this may be due to a mistake in the above settings or with your PHP configuration.

    There are a lot of things that can go wrong with your PHP configuration and it is best to check with the extensive help that PHP provides.

    However the most common PHP configuration error is the first one to check.

    Make sure you copy the file called php.ini-dist into your Windows directory and rename it php.ini.


    How do I configure PERL to work?

    First you will need to download PERL and install it according to the instructions.

    To configure KF Web Server to recognise PERL go to the Administration page and then to the MIME menu.

    Press the "Add" button and add the following MIME type:
    "MIME Type" field = "application/x-httpd-perl".
    "Extensions" field = "pl".

    This maps the .pl extension onto the PERL mime type. You may want to alter this if your extension is different.

    Next go to the "CGI Filter Mappings" menu and press the add button.
    Enter "application/x-httpd-perl" as the MIME type and then add the full path of the PERL.EXE file. This will be located where you installed PERL.

    Select "EXE, script passed on command line" for the "Interface" field, if your PERL scripts comply with the CGI standard.
    Or select "EXE, script passed on command line, no headers" if your scripts return plain HTML without any HTTP header information.

    Press "OK" and then press "Save and Restart".

    If everything is OK you will now see your PERL processed pages.


    How do I configure Python to work?

    First you will need to download Python and install it according to the instructions.

    To configure KF Web Server to recognise Python go to the Administration page and then to the MIME menu.

    Press the "Add" button and add the following MIME type:
    "MIME Type" field = "application/x-httpd-python".
    "Extensions" field = "py".

    This maps the .py extension onto the Python mime type. You may want to alter this if your extension is different.

    Next go to the "CGI Filter Mappings" menu and press the add button.
    Enter "application/x-httpd-python" as the MIME type and then add the full path of the PYTHON.EXE file. This will be located where you installed Python.
    e.g. C:\Python22\python.exe

    Select "EXE, script passed on command line" for the "Interface" field, if your Python scripts comply with the CGI standard.
    Or select "EXE, script passed on command line, no headers" if your scripts return plain HTML without any HTTP header information.

    Press "OK" and then press "Save and Restart".

    If everything is OK you will now see your Python processed pages.


    How do I configure Active Server Pages (ASP) to work?

    To use Active Server Pages (ASP) with KF Web Server you will need to download and install ActiveHTML.

    Once installed look for a file called keyfocus.txt in the ActiveHTML install directory for instructions on how to integrate it with KF Web Server.

    If you have problems getting ActiveHTML to work please contact the makers of ActiveHTML on their support page, as we cannot offer support for this product.

    How do I configure CGI EXE application to run directly?

    Certain CGI programs are designed to be run directly. They are unlike other applications like PHP and PERL in that they do not require a script, but are started by a link in a HTML file to the EXE file itself.
    For example counter.exe is called directly to produce a image of a page count.

    This type of application is potentially more insecure than other types of CGI programs as the user can pass any parameter they wish to this type of application.

    To enable this type of application to run you need to perform the following steps:

    Go to the Administration page and then to the MIME menu.

    Press the "Add" button and add the following MIME type: "MIME Type" field = "application/x-msdownload". "Extensions" field = "exe".

    This maps the .exe extension onto the executable type.

    Next go to the "CGI Filter Mappings" menu and press the add button.
    Enter "application/x-msdownload" as the MIME type.
    Leave the Path field blank.

    Select "EXE, no script, executable run directly" for the "Interface" field.

    Press "OK" and then press "Save and Restart".


    How do I configure MySQL to work?

    MySQL is a powerful and free database server that can be used to power dynamic web sites.

    There is no configuration in KF Web Server that is needed to integrate MySQL into your web application. That is because KF Web Server never communicates directly with MySQL, it has no need to. Instead a third piece of software is used to access MySQL. Languages like PHP and PERL contains commands to do this integration.

    For information on setting up MySQL have a look at the MYSQL site.