Basic CGI

Asked by:
snarfoid / 5 Points
Time:
2012-10-07 8:04 pm EST
Category:
How To
Hits:
419
I want to run a custom php script from my fieldonline.com 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.

ANSWERS

0

johnpaulb-whh2
Staff
9,105 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:
example.php

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:

fieldonline.com/example.php

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

-John-Paul

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: support@WebHostingHub.com 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.