title: Is a php query string containing two question mark separators '?' problematic? (file.php?parm1=val1&parm2=val2?parm3=val3&...)
body: <p>So here's some more detail behind this question...</p>
  
  <p>I have two systems from two different vendors, both proprietary. We'll call them System A and System B. Both systems function as stand alone entities, but System B provides some additional and very specific functionality lacking in System A. The vendor behind System B integrates with System A on a rather basic level (System B integrates with other vendor systems similar to System A within the same market). While System B is a php driven application, System A is not. The integration method goes something like this:</p>
  
  <p>System B exports a structured control file (aka a text file) containing various parameter/value pairs. System A is designed to import the control file into System A. System A takes the data in the control file, combines it with some of it's own data, and constructs a URI. This URL is presented as a user-clickable link on the appropriate page within System A. It is this URI that contains the double '?' within the query string. This same URI contains what I can only describe as a post-back URI (a specific URI on System A to receive data back from System B, forming bi-directional communication).</p>
  
  <p>So the user action of clicking the link performs the following:</p>
  
  <p>Step 1: System A passes a series of parameters and values to System B within the query string to 'file.php'.</p>
  
  <p>Step 2: System B receives the data from System A, performs some validation and what not, writes some information into the database, and in the process spawns a new child browser window separate from System A. The user then goes about their work within System B.</p>
  
  <p>Step 3: When the user is finished with the task in System B and submits their work, System B passes a series of parameters and values back to System A via the post-back URI. System A performs some validation, writes the results into the database, then issues a command to System B to end the session (while I say session, this is not what you'd think of a true session as there's not state information) and System B closes the child window.</p>
  
  <p>The majority of the time, this process works. Both vendors support this process. However, sometimes this process fails either in Step 1 or Step 3. The failure exhibits as either a hard error (as in Step 1) by System B as it doesn't receive the information it needs and expects in the query string, or an error by which System B sends its data back to System A (as in Step 3), but System A fails to retrieve the data. The latter error does not present to the user, nor does it generate any error log data. It simply doesn't exist. We only know about it after the fact when the user looks in System A for their work and there is nothing there.</p>
  
  <p>And since it was already brought up, System A is performing a URL Encode/Decode on the query string data.</p>
  
  <p>Since the error is intermittent, and I'm unable to replicate in my QA environment, I only have guesswork to go off of.</p>