Can I run a PHP file from the cgi-bin?
Category: How To
How do I point to my cgi library from HTML pages? For example, I have this code:
var client = new XMLHttpRequest();
client.open("POST", "/SCOMSTO/logger.php", true);
and it works on another server because there is a mapping directive that maps /SCOMSTO/* to /u/scomsto/cgi-bin/*
Similarly, in another HTML page I have:
var client = new XMLHttpRequest();
client.open("POST", "/SCOMSTO/logger.php", true);
and it works on another server because there is a mapping directive that maps /SCOMSTO/* to /u/scomsto/cgi-bin/*
Similarly, in another HTML page I have:
Best answer chosen by User
|
0
|
Hi SteveC, Thanks for posting your question. I'm more than happy to assist you today. If you are on a VPS or Dedicated hosting plan you can contact our support department to have a symlink set up. If you are on a shared hosting package, you'll need to store the cgi scripts in the cgi-bin folder in the public_html folder. Then you'll need to update your path in your code to reflect the path to the cgi-bin. If the HTML page calling the script is in the public_html folder, the path would be: var client = new XMLHttpRequest(); I hope this helps! If you need further assistance please feel free to contact us. Thanks! Tim S |
Like this Question?
Tweet
Latest Questions
If you need some help, submit your question to our Community!
We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)
Recent QuestionsNeed more Help?
Search
Ask the Community!
Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.
Current Customers
| Chat: | Click to Chat Now | E-mail: | support@InMotionHosting.com |
|---|---|---|---|
| Call: | 888-321-HOST (4678) | Ticket: | Submit a Support Ticket |


