cgi

Internet Explorer 8 + Deflate

I have a very weird problem.. I really do hope someone has an answer because I wouldn't know where else to ask. I am writing a cgi application in C++ which is executed by Apache and outputs HTML code. I am compressing the HTML output myself - from within my C++ application - since my web host doesn't support mod_deflate for some reason....

Perl - why won't this simple file open request work?

OK, so this is so simple but for the life of me I can't figure out why the code below doesn't work. I'm trying to simply write a CGI script that creates sequentially numbered files. I'm using a counter (stored in a separate file) to keep track of the last ordinal used, and then generating a unique filename using sprintf. The uniquel...

Why doesn't my Perl script start under FastCGI?

I am getting this error in error_log one of my Perl CGI application. I am pretty sure I haven't changed my script at all and all of a sudden i have started getting this error. This is what I see in error_log: [Wed Jul 8 15:18:20 2009] [warn] FastCGI: server "/local/web/test/cgi-bin/test.pl" (pid 17033) terminated by calling exit ...

Why does my Perl script halt if CGI module is used after reading from stdin on Windows?

I'm trying to implement a progress indicator for file uploads. Part1 and Part2 of the script run properly if executed separately. But if executed together the script halts at: my $cg = new CGI(); The problem only occurs on an Windows server. What could be the reason? #!C:\Perl\bin\perl.exe -w use CGI; $post_data_filename = "C:\\t...

Efficiency of web proxy scripts vs. http proxy?

I was wondering which class would be more efficient: PHP (Glype, PHProxy), CGI (CGIProxy), or javascript based scripts that run on a webserver, or an http proxy run through squid. Assuming neither class was doing any caching, would one or the other be much more efficient at handling web browsing? And how could I write a simple script to...

Is there any thing similar to HttpURLConnection in Perl?

I want to create an HTTPURLConnection to a PHP script and get the HTTP response returned by the script. Is there a way to do this in Perl? In short i want Perl equivalent to following: java.net.URL url = new java.net.URL(urlPath); java.net.HttpURLConnection conn = (java.net.HttpURLConnection) url.openConnection(...

How can I convert a PHP upload-file script to Perl?

In PHP I have the following code that gets a file submitted through CGI: move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile) The file is being sent as Content-Disposition: form-data; name="userfile"; filename="filename" Content-Type: application/octet-stream The file being upload is of type PNG. How do I access the da...

Understanding CGI / FastCGI in Rails

This is more to understand the request-response mechanism in web apps. A client sends a request (GET / POST) to a web app. The web app has an application server running which serves as the container for the application specific programs. I don't understand the part when the app server starts a FastCGI / CGI process. What is the significa...

Setting up a web interface to http proxies?

I want a way to allow users to go through my http proxy server (Squid, Privoxy, etc.) without having to type the IP/port in web browser settings. I was hoping I could use a simple web interface. I'm envisioning this: User goes to a website on my server (http://proxy.com) and types a URL into the form. The user's browser URL ...

What are CGI scripts used for these days?

I'm pretty well up to speed on general web programming languages, but one of the tools I'm working with right now is in CGI. All I can tell is that CGI scripts are quite slow. Is CGI still commonly used today? If not, what has it been replaced by? Are there any niche functions in which CGI is still alive and actively used? ...

php-cgi.exe - does it detect and handle both CGI and FastCGI? If so, how?

The impression I get both from Microsoft's discussions about FastCGI and PHP, and also from Coast R&D's site, is that php-cgi.exe is able to detect whether it is being used in either a CGI or FastCGI context. If so, how does it do it, as I'd like to have similar functionality in my own product. ...

CppCMS vs. C++ Server Pages vs. Wt

I know Wt is the most stable of them, but it's a bit uncomfortable to use. CppCMS sounds good but how stable is it? How secure is it? I have encountered C++ Server Pages as well but there's nothing about their security in there. Has anyone had some experience with any of those libraries and can enlight me? ...

Web application in Delphi

I'm evaluating the possibility to write a web application using Delphi (ISAPI/CGI/...). I still cannot see enough reasons to use Delphi instead of a "classic" web development framework. If you have experience in this specific area please share your remarks. Would you recommend Delphi instead of PHP/Rails/ASP/...? Do you know any web app...

How can I serve unbuffered CGI content from Apache 2?

I would like to be able to allow a user to view the output of a long-running GCI script as it is generated rather than after the script is complete. However even when I explicitly flush STDOUT the server seems to wait for the script to complete before sending the response to the client. This is on a Linux server running Apache 2.2.9. ...

Cgi scripts returning data as html/text.. How safe is that?

Hi, It makes sense to return data when a form is submitted using post method. It looks as if only html/text can be returned ordinarily... I use gwt on the client side and it does not seem to work properly if plain/text is returned. The question: how safe is to return all kind of text using html/text? Is it possible that some data could ...

Generating a 3D GUI through CGI

Hello, I'm implementing a web application that is written in C++ using CGI. Is it possible to use a 3D drawn GUI that also has animations? Should I just include some kind of mechanism that generates animated gifs and uses an image map? Is there another, more elegant way of doing this? EDIT: So it sums up to Java or Silverlight or Flash ...

How can I execute CGI files from PHP?

I'm trying to make a web app that will manage my Mercurial repositories for me. I want it so that when I tell it to load repository X: Connect to a MySQL server and make sure X exists. Check if the user is allowed to access the repository. If above is true, get the location of X from a mysql server. Run a hgweb cgi script (python) cont...

How to get variable in CGI made by /bin/sh + Apache

I'm coding following CGI script echo "Content-type: text/html; charset=UTF-8\n\n" echo "<HTML><HEAD><TITLE>title</TITLE></HEAD>" echo "<BODY>" echo "<FORM ACTION="http://exapmle.com/page2.cgi" NAME="PAGE1" METHOD="POST">" echo "input:<INPUT TYPE=text NAME="data1" SIZE=10 MAXLENGTH=10>" echo "<INPUT TYPE=submit NAME=nbtn VALUE='GO TO PAG...

Why do I get "redefine" warnings with "use constant" under mod_perl?

I run CGI script with apache2 and I have this warning lines in error.log (I removed all similar lines from the output): [Thu Jul 30 09:39:37 2009] upload.pl: Constant subroutine ModPerl::ROOT::ModPerl::Registry::home_stanislav_cgi_perl_upload_2epl::UPLOAD_DIR redefined at /usr/share/perl/5.10/constant.pm line 115, line 133. Constant s...

CGI programming with shell scripts

I need to pass the content of the textbox into a variable. i.e. whatever typed in the texbox of the html page needs to be pass to a variable. This is because I am calling HTML (CGI as well) inside linux shell programming. I need to manipulate that variable as I want. Do you have any idea to do it? What I need to do is, I want to get the...