Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Internal Server Error and Delphi and CGI

Status
Not open for further replies.

serkanb

Programmer
Jan 30, 2002
19
0
0
TR
Hi everybody!
I've written a simple "Hello world!" CGI application with
Delphi 6. Then I've coppied it Apache's /cgi-bin directory.

When I try to run CGI aplication from Internet Explorer
an error message occure. For example:


Internal Server Error.

This error seems in Error Log file like this:

(2)No such file or directory: couldn't spawn child process: c:/program files/apache group/apache/cgi-bin/hello.dll


I've added the lines below in to httpd.conf:
{

ServerRoot "C:/Program Files/Apache Group/Apache"

ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache/cgi-bin/"

<Directory &quot;C:/Program Files/Apache Group/Apache/cgi-bin&quot;>
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>

AddHandler cgi-script .cgi .dll .pl .exe
}
But it didn't work. There is something wrong here...
Could you please help me?
Thanks...

ps: I've tried it with ISAPI dll application and CGI executable application. But none of them didn't work.
 
Hi,



Can you directly execute a .dll file ? Any cgi invoked program, irrespective of language, most be capable of being executed on the host system by entering its name (assocation with file extension) or by having the 'magic' shebang #! first line of the script that points at the full path of the associated executable. For example if it were perl the windows equivalent of '#! /usr/bin/perl' - something like '#! c:/whatever/perl.exe' .



Now, if you do 'test.pl' in a windows dos box it probably works because .pl is associated with the relevant perl.exe. However, if you do 'test.dll' I wouldn't have thought it does anything because dynamic load libraries are just generic containers for shared run-time code and not specific to any application. You'd probably have to make an exe (I'm not certain you can do that with apache cgi but it seems much more probable than a dll).



The other thing would be to try the mod_isapi isapi support module. Apache as such doesn't support isapi but that add-on module seems to provide the functionality. See -->


Hope this helps
 
Thanks ifincham,

I've added this line into httpd.conf file.

&quot;AddHandler isapi-isa .dll&quot;

It isn't genarate &quot;Internal Server Error&quot; now.

But now, I counldn't see anything in IExplorer.
It tries to execute my .dll file but It's waiting all the time.

I've also compiled an .exe file. But It didn't produce a screen view too.

Do you have an idea about what's wrong here?



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top