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

  • Home
  • SEARCH
  • 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 3210672
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:36:06+00:00 2026-05-17T14:36:06+00:00

I am developing a webserver that invokes the PHP binary (via CGI) to process

  • 0

I am developing a webserver that invokes the PHP binary (via CGI) to process a script.

Here’s the problem:

The PHP script isn’t picking up the command line parameters. For example, if the client requests path/to/file.php?test=value, the $_GET array is empty.

I have tried passing the parameters in an environment variable (QUERY_STRING), but they still don’t show up.

How can I pass query string parameters to a PHP application?

  • 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-05-17T14:36:06+00:00Added an answer on May 17, 2026 at 2:36 pm

    There are various SAPIs for PHP. One of them is cli SAPI which apparently is what you’re using, cli SAPI wouldn’t populate $_GET, $_POST … because it’s for command line scripting.

    In your case you need PHP cgi SAPI. (e.g., You need to replace php with php-cgi[1] in your shebang)

    [1] In most distribuitons it’s called php-cgi, if you compile PHP yourself you need to enable cgi.

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

Sidebar

Related Questions

I'm developing a website in PHP and I have large JS files that I
Developing a heavily XML-based Java-application, I recently encountered an interesting problem on Ubuntu Linux.
When developing an application that sends out notification email messages, what are the best
I am developing a simple web application which contains these 3 components: client that
I'm developing a Django application that contains a model with a date/time field. On
I am developing a http module that hooks into the FormsAuthentication Module through the
I am developing an application in classical ASP that now requires sef urls. I
As I am currently developing a website that simply must be able to perform
How would I access a webserver behind a firewall? I'm developing an application for
I am about to start to developing an iPhone application that should login and

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.