php-windows Digest 8 Jul 2002 05:23:42 -0000 Issue 1229

Topics (messages 14577 through 14583):

Re: PHP on IIS 5.0
        14577 by: Alexandr Polupanov

Check for a listening port...
        14578 by: Ross Fleming
        14579 by: Ross Fleming

Form Data won't POST
        14580 by: H Marc Bower

Re: curl_exec returning chopped up result on a POST operation
        14581 by: John Palmer

COM stalls the server..
        14582 by: Ross Fleming

playing with register globals  ....
        14583 by: toby z

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Now ALL works just fine!
HUGE THANKS to you!

Alexandr.


--- End Message ---
--- Begin Message ---
Hi all

Short request: I'm looking for a php script that will test for a listening
port, (specifically port 8000 on the same server, say localhost).  Basically
if port 8000 is active, I want to redirect to that, otherwise display a page
that says "service offline" or something.

Any ideas?

Cheers

Ross

--- End Message ---
--- Begin Message ---
Never mind, after an hour of scouring the manual I found out about sockets
and knocked this up:

<?php
$port = 8000;
$address = '127.0.0.1';
$socket = socket_create(AF_INET, SOCK_STREAM, 0);
$result = @socket_connect ($socket, $address, $port);

if ($result) {
header("location: http://localhost:8000/listen.pls";);
} else {
echo "Server is down";
}

socket_close ($socket);
?>

-----Original Message-----
From: Ross Fleming [mailto:[EMAIL PROTECTED]]
Sent: 07 July 2002 17:47
To: PHP Windows mailing list
Subject: [PHP-WIN] Check for a listening port...


Hi all

Short request: I'm looking for a php script that will test for a listening
port, (specifically port 8000 on the same server, say localhost).  Basically
if port 8000 is active, I want to redirect to that, otherwise display a page
that says "service offline" or something.

Any ideas?

Cheers

Ross


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
I had a page that was working perfectly, then I had to reinstall XP. I saved my 
php.ini file, and copied back on once the O/S was set up again.  Now the form data 
won't post at all.  It's a page that the action points back to itself on, and using 
$variablename where variablename is the name tag of the form input item results in a 
blank value.

IIS5.1, XP Pro
PHP4.2.1

Any ideas?  I think it most likely that the problem is with some setting I missed in 
IIS setup, since I am using the same php.ini file from before. Any assistance would be 
greatly appreciated.

Thank you,

(V)
--- End Message ---
--- Begin Message ---
System:

BSDI 4.1
Apache 1.3.26
PHP 4.1.2
cURL 7.9.8

I have the following function in PHP:

 function XMLExec($command)
        {


                $ch = curl_init();
                curl_setopt($ch, CURLOPT_URL, http://host.name/.cgi-bin/cgiprogram);
                curl_setopt($ch, CURLOPT_POST, 1);
                curl_setopt($ch, CURLOPT_FAILONERROR, 1);
                curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
                curl_setopt($ch, CURLOPT_POSTFIELDS, $command);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

                $res = curl_exec($ch);
                curl_close($ch);

                return $res;

        }


Really simple little thing. The CGI-BIN program is a C program that returns XML 
output. The first line
is Content-type: text/html, then a blank line and then XML

Problem: Sometimes, especially when the XML output is long (maybe 12k or so),  the 
output that ends up in
the $res string is all chopped up. Usually, the first part of the output is present, 
but then a  huge chunk is 
missing and then a middle section is there and then the end of the output is chopped 
off.

Has anyone seen this before? The only error that I can see is that when Apache starts, 
it whines about
PHP not being compiled with EAPI. Other  than that, no other problems.

I'm wondering if there is a buffering problem somwhere but I havent found any mention 
of this
on any lists



--- End Message ---
--- Begin Message ---
Hi again

I'm trying a bit of COM programming in PHP but can't for the life of me
figure out what's wrong.  I've tried both Winamp (have winampCOM installed)
and MS Word and it just seems to stall the server whenever I view a page
with it.  Can anyone explain why or is there a setting in php.ini I have to
play with? (I've looked but can't find anything)

It seems to work from the command line, but not through a browser.

Config:
Win XP Pro (administator)
Apache 1.3.26
PHP 4.2.1

Ross

--- End Message ---
--- Begin Message ---
hi guys

plz pardon my ignorence 

i ve been working with php for the last 3 and a 1/2
months and i turned my register globals ON when i
started off initially knowing im risking security

now i have to upload the site and i simply cannot risk
security anymore

what shall i do ????

if i turn register globals OFF i guess ill have to
change all my variables in ALLLLL the pages i ve made
or will i ???? 
and the count of the variables .... allah alone knows

help me plz

id appriciate any help on this

thnx a million ....

stuck as usual
toby .....


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
--- End Message ---

Reply via email to