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 4118250
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:56:11+00:00 2026-05-20T22:56:11+00:00

$_GET variable shows empty on the URL www.abc.com/ec/basket.php?product_id=1 . This is very surprising as

  • 0

$_GET variable shows empty on the URL www.abc.com/ec/basket.php?product_id=1.

This is very surprising as $_GET does show value on a different domain with the same URL on the same server. Of course the code is a copy of the original domain.

I am baffled as to why is this happening. Even the first line of the code shows blank $_GET.

When I did print_r($_SERVER) on the first line of the page, I get the following response. The first two values are surprising.

Array
(
    [REDIRECT_REDIRECT_REQUEST_METHOD] => GET
    [REDIRECT_REDIRECT_STATUS] => 404
    [REDIRECT_STATUS] => 404
    [HTTP_HOST] => www.abc.com
    [HTTP_CONNECTION] => keep-alive
    [HTTP_CACHE_CONTROL] => max-age=0
    [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.27 (KHTML, like Gecko) Chrome/12.0.712.0 Safari/534.27
    [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    [HTTP_ACCEPT_ENCODING] => gzip,deflate,sdch
    [HTTP_ACCEPT_LANGUAGE] => en-GB,en-US;q=0.8,en;q=0.6
    [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.3
    [HTTP_COOKIE] => [various values]
    [PATH] => /sbin:/usr/sbin:/bin:/usr/bin
    [SERVER_SIGNATURE] => Apache/2.2.3 (Red Hat) Server at www.abc.com Port 80


    [SERVER_SOFTWARE] => Apache/2.2.3 (Red Hat)
    [SERVER_NAME] => www.abc.com
    [SERVER_ADDR] => [IP address]
    [SERVER_PORT] => 80
    [REMOTE_ADDR] => [IP address]
    [DOCUMENT_ROOT] => /var/www/htdocs
    [SERVER_ADMIN] => webmaster@abc.com
    [SCRIPT_FILENAME] => /var/www/htdocs/index.php
    [REMOTE_PORT] => 39746
    [REDIRECT_URL] => /page-not-found.html
    [GATEWAY_INTERFACE] => CGI/1.1
    [SERVER_PROTOCOL] => HTTP/1.1
    [REQUEST_METHOD] => GET
    [QUERY_STRING] => 
    [REQUEST_URI] => /ec/basket.html?product_id=1
    [SCRIPT_NAME] => /index.php
    [PHP_SELF] => /index.php
    [PHP_AUTH_USER] => 
    [PHP_AUTH_PW] => 
    [REQUEST_TIME] => 1301662577
)

HTTP status on this shows 404 but the page comes up properly. Just that I am not able to get any values in the $_GET variable.

Also the $_GET variable works perfectly fine on other pages on the same site.

I have been scratching my head on this since hours but cannot find a solution. Any help will be highly appreciated.

  • 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-20T22:56:11+00:00Added an answer on May 20, 2026 at 10:56 pm

    You should just have a look to your .htaccess file and look more precisely the line containing the RewriteRule.

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

Sidebar

Related Questions

I have a url that look like this reg.php?lang=no_NO&passkey=test and im trying to get
I'm passing a URL variable to a PHP page that is outputting an XML
How do I get past this variable initialization problem? If I only could figure
Simply setting the SVN_EDITOR variable to mate does not get the job done. It
I have this variable: {{ object.article.rating.get_percent|floatformat }} that outputs this: 540787 Is there a
Has anyone been able to get a variable record length text file (CSV) into
I recently started Erlang, and I notice I constantly get Warning: variable X is
When I try to use the code below I get a duplicate variable error
Is there any way to automatically rename accessor/mutator when a variable they get/set gets
Do class, method and variable names get included in the MSIL after compiling a

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.