473,836 Members | 1,416 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP is unable to retrieve information via $_POST on my localhost but $_GET works?

9 New Member
Let me preface this by saying that this is most certainly not a code issue but a config issue. I have been able to implement the code fine on my live server, this problem only occurs on my localhost. I have 7 years experience with various web langauges so we can skip the "METHOD='PO ST'" comments.

I recently setup PHP and Apache (and mySQL) on my windows XP box. This is my first experience with PHP and it took me a long time to get everything working so bear with me. Everything was fine until I attempted to grab something using $_POST["mypostvar"] which returned an error saying "mypostvar" was not found while $_GET["mygetvar"] works fine.
The exact error is : "Notice: Undefined index: mypostvar".
I tried running var_dump($_POST );die; and it also returned nothing. I've tried all sorts of changes within php.ini including:
register_global s = "on"
gpc_order = "GPC"
I also tried the following things:
$HTTP_RAW_POST_ DATA with always_populate _raw_post_data on

I have scoured the internet looking for a solution and so far the only thing I found was a solution that I have to pay for over on Experts-Exchange . I would really not have to pay $10 for the answer but I find developing via FTP to be unacceptable.

Version Info:
PHP Version 5.2.0RC6-dev
Apache Version:Apache/2.2.3 (Win32) PHP/5.2.0RC6-d
Nov 30 '06
21 20712
1 New Member
I had the same issue with localhost but worked.

When I tried to use the $_POST worked.
When I tried to use localhost/test.html the $_POST would not work.

But when I entered just I received a request for a login. After fixing this issue the original issue with localhost not passing $POST was fixed. Here is what steps I took which seemed to fix the issue.

Within the IIS application I went to Directory Security and confirmed the anonynomous login was enabled. I then went to Internet Explorer and open Internet Options /Security/ Local Internet / Sites / Advance/ and added

I closed Internet Explorer and restarted IIS.

Every thing started working.

Hope this helps.
May 19 '07 #21
1 New Member
i have just managed to solve this problem that i was facing. this could be unrelated to the specific problem here, but it may help others.

i had a site which was running SSL .. i had a mod rewrite in an .htaccess file that forced everything over SSL.

i was posting to the non SSL url, which meant that the post data was not getting through to the PHP.

spent nearly a day going over this, and it was one little "s" that was missing.
Jan 29 '12 #22

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Winston Kotzan | last post by:
Is there a PHP function that will enable me to find out if a page was called with POST or GET variables? Thanks. -- Winston Kotzan http://www.wakproductions.com/
by: Neal | last post by:
Hi All When using a webrequest Post or Get , I keep getting an empty response stream (it is supposed to be an XML file returned via a call to some Systems GetXMLFileAPI) If i paste the URL (created as below) into the IE adress bar and invoke, it works fine but I return nothing from the Request..
by: Ian | last post by:
On the web site: (www.mvps.org/access/) I found a lovely piece of code that retrieves the operating systems name, build number, service pack etc. Is there something similar to retrieve information about MS Access that would return something like: Access 97 Service Pack 1 Regards
by: Roy Gourgi | last post by:
Hi, I am used to working in Visual FoxPro and I would like to be able to create a database and store and retrieve information from it. What is the simplest way to do it and what should I be using as there are many choices to choose from. My database will contain a lot of records. TIA
by: ElanKathir | last post by:
Hi , What is the different between Post and Get mothed in ASP.Net ? Thanks & Regrads Elankathir, B'lore, India.
by: Duffman | last post by:
Hello, I am working with dynamically created WSDL's and I need to change the transaction urls from http to https in the WSDL without redirecting customers to a different location. (I'm using vs 2003) I was able to find helpful information about the soapExtensionReflector that works great for the Soap calls http://forums.asp.net/thread/1160212.aspx But I need the same sort of fix for the Post and Get transactions and there doesn't...
by: James Wong | last post by:
Hi everybody, I would like to know how to retrieve information from AssemblyInfo.vb inside web service. I've tried many different ways including GetExecutingAssembly or similar method but all are failed. My main purpose is the version number stored in AssemblyInfo.vb. Thanks for your attention and kindly advice! Regards,
by: tromton | last post by:
hello all, ive been wondering latley if someone could change a get variable, so he can change a sql statement that way, that he could delete data from my database. the following ive thought of: $_GET = "123" $sql = "select * from test where id = '".$_GET."'"; .....
by: Curious | last post by:
I'm developing a proprietary system in C#.NET. The assembly is in a folder accessible by outside people. Since it's critical that others don't know what it's about and how it's implemented, I want to know what information anyone can get by examining the assembly.
by: mistersulu | last post by:
Hi all: I'm using a wx.ListView object with a multi-threaded wxPython app. The list is dynamically generated and accessed across two or more threads. In spite of the fact that I have checks to see if an item at a given index is in the list and the entire set of logic is contained within a try: except: block I periodically get pop-up windows stating "Could not retrieve information for list control item X" when I try to change or access...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.