Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8061253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:16:38+00:00 2026-06-05T10:16:38+00:00

I developed the following CGI script and run on Apache 2 ( http://localhost/test.chtml ).

  • 0

I developed the following CGI script and run on Apache 2 (http://localhost/test.chtml). I did same script in PHP (http://localhost/verifica.php). Later I performed Apache benchmark using Apache Benchmark tool. The results are showed in images.

include

#include <stdlib.h>
int main(void)
{

    printf("%s%c%c\n",
    "Content-Type:text/html;charset=iso-8859-1",13,10);
    printf("<TITLE>Multiplication results</TITLE>\n");
    printf("<H3>Multiplication results</H3>\n");

    return 0;
}

enter image description here

Someone can explain me why PHP serves more requests than CGI script?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T10:16:40+00:00Added an answer on June 5, 2026 at 10:16 am

    The only thing that you’re really measuring here is the overhead caused by an almost no-operation program. The overhead incurred by calling a script or a cgi depends on how your Apache server is configured. Chances are you’re using php as a module, meaning that it actually runs inside the apache process. For the CGI you’re probably using the regular flavor, ie a process is created for every call.

    Depending on what you actually want to test/know/evaluate, you should probably rerun this test a number of times, eg with extensive calculations in php vs a C cgi, using fastcgi, and whatnot. Also, don’t forget to check the impact of code caches like APC on the execution of the php code, for certain cases the difference is dramatic.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed the following user script which will show the html element under
I have developed an rest enable wcf service by using the following link http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/simplerestservice11172009221218PM/simplerestservice.aspx
I have developed a rest web service by using the following link http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/simplerestservice11172009221218PM/simplerestservice.aspx Now,
I developed an RSS feed following a tutorial and I think the .xml file
I developed a website for 1024x768 and used the following viewport: <meta name=viewport content=width=768,
In a JSF 2 application, which is developed on tomcat, I have the following
I developed the following function to convert strings to hex values. function StrToHex(const S:
I developed a test app and I tried to use into the simulator.. all
i have developed an application using jsf 1.2. it worked fine with apache tomcat
I developed a C++ program which utilises an .exe file through the following code:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.