| What is the path to my files? |
The path to the files is: /home/www/SUBDOMAIN
It depends on where you have uploaded your files. You can see the /www directory in your account and you can create a domain, a subdomain or other folders there.
|
| I want to use PHP within an .html file. What should I do in order to make it work? |
Add this line into the .htaccess file:
AddHandler cgi-script .html
For an .htm file, the line will respectively be the following:
AddHandler cgi-script .htm
|
| How to execute Python scripts / Path to Python |
The path to Python is:
#!/usr/bin/python
To execute a Python script you must ensure that the correct path is set in the beginning of the script.
Once the path is set you must either:
1) create an .htaccess file and place the following code inside:
AddHandler cgi-script .py
2) or rename the Python script by replacing .py with .cgi (no .htaccess is required in this case)
|
| Formmail script is not working - it does not deliver the email to me. What's the problem? |
You can be having trouble sending e-mail using Formmail script, because of the following reasons:
1. You have entered an e-mail address which is not hosted on our servers. We require the one of either the 'FROM:' e-mail address or the 'TO:' e-mail address to be hosted on our servers. Only if one of them is hosted on our servers, will you be able to send e-mails successfully.
2. You are using wrong header information. You must always provide the text From:, the name of the sender and an e-mail address. Without one of these three parameters, the formmail script will not work properly and will not deliver e-mail to your mailbox. You can find out more information here: http://www.php.net/manual/en/function.mail.php
Here are examples of well working formmail scripts:
First Example:
$from = "From: yourname ";
$to = "receiver";
$subject = "Hi! ";
$body = "TEST";
if(mail($to,$subject,$body,$from)) echo "MAIL - OK";
else echo "MAIL FAILED";
?>
Second Example:
$from = "From: sender";
$to = "yourname ";
$subject = "Hi! ";
$body = "TEST";
if(mail($to,$subject,$body,$from)) echo "MAIL - OK";
else echo "MAIL FAILED";
?>
|
| I'm getting '500 Internal Server Error'. Where's the problem? |
There could be several reasons for 500 - Internal Server Error.
1. 777 permissions - if any of the PHP/Perl files have 777 permissions this will lead to '500 Internal Server Error'. The solution is to change their permissions to 755.
2. Incorrect path to the Perl interpreter - each Perl script begins with a line that points to the Perl interpreter location. The correct location is #!/usr/bin/perl and this must be the first line of the script. Any other variation will lead to '500 Internal Server Error'.
3. Missing Perl Module - many Perl scripts are using Perl Modules. If a given Perl Module is not installed on the server the Perl script will not be able to execute and the result will be '500 Internal Server Error'.
You can check the list of Perl modules by going to the Live Stats section of the control panel and clicking on the Click to view link next to the Perl Modules :. This will provide you with a list of all Perl Modules and you can use that list to check if the Perl Module required by the script you wish to use is present on the server or not.
4. .htaccess file - the .htaccess file is used to override certain Apache rules/directives. There are directives that cannot be overridden and every attempt to do so will lead to '500 Internal Server Error'.
Options +ExecCGI -FollowSymLinks +Includes +IncludesNOEXEC +SymLinksIfOwnerMatch - those directives are pre-defined. If the .htaccess file you wish to use has any of those present you must comment them by placing the # symbol in-front of the directive.
- '500 Internal Server Error' will show up if an attempt is made to change PHP values (turn on/off) through an .htaccess file. Such lines should be commented and the desired change must be made by editing /sys/php4/php.ini or /sys/php5/php.ini depending which PHP version is set as global for the whole account - this can be checked by clicking on the PHP Settings icon in the control panel.
5. Zend Encoded / Ioncube Encoded file(s) uploaded through FTP in ASCII mode instead in Binary (BIN) mode - whenever you are uploading Zend Encoded / Ioncube encoded file(s) the FTP mode must be set to Binary (BIN). This requirment is present since ASCII provides only 7bits for encoding characters which are not enough for encoding all present characters in Zend Encoded/Ioncube encoded files - as a result such files uploaded in ASCII mode suffer data loss which can lead to '500 Internal Server Errror'.
6. Improper treating of the Carriage Return (CR) and Line Feed (LF) characters in text based files - those are the characters that define a new line and the end of a current line in a plain-text file. Windows is using both CR and LF while Unix/Linux is using only LF. In order to avoid any problems upload the PHP/Perl files through FTP using ASCII mode; this applies only to plain-text files that are not Zend Encoded / Ioncube encoded .
Those are the most common reasons and solutions for '500 Internal Server Error'. In case any of the sites hosted in the account show that error and you are unable locate and fix the problem please contact us for assistance.
|
| Can I use custom PHP and Perl (CGI) scripts? |
You can use custom PHP and Perl scripts.
The Perl scripts do not require a special /cgi-bin/ directory. You can place Perl and PHP scripts into any directory you wish.
The path to the Perl directory is /usr/bin/perl
The path to the Sendmail directory is: /usr/sbin/sendmail
The required permissions are as follows:
PHP scripts - chmod 755 filename.php
Perl scripts - chmod 755 filemane.cgi
|
| What is Perl ? |
Perl is a dynamic programming language used for various applications most notably in Unix/Linux/BSD environments.
|
| What is PHP ? |
PHP stands for Hypertext Preprocessor - a scripting language designed for creation of dynamic web pages. It is the most widely used language for dynamic web pages and many open-source applications are written in PHP.
|
| The installation manual says I must place the Perl (CGI) script in the /cgi-bin folder but there is no such folder? |
The /cgi-bin folder was used in the past as a folder for CGI scripts (scripts that were called using the Common Gateway Interface - CGI). This directory provided certain security features (as not being able to list its directory structure regardless of the presence or absence of an index.html file) and all scripts called through the CGI protocol were required to be placed under it.
Our server configuration has no special requirements for Perl (CGI) scripts except placing the path to the Perl interpreter in the beginning of the script and not using 777 permissions for the script file. You can run a Perl (CGI) script from anywhere of the domain folder. However if the specific application you wish to install requires the presence of a /cgi-bin folder you can create one through the File Manager, FTP or SSH.
|
| Can I turn on/off or alter PHP settings ? |
Certain scripts require certain PHP settings to be changed. You can change those settings globally by editing the php.ini file. Depending on the PHP version active for the account you must edit either
/sys/php4/php.ini
or
/sys/php5/php.ini
Those files can be edited through the File Manager.
|
| PHP 5 is set as the active PHP version for my account. I need to use PHP 4 for a specific site. How can I do that ? |
1) Use the File Manage to navigate to the domain folder where you wish to use PHP 4 (or PHP 5).
2) Create an empty .htaccess file and place the following code inside:
SetEnv PHP_VERSION X
Please note that X can be equal to either 4, 5 or 6 and it corresponds to the PHP version you wish to use
for a given domain. For instance if you want to activate PHP 4 for a given domain the code you must use in the .htaccess file will be:
SetEnv PHP_VERSION 4
|
|