AnclaNET
Scripts CGI and PHP



Can I use cURL with my account?
Do you support installation and use of PHPBB?
Do you support Python?
How do I run my own CGI/perl programs?
I'm getting 'file not found' running my script. What did I do wrong?
I'm getting an 'Internal server error' with my cgi script. What gives?
What does the 'premature end of script headers' error mean?
What is Perl?
What is the path to Perl?
What permissions should I run my Cgi scripts under?
What permissions will I need to set my CGI scripts to for them to function properly?
What userid will my PHP and CGI scripts run under?





Can I use cURL with my account?
Yes, all of our servers have cURL enabled. The path to cURL is /usr/bin/curl.



Do you support installation and use of PHPBB?
We have one touch installs for XMB, PHPBB, and Invisionboard. Here are some links to some conversion scripts: For PHPBB: http://phpbb.com/downloads.php#converters For XMB: There are none that I'm aware of. (support for XMB isn't the greatest from their community) For InvisionBoard: http://invisionboard.com/?resources This way, you should be able to convert to something faster and more efficient without losing your existing database.



Do you support Python?
Yes, we do. The path to Python is /usr/bin/python.



How do I run my own CGI/perl programs?
Place your CGI programs in the cgi-bin directory. Be sure to upload them in ASCII mode. Make sure to change permissions to 755 for the script. (you can easily do this with your FTP program). ALL cgi scripts MUST be chmod 755 in order to work. You can access your perl scripts via http://yourname.com/cgi-bin/script-name



I'm getting 'file not found' running my script. What did I do wrong?
Make sure that you have uploaded to the cgi-bin. Make sure that you are trying to access the script by http://yourdomain.com/cgi-bin/scriptname If you have made absolutely sure of both of those, there is no reason you should be seeing a 404 'file not found' error.



I'm getting an 'Internal server error' with my cgi script. What gives?
This being a generic error, it could be caused by many things. Here are some of the most common:

1) Your script is not CHMOD 755. (you can do this with your FTP program. Any script you try to run that isn't chmod 755 will result in an internal server error.
2)You have incorrectly set the path to Perl in your script. It should be /usr/bin/perl
3) You uploaded your script in 'binary' mode on your FTP program. Retry, setting your FTP client to 'ASCII' instead of binary.
4) You have used invalid Perl arguments

While we can't possibly troubleshoot scripts for everyone, if you are having serious problems and have read the instructions for your program, AND tried the above, then please open a trouble ticket and we will help you as best we can. We don't normally do script installation, but we don't like to leave our customers out in the cold either.



What does the 'premature end of script headers' error mean?
99.9% of the time, this error is caused by either uploading in binary instead of ASCII or by incorrect file permissions (not chmod 755). Often you can gather more information by looking at your raw error log in Cpanel. (under the 'stats' header in Cpanel, look for the link that says 'error log' to get to those)



What is Perl?
Perl stands for 'Practical Extraction and Reporting Language'. Perl is a versatile programming language with a wide variety of uses. For the purposes of this knowledge base, we refer to Perl most often in the context of CGI scripts and web programs that can be written in Perl.



What is the path to Perl?
The path to perl is /usr/bin/perl



What permissions should I run my Cgi scripts under?
All CGI scripts should be placed in the CGI-BIN and set to chmod 755.



What permissions will I need to set my CGI scripts to for them to function properly?
ALL cgi scripts MUST be chmod 755. This does not apply to PHP scripts. Just the scripts you place in the cgi-bin. PHP scripts can be run from outside the cgi-bin



What userid will my PHP and CGI scripts run under?
CGI scripts run under your userid and group. (username.username) PHP scripts, however, will run as 'nobody', since we run PHP as an apache module.