Welcome, hosting_user!
Home
News
Logout

CentrumHost Control Panel

 
Language
Support
Site Manager
E-mail Manager
Statistics
Tools
Account Profile
Change Theme

Expire: 2006-12-12
ServiceUsedFree
Domains 3 0
SubDom. 8 24
Aliases 2 997
Emails 2 997
Mailing lists 0 10
IPs 0 0
FTPs 4 1
DataBases 3 1
MySQL MB 1.068 43.932
Traffic MB 946.495 59053.505
Storage MB 28.400 3971.600
Help Center

Members Ticket [ topic ]
:: Search by Keyword ::
               back to main
:: Topics - [ PHP/Perl Settings & Errors ] ::
   I want to use PHP within an .html file. What should I do in order to make it work?
   I've set 755 to my Perl/CGI/PHP script, but it is still giving Internal Server Error.
   Formmail script is not working - it does not deliver the email to me. What's the problem?
   What is the path to my files?
   Can I use custom PHP and CGI (Perl) scripts?
   I'm getting '500 Internal Server Error'. Where's the problem?

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
request help back to top

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.
request help back to top

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@CentrumHost5.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@CentrumHost5.com>";
$subject = "Hi! ";
$body = "TEST";

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

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.
request help back to top

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
request help back to top

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.
request help back to top

back to main


© Copyright CentrumHost 2002-2006. All rights reserved.