| View previous topic :: View next topic |
| Author |
Message |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Dec 12, 2002 12:10 am Post subject: CGI Help |
|
|
I am trying to run a VDS CGI on a web host. However, it always creates
an "Internal Server Error". I read the Frequently Asked Questions part
of their site an found the following:
| Quote: | Why do I get Internal Server Error when executing my cgi script?
Internal Server Error means that you have a misconfiguration within your cgi itself. Our machines are very strict when executing Perl, and bad code is always rejected.
Even the simplest cgi written in shell (not Perl) must start:
#!/bin/ksh
echo "Content-type: text/html "
Otherwise it will error with bad headers. |
What is the equivalent in VDS to | Code: | #!/bin/ksh
echo "Content-type: text/html " |
Thanks.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Dec 12, 2002 12:15 am Post subject: |
|
|
Oops... I forgot to mention that I am using the guestbook CGI
example by Garrett as a test. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Thu Dec 12, 2002 12:19 am Post subject: |
|
|
First, the path statement is not used when using VDS.
For printing the conent, it depends on which dll you're using.
| Code: | REM - Using vdsstdio.dll:
Console write, Content-type: text/html@chr(10)
Console write, @chr(10)
REM - Always add that second line after the content
header. For some reason, I've had problems
on some servers when I don't add that before
sending more stuff to the console. |
| Code: | REM - Using vdsinet.dll:
Net Cgi,write,Content-type: text/html
REM - I haven't noticed the same problem with this
dll on the second line as above. But if you do
encounter a problem, then just run a blank
like so: net cgi,write,
with no data being sent. |
-Garrett |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Thu Dec 12, 2002 12:22 am Post subject: |
|
|
Many times, you can get away with using the dlls in the same directory
as the cgi program you're working on, but there are some server setups
that require the dlls to be in the system directory. If so, then you're at
your host's mercy on that.
Also make sure they allow "exe" files to be run from the cgi. If not,
you might get away with renaming them to "cgi" instead of "exe". I
have done this on Apache (Win32) servers before.
-Garrett |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Dec 12, 2002 12:23 am Post subject: |
|
|
Thanks, I will take this up with the web host. It seems that they allow
EXE CGI's, but you are probably right with the DLL's. Hopefully the next
version of VDS will allow for integrated EXE's. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Thu Dec 12, 2002 4:21 pm Post subject: |
|
|
| You can make integrated exe's with Prakash's Alloy... Don't know if it's really integrated or if it decompiles all stuff included, but you can give it a try... |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1565
|
Posted: Thu Dec 12, 2002 4:53 pm Post subject: |
|
|
| Alloy'd executables attempts to extract out the vdsrun40.dll into the system directory before actual code is ran. If your administrator blocks access of copying files most likely it wont work, if it does work though, if the administrator of the server finds out I'm pretty sure he/she wont be too happy unless you've already cleared it with him/her first. I would point the admin to VDS, what it does and why you need it. They of course will need to test it and see if it properly functions on the server and does not destabilize the server in anyway. If your running in a shared hosting environment I sincerley doubt the administrator will allow any extensions to be copied over due to safety and relability. |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Thu Dec 12, 2002 5:16 pm Post subject: |
|
|
| Prakash, you run a web server too, isn't it? Or do you hire the space that Vdsworld and your own site uses? Otherwise, maybe FreezingFire can use your webserver? |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1565
|
Posted: Thu Dec 12, 2002 5:34 pm Post subject: |
|
|
I have 2 dedicated servers. Both of which are actually located in Texas at www.rackshack.net, I don't own the servers but I am the only one allowed to use them (dedicated not shared) but I do pay a monthly fee ~$240.
The servers I run use RedHat Linux not Windows so vds cgi's won't work. If you are interested in running vds cgi's it will be hard to find a Windows host that will allow it. I know www.parcom.net let me run vds cgi's but I had to ask the owner specificially, I don't know if they still allow it. They allowed me to simply put the vdsrun30.dll and other dll's in the same directory as the exe cgi's were in.
But keep in mind that Parcom is a shared hosting environment so your site and files will not load/download as fast as dedicated would - memory, cpu and space is allocated to each user.
Also note that the reason I moved from Parcom to Rackshack is because VDSWORLD and PGWARE would consume all the resources on their servers. This made other customers sites very very slow and also crashed their machines almost daily. They asked me to find another host because I was consuming way too many resources. Keep in mind that Parcom charges very low fees (under $10 in some cases) so you must realize that if your going to have a busy site it isn't a good idea to go to Parcom.
Or you can try a dedicated Windows host like www.rackspace.com but the monthly fee's are high (~$600 +). |
|
| Back to top |
|
 |
|