Jump to content

rocksolidhq

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rocksolidhq's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey All, Finally got it figured out so i thought i'd post back in case someone else has the same problem. i'm not sure i understand the reasoning here either so if anyone can shed some additional light i would be grateful. To resolve this i selected the site, in my case the Default Web Site, and went into the website's "Basic Settings" (in the right column). In there i clicked the "Connect As" button and entered the administrator username and password. i'd love an explaination of the overall effect of this change. Does it create any security problems? thanks, dean
  2. Hey, i'm getting the usual error "mssql_connect() [function.mssql-connect]: Unable to connect to server" but only in the browser. If i run the script from the command line it works fine and retrieves the info. The system is a 64-bit Windows 7 box with IIS 7 and PHP 5.2.10. i've got the right ntwdblib.dll. i've got version 2000.80.194.0 in place right now and i've also had 2000.2.8.0 had it i PHP folder as well as in the Windows folder. I pulled my version 2000.2.8.0 from another server (2003 with IIS6) where it is working as expected. With any combination of the above, the CLI works fine but the browser give me the unable to connect to server error. My phpinfo() shows me that it has mssql loaded and further i know that it is loaded as it doesn't toss an error about an unknown function call for mssql_connect. i'm using PHP's ISAPI module. Not sure if switching to FastCGI would make any difference. Can anyone please suggest anything else that i need to check? I'm guessing that it's an IIS7 config issue since the CLI works. Basically i created the ISAPI filter (Name: PHP, Executable: C:\Program Files\PHP\php5isapi.dll) and then the Module Mapping (Request Path: *.php, Module: ISAPI Module, Executable: C:\Program Files\PHP\php5isapi.dll, Name: PHP ISAPI), clicked "Yes" after creating the module and enabled 32-bit applications in the DefaultAppPool. please help!!
  3. Hey btherl, whoops, i should have described my environment. It's actually an IIS 6 server. Anyway, i also posed the question on the phpbuilder forum and received the answer. Anyone searching can find it here: http://www.phpbuilder.com/board/showthread.php?p=10888831#post10888831 the upshot is that all of the headers are stored in the $_SERVER array and capturing them is done using a line like: $headerString = print_r($_SERVER, true); //the "true" tells print_r to return the output instead of displaying it. thanks, dean
  4. Hey, i'm receiving some data from a remote source and they are passing on custom Headers with their HTTP POST data. eg. Host:DOMAIN.COM Auth-MID:700000200109 Auth-TID:002 Auth-User:USER01 Auth-Password:PASSW0RD Stateless-Transaction:true Header-Record:false It seems easy enough to pull the standard header values like Host but i cannot seem to get at the custom ones. Can anyone tell me how i would get them? $_SERVER['HTTP_HOST'] retrieves "DOMAIN.COM" but $_SERVER['Auth-MID'] retrieves nothing. thanks in advance, dean
  5. Hey All, Figured i'd post this for anyone who's looking for a solution to this. i was running out of time so i bit the bullet and called Microsoft. I'm pretty good at googling and searching forums for answers and i just wasn't getting anything. I've considered moving to Apache a few times but right now i've got a two year old production server that is already overpowered and has much room for expansion running IIS so i cannot justify the conversion...yet. I have to hand it to the tech at MS. He had it figured out in about 20 minutes and then helped me come up with a php script that will assist in testing. The problem was that the client's HTTP POST was ultimately calling the directory and not the script. His machine was sending the line: POST test/processor HTTP/1.1<CR><LF> Where test/processor is a directory on the server and my script was index.php in that directory. It turns out that my client needed to append a trailing slash to his POST command so that IIS would return the default document. dean
  6. Hey Guys, I'm trying to get a script working that will accept HTTP POST data from a client. The data is proprietary and is based on UTF197/TCS. I'm running IIS 6 on Windows 2003. As far as i can see it should be working. .php is allowing "All" verbs. I have even created a MIME type for .tcs files that is then associated with the my index.php file. (i think that this is irrelevant but i'm flailing here). And i see that in the error message that they receive the Content-Type is text/html. Why would my client be receiving the message: RECV MESSAGE HEADER HTTP/1.1 405 Method Not Allowed Allow: OPTIONS, TRACE, GET, HEAD Content-Length: 1564 Content-Type: text/html Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Date: Tue, 30 Sep 2008 20:59:44 GMT How do i allow POST? As i mentioned .php is allowing "All" verbs in the IIS config. They are using a terminal to send this data. Anyone have an idea on how to emulate this using .php scripts to send the data? I have created a few php forms that use HTTP POST to submit the data but they don't have any issues. Below is an example of one of my flailing scripts for what it matters. All i'm trying to do here is capture the data and bounce it back to them: Thanks in advance, dean
  7. Hey Guys, I've tried firefox, IE7 on different machines, and Chrome and all of them just time out. Is there something in my php.ini that might be amiss or an IIS setting? Can you tell me what you were running the code on and which snippet(s) work? What error did Chrome provide you? I've tried $HTTP_POST_RAW_DATA and it returns the data but this cannot be a long term solution due to the memory load. thanks, dean
  8. Hey ranjuvs, Which one? Can you describe your environment? The code is on IIS 6 and i've been using IE7 and i cannot get any of these to work. thanks, dean
  9. Good morning, i am going to be receiving a stream of data via HTTP POST from a vendor and will need to be able to parse out the data. The format of the data is unknown to me at the moment and may change as we are both coding at the same time. I cannot initiate the sending of data without calling and having someone there make it happen which would be very time consuming during the development and testing of my code. I thought it would be simple to just have them send me a snippet of the stream periodically and build a simple form into which i could paste the snippet and have it sent to my code but apparently i'm missing something. I need to be able to get the whole post so i have been trying to use php://input but everything i try just results in the browser timing out. I have tried several examples that i have found online but they all result in a timeout. I read somewhere that the content-length needs to be set so i've tried doing that to no avail. I have also read that this may be a bug in PHP. i am running 5.0.27-community-nt. Should i be upgrading? Here are a couple of my attempts. It's a bit messy as i'm flailing but hopefully it is clear enough. Can someone please give me a bit of direction? thanks, dean ATTEMPT #1 <?php function firstRun() { if (!isset($_POST['submit'])) return true; } function secondRun() { //$data = file_get_contents('php://input'); $fp = fopen('php://input','r'); while (!feof($fp)) echo fgets($fp); fclose($fp); print $data; print "see it:<br />"; print $_POST['dataSnippet']; print strlen($_POST['dataSnippet']); print $HTTP_RAW_POST_DATA; } function snippetForm() { ?> <form id="datasnippet" method="post" action="terminal_DataPost.php" content-type="UTF197/TCS" content-length="4"> <table align="center"> <tr> <td> Data Snippet: </td> </tr> <tr> <td> <textarea cols="25" rows="3" name="dataSnippet"></textarea> </td> <tr> <td></td> <td> <input type="hidden" name="submit" value="1" /> <input type="submit" name="submitButton" value="Submit" /> </td> </tr> </table> </form><br /> <?php } ?> ATTEMPT #2 <form action="index2.php" method="post"> <p> <label for="text">Zone de texte :</label> <input type="text" name="text" id="text" /> </p> <p><input type="submit" name="submit" value="Continuer" /></p> </form> <p><?php echo file_get_contents('php://input'); ?></p> ATTEMPT #3 <form action="index1.php" method="post"> <input type="text" value="demo" /> <input type="submit" /> </form> <?php $fp = fopen('php://input','r'); while (!feof($fp)) echo fgets($fp); fclose($fp); print $_POST['text']; ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.