Basic CGI

Asked by:
snarfoid / 5 Points
2012-10-07 8:04 pm EST
How To
I want to run a custom php script from my site. I assumed I should put such files in the cgi-bin directory, but this seems to just give m a 500 error, and the error log is not helpful. Can you tell me

1. where cgi scripts should go

2. how to create a basic php script (hello world) that runs

To ask this user for more information, please first login.

To submit an answer, please login.



12,011 Points
2012-10-08 12:43 pm EST
Hello snarfoid,
Thank you for your questions regarding cgi, and basic php.

1. Where cgi scripts should go.
They can go anywhere within your public_html folder.

2. How to create a basic php script (hello world) that runs.
This can be done by simply creating a file, and putting the script in the text.

For example if you create a file in your public_html folder called:

In the body of the file I entered:
< ? php
echo "Hello World";

Now, you will see Hello World, when you navigate to the file via this address:

If you have any further questions, feel free to post them below.
Thank you,


To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!

Help Center Search

Current Customers

Email: Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.