|
Written by Administrator
|
|
Friday, 24 November 2006 |
CGI Information - Does Web Design UK support SSI (Server Side Includes)?
Yes we do. SSI (Server Side Includes) are tags that are placed in HTML pages, and evaluated on the server while the pages are being served. They allow our customers to add dynamically generated content to an existing HTML page, without having to generate the entire page via a CGI program, or other dynamic technology. Pages that use Server Side Includes should have filenames which end with the suffix .shtml to be recognised by the server as such. - What is the path to sendmail?
Should you need the absolute path to sendmail for use in a CGI script, it's in /usr/sbin/sendmail. - What is the path to ImageMagick?
The path for that is /usr/bin/convert. - Can I put CGI scripts in my secure space?
Click Here - What is the path to perl?
/usr/bin/perl You can also find information on paths to other useful programs by logging in to your Extend Control Panel and selecting ‘Website Diagnostics’, from there just select ‘Paths and Versions’. - What is Perl?
Short for Practical Extraction and Report Language, Perl is a programming language developed by Larry Wall, especially designed for processing text. Because of its strong text processing abilities, Perl has become one of the most popular languages for writing CGI scripts. Perl is an interpretive language, which makes it easy to build and test simple programs. - A custom file type isn't being recognised, how can I make sure it is?
You can force this through using a '.htaccess' file. Remember that the directives inside an '.htaccess' file apply not only to the directory in which the '.htaccess' file is placed, but also to its subdirectories too. To override the default file associations and reorient the mapping of given file extensions to user-specificied handlers, the AddHandler directive can be invoked Suppose it is desired that all files with the extension of '.cat' be recognized and processed by the server as a cgi program - AddHandler cgi-script .cat Similarly, to remap the PHP content-type to files ending in, '.rip', use - AddType application/x-httpd-php .rip If you think a given MIME type is worthy of server-wide recognition, please let us know. - What is XML?
Click Here - What is Python?
Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java. Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules are easily written in C or C++. Python is also usable as an extension language for applications that need a programmable interface. Further details can be found at http://www.python.org/doc/faq/ - What permissions do I need to set CGI scripts to?
Files and directories within your cgi-bin directory should be set to 755, that is: rwx r-x r-x (chmod 755) Since the Perl script that will open and write to the file is executed under the owner's userid, and the file is also owned by the same user, then the file only needs to be writable by the owner, not the world. This protects the security of our servers and your website and database(s). Finally, there are some freeware or perhaps even commercial Perl scripts which may require you to set a directory to rwxrwxrwx (chmod 777). Again, this is not necessary. Setting the directory permissions to 755 should always be sufficient. - What PHP or Perl modules are installed?
Simply log into your Extend Control Panel and select Web Diagnostics. Under that section you can then select ‘Module List’ which will list all the PHP and Perl modules available on your server. - My cgi/asp/php script is giving an error when trying to write to a file.
Click Here - How do I set permissions on CGI scripts?
Click Here - Where do I put CGI or Perl scripts? Do they have to be in a specific directory?
Although we provide a cgi-bin as standard you do not need to put your cgi scripts specifically in there. You can use cgi scripts in any directory but they must have a .cgi extension. - I need a specific PHP or Perl Module which isn't shown in the Web Diagnostics section of my Extend Control Panel. Can this be added?
In the first instance, please verify that the module you require isn't already installed. To see a list of the available modules, go to your Extend Control Panel and select Web Diagnostics. Under that section you can then select ‘Module List’ which will list all the PHP and Perl modules available on your server. If the module you require isn't in place, please raise a ticket to our support team with your specific requirements, which it may not be possible to add certain modules in some circumstances as it may have an adverse effect on the module and other software already in place. - How do I connect to my MySQL database using CGI?
Click Here - Does Web Design UK support Image::Magick?
Yes we do, and in case you need to know the exact version number, at the time of writing, the version number is 5.56. The path is /usr/local/convert/ - Is PHP a CGI or Apache module?
PHP runs as a cgi at Web Design UK – this is because it is more secure than running it as an Apache module (if it runs as an Apache module PHP runs as the same user with the same rights as Apache). - How do I upload a CGI script to my web space?
If you have a custom CGI script that you need to use, simply upload it to your personal cgi-bin directory. Here are some helpful tips to follow when installing Perl scripts: 1. Upload to your cgi-bin directory and ensure proper file permission settings. 2. Upload in ASCII transfer mode (NOT BINARY mode). 3. The first line of each script must read: #!/usr/bin/perl 4. The script must end with a .cgi or a .pl extension. - I've installed the formmail script, but my form isn't working. Why?
Assuming that you have successfully installed the formmail script via the Extend Control Panel, then all the files will be present and the file permissions are correct. Therefore the only other reason for a problem would be your form that is calling the script. In your html form make sure the form action looks like this: <form action="http://your_domain_name.com/cgi-bin/formmail.pl" method=post> You also need to have a hidden field in your form that looks like this (replace it with your email address): <input type=hidden name="recipient" value="
This email address is being protected from spam bots, you need Javascript enabled to view it
"> If you wish to redirect the user to a different URL, rather than having them see the default response to the fill-out form, you can use this hidden variable to send them to a pre-made HTML page. <input type=hidden name="redirect" value="http://your.host.com/to/file.html">
|
|
Last Updated ( Friday, 24 November 2006 )
|