Basic CGI

Asked by:
snarfoid
Time:
2012-10-08 12:04 am
Category:
How To
Hits:
165
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

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

johnpaulb-whh2
2012-10-08 4:43 pm
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

You must login before you can post a comment about this answer.

Like this Question?

Have a Question?

If you need some help, submit your question to our Community! We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)

Recent Questions

  1. how to make new website with single account.
  2. Internal Server Error
  3. Add a note field to order page in Prestashop 1.5

Support 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.