Main » PHP/Perl Settings & Errors
PHP/Perl Settings & Errors
QUESTIONS
ANSWERS
  1. 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

    [Back to top]
  2. I've set 755 to my Perl/CGI/PHP script, but it is still giving Internal Server Error.
    For Perl and CGI scripts the solution is:

    to add '-w' after the Perl path in your Perl script. It will look like this:

    #!/usr/bin/perl -w

    This will enable 'warnings' in Perl. Some Perl scripts do not run without this option.

    For PHP scripts:

    This is because the PHP file has wrong permissions. You probably set 755 to the folder where the PHP files are located, but you did not set 755 to the files. You must select all PHP files and change their permissions, not just the permissions of the folders.

    PHP files give this error ONLY when permissions are wrong.

    [Back to top]
  3. 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, you will be able to send e-mail 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 <youremail@supremeserver5.com>";
    $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 <youremail@supremeserver5.com>";
    $subject = "Hi! ";
    $body = "TEST";

    if(mail($to,$subject,$body,$from)) echo "MAIL - OK";
    else echo "MAIL FAILED";
    ?>

    [Back to top]
  4. 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.

    [Back to top]
  5. Can I use custom PHP and CGI (Perl) scripts?
    Yes, you are allowed to use .cgi and .pl files in your account.
    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

    [Back to top]
  6. I'm getting '500 Internal Server Error'. Where's the problem?
    You are getting this error because all PHP and Perl files must have permission set to 755. You can change the permissions of the files through the File Manager inside the Control panel or through FTP. Once you set file permissions to 755 PHP/Perl will be working fine.

    To change file permissions through FTP select the file and use the commands: "chmod 755". Or you can use the File Manager for the purpose.

    Please note that setting the folders permissions to 755 does not automatically set file permissions to 755. File permissions will remain 644, until you select all PHP and Perl files and set their permissions to 755.

    [Back to top]
  7. Can I use PHP5?
    Yes. To use PHP5, you must only change your file extension for .php5
    [Back to top]
View all categories