Re: [PHP] Some questions about if and isset.

2005-01-31 Thread Richard Lynch
Geir Anders Berge wrote: > I'm sure that this code can be written more efficient, please tell me how, > but that's not my problem. The problem is that when i run this script all > lines are executed. I'm sure I'm doing something wrong, but can't find out > just what. Okay, it's REALLY hard to see

RE: [PHP] Some questions about if and isset.

2005-01-31 Thread Robinson, Matthew
more stuff } else { other stuff } } else { even more stuff } M -Original Message- From: Geir Anders Berge [mailto:[EMAIL PROTECTED] Sent: 28 January 2005 19:05 To: php-general@lists.php.net Subject: [PHP] Some questions about i

RE: [PHP] Some questions about if and isset.

2005-01-31 Thread Jay Blanchard
[snip] $constant) { Execute this code if $variable is more than $constant } elseif ($variable == $constant) { Execute this code if $variable and $constant are equal } } else { Execute this code if $variable is not set } ?> -- PHP General Mai

[PHP] Some questions about if and isset.

2005-01-31 Thread Geir Anders Berge
I'm sure that this code can be written more efficient, please tell me how, but that's not my problem. The problem is that when i run this script all lines are executed. I'm sure I'm doing something wrong, but can't find out just what. $constant) { Execute this code if $varia

Re: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Gerald Timothy Quimpo
On Friday 03 January 2003 06:15 am, Gareth Hastings wrote: > Yes I saw those but what it made me think, what's the point of a > persistent socket if you can't use it again? i think you could, after enough iterations and if the server allows, get to a point where each process has its own persiste

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Michael J. Pawlowsky
Well if you do find the solution please let us know. I would also like to add it to my PHP lib archive. I suppose it would be there for stuff like command line PHP. Mike *** REPLY SEPARATOR *** On 02/01/2003 at 5:15 PM Gareth Hastings wrote: >Yes I saw those but what it mad

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Gareth Hastings
here is one about. Anyway back to google :) > -Original Message- > From: Michael J. Pawlowsky [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 02, 2003 5:10 PM > To: Gareth Hastings; [EMAIL PROTECTED] > Subject: RE: [PHP] Some questions regarding pfsocketopen() >

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Michael J. Pawlowsky
Two comments from the manual that are interesting: php dot net at domainofdarkness dot com 29-Jan-2001 04:26 OK, WRT to the p* functions opening a new connection when one already exists. It is my understanting that (under Apache anyways) this is on a per-process basis. If you do a 'ps auxw|gr

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Gareth Hastings
t :/ > -Original Message- > From: Michael J. Pawlowsky [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 02, 2003 4:32 PM > To: Gareth Hastings > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP] Some questions regarding pfsocketopen() > > > Well I didnt try to wr

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Michael J. Pawlowsky
Well I didnt try to write or read to it... But this works But all that's telling me is that the var is there.. not if it's still open.. will leave that to you to find out... Let us know --file s1.php --- Next"; ?> file s2

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Michael J. Pawlowsky
Cool... Maybe I will learn something.. :-) Well in that case (I already deleted you last mail), where are you keeping the file pointer? You will need to register the var somewhere.. In a session perhaps? Mike Send me your code... I will play with it... *** REPLY SEPARATOR **

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Gareth Hastings
> You will need to have everythng on the same page. Your program ends once > the page does. pfsocketopen() is persistent and stays open even after your script has finished running until either the timeout period is reached or it gets disconnected/closedI think. I just don't know how to acc

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Michael J. Pawlowsky
You will need to have everythng on the same page. Your program ends once the page does. Here are some examples straight from the manual. \n"; } else { fputs ($fp, "GET / HTTP/1.0\r\nHost: www.example.com\r\n\r\n"); while (!feof($fp)) { echo fgets ($fp,128); } fclose ($f

RE: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Gareth Hastings
file resource error. > -Original Message- > From: Chris Shiflett [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 02, 2003 2:47 PM > To: Gareth Hastings; 'PHP-List' > Subject: Re: [PHP] Some questions regarding pfsocketopen() > > --- Gareth Hastings

Re: [PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Chris Shiflett
--- Gareth Hastings <[EMAIL PROTECTED]> wrote: > Could anyone tell me, is it possible to connect to > a persistent socket after it has been opened by a > different script? Sure. Think of it like a persistent database connection in Oracle, where the listener is on socket 1521 for everyone. The per

[PHP] Some questions regarding pfsocketopen()

2003-01-02 Thread Gareth Hastings
Could anyone tell me, is it possible to connect to a persistent socket after it has been opened by a different script? There is little documentation on this function. I did a quick search on google and lots of people say you can't, some say you can but its really hard and the rest go..."pf what??"

Re: [PHP] Some questions.

2002-08-12 Thread Bob Irwin
CTED]> Sent: Tuesday, August 13, 2002 12:21 PM Subject: Re: [PHP] Some questions. > on 13/08/02 3:42 AM, mintbaggio ([EMAIL PROTECTED]) wrote: > > > I'm a Chinese university student,I want to ask some questions about session. > > These days I'm build a website for my uni

Re: [PHP] Some questions.

2002-08-12 Thread Justin French
on 13/08/02 3:42 AM, mintbaggio ([EMAIL PROTECTED]) wrote: > I'm a Chinese university student,I want to ask some questions about session. > These days I'm build a website for my university with PHP, But I meet a > question when I develop the part of User Management: After I have log out > from a

Re: [PHP] Some questions.

2002-08-12 Thread Daniel Massón
g alphanumeric characters and you can compare like this if ($_GET["login"] == $registered_login && $_GET["ses"] == session_id()) // ok autenticated else // error: not autenticated >From: "mintbaggio" <[EMAIL PROTECTED]> >To: <> >Sub

[PHP] Some questions.

2002-08-12 Thread mintbaggio
Hello I'm a Chinese university student,I want to ask some questions about session. These days I'm build a website for my university with PHP, But I meet a question when I develop the part of User Management: After I have log out from a user page(I use "session_unset()" and "session_destroy()

Re: [PHP] some questions on sessions (long)...

2001-11-21 Thread Christian Dechery
How about the sessions? doesn't sessions also needs to send header data (before any other output)? the sessions are registered normally.. At 17:07 12/11/01 -0800, Christopher William Wesley wrote: >Your problem probably is including the miec.php from the .shtml >document. Does the .shtml docum

Re: [PHP] some questions on sessions (long)...

2001-11-13 Thread Christian Dechery
But what about the session? It get's registered... doesn't sessions also need to send header information? it gets registered... it just doesn't persist... At 17:07 12/11/01 -0800, you wrote: >Your problem probably is including the miec.php from the .shtml >document. Does the .shtml document sen

Re: [PHP] some questions on sessions (long)...

2001-11-12 Thread Christopher William Wesley
Your problem probably is including the miec.php from the .shtml document. Does the .shtml document send any output to the browser before including your .php script? If so, you're not going to be able to send any cookies from the .php script. Once any standard output makes it to the browser (inc

[PHP] some questions on sessions (long)...

2001-11-12 Thread Christian Dechery
I've recently had a problem with sessions, and came up with a problem that apparently has no solution... I want to understand why EXACTLY it does't work... From what I understand about sessions (reading PHP Docs), cookies are default and URLs holding the session_id are used if the cookies can

[PHP] Some questions on PHPUnit

2001-04-25 Thread Steven Haryanto
Does anyone here use PHPUnit? 1. If a test script needs some external input to do testing (notably, database connect info), is it a good idea to present an HTML form to ask input from user? Or should it also be able to prompt the user for these in case the test script is run by the PHP binary.