Re: [PHP] questions about $_SERVER

2012-03-19 Thread tamouse mailing lists
On Sat, Mar 10, 2012 at 7:43 PM, Tedd Sperling wrote: > On Mar 10, 2012, at 3:53 PM, tamouse mailing lists wrote: >> On Sat, Mar 10, 2012 at 9:37 AM, Tedd Sperling >> wrote: >>> That's correct, but to access those variables outside of their scope (such >>> as a function) you do via a SuperGloba

Re: [PHP] questions about $_SERVER

2012-03-13 Thread Donovan Brooke
Stuart Dallas wrote: [snip] so $GLOBALS['GLOBALS']['GLOBALS']['GLOBALS']['_SERVER'] is a perfectly valid, if daft, way of accessing $_SERVER. -Stuart Now this is becoming educational! ;-) Donovan -- D Brooke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

Re: [PHP] questions about $_SERVER

2012-03-13 Thread Tim Streater
On 13 Mar 2012 at 15:59, Tedd Sperling wrote: > I'm not sure what would have saved bacon in the above case. I don't see how > your example would work. I think it contained a typo. > > In what I think you were trying to demonstrate, I would just pass $x by > reference (&$x) -- or -- return $x by

Re: [PHP] questions about $_SERVER

2012-03-13 Thread Tedd Sperling
On Mar 13, 2012, at 12:20 PM, Stuart Dallas wrote: > On 13 Mar 2012, at 15:59, Tedd Sperling wrote: > >> In any event, I seldom use globals anyway. This was more an academic >> discussion. > -snip- > It ultimately also means that only the superglobals are true globals. That was my initial statem

Re: [PHP] questions about $_SERVER

2012-03-13 Thread Stuart Dallas
On 13 Mar 2012, at 15:59, Tedd Sperling wrote: > In any event, I seldom use globals anyway. This was more an academic > discussion. If you're being academic about it please remember that the way PHP defines globals is different to most other languages. PHP: A variable defined at the top-level

Re: [PHP] questions about $_SERVER

2012-03-13 Thread Matijn Woudt
On Tue, Mar 13, 2012 at 4:59 PM, Tedd Sperling wrote: > On Mar 12, 2012, at 7:12 PM, Tim Streater wrote: >> > >> function yes ($a) >>     { >>     global $x; >>     if  ($a)  $x = "yes\n"; >>     } >> >> first (true); >> >> echo $x; >> >> ?> >> >> >> but I haven't looked into $GLOBALS enough to kn

Re: [PHP] questions about $_SERVER

2012-03-13 Thread Tedd Sperling
On Mar 12, 2012, at 12:04 PM, Daniel Brown wrote: > On Sun, Mar 11, 2012 at 14:16, Tedd Sperling wrote: >> This document clearly states that $GLOBALS is a SuperGlobal -- what am I not >> understanding here? > >You are understanding it correctly, the only thing that's missing > is the populat

Re: [PHP] questions about $_SERVER

2012-03-13 Thread Tedd Sperling
On Mar 12, 2012, at 7:12 PM, Tim Streater wrote: > > function yes ($a) > { > global $x; > if ($a) $x = "yes\n"; > } > > first (true); > > echo $x; > > ?> > > > but I haven't looked into $GLOBALS enough to know whether using them instead > would have saved my bacon. I'm no

Re: [PHP] questions about $_SERVER

2012-03-12 Thread Tim Streater
On 12 Mar 2012 at 20:07, Tedd Sperling wrote: > Tim: > > I read somewhere that using: > > global $x; > > is not recommended. Whereas, it is recommended to use: > > $x = $GLOBALS['x']; > echo $x; Tedd, That may well be, although as I write I can't recollect having seen that anywhere; so I don'

Re: [PHP] questions about $_SERVER

2012-03-12 Thread Jim Giner
The purpose of the "global" statement within a function is to let PHP know that the usage of a var name INSIDE that function is not meant to create a NEW variable, but instead, to reference the other (global) variable being used (and perhaps already defined) in your main script. Basically it wo

Re: [PHP] questions about $_SERVER

2012-03-12 Thread Tedd Sperling
On Mar 11, 2012, at 3:04 PM, Tim Streater wrote: > > In the following, $x is a global but not a super-global (AFAIK). > > > > function echox () > { > > global $x; > > echo $x; > > } > > $x = "Hello world\n"; > > echox (); > > ?> > > -- > Cheers -- Tim Tim: I read so

Re: [PHP] questions about $_SERVER

2012-03-12 Thread Daniel Brown
On Sun, Mar 11, 2012 at 14:16, Tedd Sperling wrote: > > As to placing an additional requirement (i.e., being predefined) on the > definition as to what constitutes a SuperGlobal is outside my understanding. > As such, I must defer to the PHP Manual, namely: > > http://php.net/manual/en/language.

Re: [PHP] questions about $_SERVER

2012-03-11 Thread Tim Streater
On 11 Mar 2012 at 18:16, Tedd Sperling wrote: > On Mar 11, 2012, at 10:25 AM, Daniel Brown wrote: > >> On Sat, Mar 10, 2012 at 10:37, Tedd Sperling wrote: >>> As such, there are no "globals" in PHP other than SuperGlobals. As I said, >>> if I'm wrong, please show me otherwise. >> >>A superg

Re: [PHP] questions about $_SERVER

2012-03-11 Thread Tedd Sperling
On Mar 11, 2012, at 10:25 AM, Daniel Brown wrote: > On Sat, Mar 10, 2012 at 10:37, Tedd Sperling wrote: >> As such, there are no "globals" in PHP other than SuperGlobals. As I said, >> if I'm wrong, please show me otherwise. > >A superglobal is predefined at run-time by the parser, > enviro

Re: [PHP] questions about $_SERVER

2012-03-11 Thread Daniel Brown
On Sat, Mar 10, 2012 at 10:37, Tedd Sperling wrote: > As such, there are no "globals" in PHP other than SuperGlobals. As I said, if > I'm wrong, please show me otherwise. A superglobal is predefined at run-time by the parser, environment, SAPI, etc. (_SERVER, _POST, _GET, _REQUEST, _ENV, _SE

Re: [PHP] questions about $_SERVER

2012-03-11 Thread Stuart Dallas
On 11 Mar 2012, at 01:43, Tedd Sperling wrote: > On Mar 10, 2012, at 3:53 PM, tamouse mailing lists wrote: >> On Sat, Mar 10, 2012 at 9:37 AM, Tedd Sperling >> wrote: >>> That's correct, but to access those variables outside of their scope (such >>> as a function) you do via a SuperGlobal, name

Re: [PHP] questions about $_SERVER

2012-03-10 Thread Tedd Sperling
On Mar 10, 2012, at 3:53 PM, tamouse mailing lists wrote: > On Sat, Mar 10, 2012 at 9:37 AM, Tedd Sperling > wrote: >> That's correct, but to access those variables outside of their scope (such >> as a function) you do via a SuperGlobal, namely $GLOBAL['whatever']. >> >> As such, there are no "

Re: [PHP] questions about $_SERVER

2012-03-10 Thread tamouse mailing lists
On Sat, Mar 10, 2012 at 9:37 AM, Tedd Sperling wrote: > On Mar 9, 2012, at 10:20 PM, Jim Giner wrote: >> "tamouse mailing lists" wrote in message >> news:CAHUC_t8g43GE3xqvSU5SwFePGS1XG=tk1mhrbem9gjaarve...@mail.gmail.com... >>> On Mon, Feb 13, 2012 at 2:39 PM, Tedd Sperling >>> wrote: On Fe

Re: [PHP] questions about $_SERVER

2012-03-10 Thread Jim Giner
"Tedd Sperling" wrote in message news:315faa8f-3103-4661-b167-d30248952...@gmail.com... On Mar 9, 2012, at 10:20 PM, Jim Giner wrote: > "tamouse mailing lists" wrote in message > news:CAHUC_t8g43GE3xqvSU5SwFePGS1XG=tk1mhrbem9gjaarve...@mail.gmail.com... >> On Mon, Feb 13, 2012 at 2:39 PM, Tedd

Re: [PHP] questions about $_SERVER

2012-03-10 Thread Tedd Sperling
On Mar 9, 2012, at 10:20 PM, Jim Giner wrote: > "tamouse mailing lists" wrote in message > news:CAHUC_t8g43GE3xqvSU5SwFePGS1XG=tk1mhrbem9gjaarve...@mail.gmail.com... >> On Mon, Feb 13, 2012 at 2:39 PM, Tedd Sperling >> wrote: >>> On Feb 13, 2012, at 4:10 AM, Stuart Dallas wrote: On 13 Feb

Re: [PHP] questions about $_SERVER

2012-03-09 Thread Jim Giner
"tamouse mailing lists" wrote in message news:CAHUC_t8g43GE3xqvSU5SwFePGS1XG=tk1mhrbem9gjaarve...@mail.gmail.com... > On Mon, Feb 13, 2012 at 2:39 PM, Tedd Sperling > wrote: >> On Feb 13, 2012, at 4:10 AM, Stuart Dallas wrote: >>> On 13 Feb 2012, at 06:28, Rui Hu wrote: How PHP sets varia

Re: [PHP] questions about $_SERVER

2012-03-09 Thread tamouse mailing lists
On Mon, Feb 13, 2012 at 2:39 PM, Tedd Sperling wrote: > On Feb 13, 2012, at 4:10 AM, Stuart Dallas wrote: >> On 13 Feb 2012, at 06:28, Rui Hu wrote: >>> How PHP sets variables in $_SERVER, say, $DOCUMENT_ROOT? What should I know >>> if I want to modify $_SERVER myself? >> >> Once your script start

Re: [PHP] questions about $_SERVER

2012-02-13 Thread Tedd Sperling
On Feb 13, 2012, at 4:10 AM, Stuart Dallas wrote: > On 13 Feb 2012, at 06:28, Rui Hu wrote: > >> How PHP sets variables in $_SERVER, say, $DOCUMENT_ROOT? What should I know >> if I want to modify $_SERVER myself? > > Once your script starts the superglobals are no different to any other > varia

Re: [PHP] questions about $_SERVER

2012-02-13 Thread Stuart Dallas
On 13 Feb 2012, at 06:28, Rui Hu wrote: > How PHP sets variables in $_SERVER, say, $DOCUMENT_ROOT? What should I know > if I want to modify $_SERVER myself? Once your script starts the superglobals are no different to any other variables, except that they're in scope at all times. The only thi

Re: [PHP] questions about $_SERVER

2012-02-12 Thread Michael Save
On Mon, Feb 13, 2012 at 5:28 PM, Rui Hu wrote: > hi, > > How PHP sets variables in $_SERVER, say, $DOCUMENT_ROOT? What should I know > if I want to modify $_SERVER myself? > > Thanks! > > > -- > Best regards, > > Rui Hu >

Re: [PHP] Questions Regarding Recent Ubuntu PHP5 Security Announcement

2011-10-19 Thread Jim Lucas
On 10/19/2011 8:05 AM, Jon Watson wrote: > On Wed, Oct 19, 2011 at 11:54 AM, Jim Lucas wrote: > >> On 10/19/2011 7:00 AM, Jon Watson wrote: >>> Hello All, >>> >>> I am trying to make some sense of this PHP5 security vulnerability notice >>> from 18 October 2011: >>> >>> http://comments.gmane.org/

Re: [PHP] Questions Regarding Recent Ubuntu PHP5 Security Announcement

2011-10-19 Thread Jon Watson
On Wed, Oct 19, 2011 at 11:54 AM, Jim Lucas wrote: > On 10/19/2011 7:00 AM, Jon Watson wrote: > > Hello All, > > > > I am trying to make some sense of this PHP5 security vulnerability notice > > from 18 October 2011: > > > > http://comments.gmane.org/gmane.linux.ubuntu.security.announce/1478 > >

Re: [PHP] Questions Regarding Recent Ubuntu PHP5 Security Announcement

2011-10-19 Thread Jim Lucas
On 10/19/2011 7:00 AM, Jon Watson wrote: > Hello All, > > I am trying to make some sense of this PHP5 security vulnerability notice > from 18 October 2011: > > http://comments.gmane.org/gmane.linux.ubuntu.security.announce/1478 > > It states that for Ubuntu 8.04 users, a PHP upgrade to 5.2.4 is

Re: [PHP] questions about if statements regarding a checkbox

2010-10-31 Thread Ben Brentlinger
someone had responded with the isset if(isset($_POST['reallife'])) { print_r($_POST); } Richard L. Buskirk -Original Message- From: Ben Brentlinger [mailto:b...@benbrent.com] Sent: Sunday, October 31, 2010 8:26 AM To: php-general@lists.php.net Subject: Re: [PHP] question

Re: [PHP] questions about if statements regarding a checkbox

2010-10-31 Thread Ben Brentlinger
thanks for your help. I just retested my code and even though it didn't work, I found the reason it wasn't working was because I had an unneeded space between the "if" and the rest of the if statement. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/

Re: [PHP] questions about if statements regarding a checkbox

2010-10-31 Thread tedd
At 10:05 PM -0400 10/30/10, Ben Brentlinger wrote: hello, I'd like to know the proper code to use in a php script that processes a form with a checkbox in order to send one email if the checkbox has been checked and another email if the checkbox hasn't. I tried if($check == true) and I tried

RE: [PHP] questions about if statements regarding a checkbox

2010-10-31 Thread admin
...@buskirkgraphics.com] Sent: Sunday, October 31, 2010 10:37 AM To: 'Ben Brentlinger'; php-general@lists.php.net Subject: RE: [PHP] questions about if statements regarding a checkbox I tested your code and besides adding a form to the beginning it works. If you want to see the results of the

RE: [PHP] questions about if statements regarding a checkbox

2010-10-31 Thread admin
ts.php.net Subject: Re: [PHP] questions about if statements regarding a checkbox Here's the code I'm using with the exception of the php tags and the redirect script that redirects to another page once the form is submitted. This is just a test script I'm working on in order to te

Re: [PHP] questions about if statements regarding a checkbox

2010-10-31 Thread Ben Brentlinger
Here's the code I'm using with the exception of the php tags and the redirect script that redirects to another page once the form is submitted. This is just a test script I'm working on in order to teach myself php. The php portion will be posted first, than the html form related to the php.

Re: [PHP] questions about if statements regarding a checkbox

2010-10-31 Thread Andre Polykanine
Hello Ben, You should use isset: if (isset($_POST['check'])) { // The checkbox is checked } else { // It's unchecked } -- With best regards from Ukraine, Andre Skype: Francophile Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion - Original message - From: Ben

Re: [PHP] questions about if statements regarding a checkbox

2010-10-31 Thread a...@ashleysheridan.co.uk
What is the code you're using now? You have a syntax error, but without seeing the code, we are all left to guessing what the problem could be. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Ben Brentlinger" Date: Sun, Oct 31, 2010 03:56 Subject: [PHP] questions ab

Re: [PHP] questions about if statements regarding a checkbox

2010-10-30 Thread Ben Brentlinger
I tried that, but I'm getting the syntax error that says "unexpected T_IF". Probably because I'm trying to process this information directly in an email rather letting a mysql database handle the data, which I find harder to set up when writing a script from scratch than it would be to code a

Re: [PHP] questions about if statements regarding a checkbox

2010-10-30 Thread Bastien
On 2010-10-30, at 10:28 PM, wrote: > > > > > If check it will submit the value of 'on' > > So > > If($_POST['test'] == "on') > { > Do this > }else{ > Do this > } > > > Richard L. Buskirk > > > -Original Message- > From: Ben Brentlinger [mailto:b...@benbrent.com] > Sent: Satu

RE: [PHP] questions about if statements regarding a checkbox

2010-10-30 Thread admin
If check it will submit the value of 'on' So If($_POST['test'] == "on') { Do this }else{ Do this } Richard L. Buskirk -Original Message- From: Ben Brentlinger [mailto:b...@benbrent.com] Sent: Saturday, October 30, 2010 10:05 PM To: php-general@lists.php.net Subject: [PHP] questi

Re: [PHP] questions about if statements regarding a checkbox

2010-10-30 Thread Adam Richardson
On Sat, Oct 30, 2010 at 10:05 PM, Ben Brentlinger wrote: > hello, > > I'd like to know the proper code to use in a php script that processes a > form with a checkbox in order to send one email if the checkbox has been > checked and another email if the checkbox hasn't.  I tried if($check == > true

RE: [PHP] Questions from a Newbie - Please Help

2010-10-19 Thread Tommy Pham
> -Original Message- > From: Steve Staples [mailto:sstap...@mnsi.net] > Sent: Tuesday, October 19, 2010 11:51 AM > To: php-general > Subject: RE: [PHP] Questions from a Newbie - Please Help > > On Tue, 2010-10-19 at 11:18 -0700, Tommy Pham wrote: > &

RE: [PHP] Questions from a Newbie - Please Help

2010-10-19 Thread Steve Staples
On Tue, 2010-10-19 at 11:18 -0700, Tommy Pham wrote: > > -Original Message- > > From: Steve Staples [mailto:sstap...@mnsi.net] > > Sent: Tuesday, October 19, 2010 11:07 AM > > To: Ethan Rosenberg > > Cc: php-general@lists.php.net > > Subject: RE: [PHP] Q

RE: [PHP] Questions from a Newbie - Please Help

2010-10-19 Thread Tommy Pham
> -Original Message- > From: Steve Staples [mailto:sstap...@mnsi.net] > Sent: Tuesday, October 19, 2010 11:07 AM > To: Ethan Rosenberg > Cc: php-general@lists.php.net > Subject: RE: [PHP] Questions from a Newbie - Please Help > > > > i am pretty sure i r

RE: [PHP] Questions from a Newbie - Please Help

2010-10-19 Thread Steve Staples
i am pretty sure i read it on here already... but your PHP code looks wrong. ORIGNAL CODE: /* * Create Database test22 */ FIXED CODE: END FIXX firstly... you are missing your ending ; AFTER the " on most of your lines... and i've seen this before, where it wont throw the err

RE: [PHP] Questions from a Newbie

2010-10-19 Thread Tommy Pham
> -Original Message- > From: Ethan Rosenberg [mailto:eth...@earthlink.net] > Sent: Tuesday, October 19, 2010 9:19 AM > To: Tommy Pham; php-general@lists.php.net > Subject: RE: [PHP] Questions from a Newbie > > Dear List - > > The error log only exists if he con

RE: [PHP] Questions from a Newbie - Please Help

2010-10-19 Thread Ethan Rosenberg
> Sent: Tuesday, October 19, 2010 12:05 AM > To: php-general@lists.php.net > Subject: Re: [PHP] Questions from a Newbie > > Tamara - > > Thanks. > > No error_log. > The error log only exists if he configures it properly and the script has error. IE: log_errors & er

RE: [PHP] Questions from a Newbie

2010-10-19 Thread Ethan Rosenberg
M 10/19/2010, Tommy Pham wrote: > -Original Message- > From: Ethan Rosenberg [mailto:eth...@earthlink.net] > Sent: Tuesday, October 19, 2010 12:05 AM > To: php-general@lists.php.net > Subject: Re: [PHP] Questions from a Newbie > > Tamara - > > Thanks. > >

RE: [PHP] Questions from a Newbie

2010-10-19 Thread Tommy Pham
> -Original Message- > From: Ethan Rosenberg [mailto:eth...@earthlink.net] > Sent: Tuesday, October 19, 2010 12:05 AM > To: php-general@lists.php.net > Subject: Re: [PHP] Questions from a Newbie > > Tamara - > > Thanks. > > No error_log. > The error

Re: [PHP] Questions from a Newbie

2010-10-19 Thread Ethan Rosenberg
Tamara - Thanks. No error_log. This works ... Ethan ++ At 02:23 AM 10/19/2010, Tamara Temple wrote: On Oct 18, 2010, at 11:01 PM, Ethan Rosenberg wrote: I've added the code you suggest, and I still get a blank screen. Should I be explicitly be using mysqli functions; eg mysqli_

RE: [PHP] Questions from a Newbie

2010-10-18 Thread Tommy Pham
> -Original Message- > From: Paul M Foster [mailto:pa...@quillandmouse.com] > Sent: Sunday, October 17, 2010 9:46 PM > To: php-general@lists.php.net > Subject: Re: [PHP] Questions from a Newbie > > On Sun, Oct 17, 2010 at 01:00:44AM -0400, Ethan Rosenberg wr

Re: [PHP] Questions from a Newbie

2010-10-17 Thread Paul M Foster
On Sun, Oct 17, 2010 at 01:00:44AM -0400, Ethan Rosenberg wrote: > Dear List - > > Here are some questions, which I am sure are trivial, but I am a > newbie, and cannot find the answers online > > I cannot get the following to work. In my Firefox [Iceweasel] > browser, I enter the following

Re: [PHP] Questions from a Newbie

2010-10-17 Thread Tommy Pham
On Sun, Oct 17, 2010 at 11:22 AM, Ethan Rosenberg wrote: > > > > Tommy - > > Thanks. > > As I stated, I am a newbie. > > 1] I am trying to shorten the learning curve by asking some questions, which > I understand are probably trivial.  A whole MySQLi list of functions at this > point is to much

Re: [PHP] Questions from a Newbie

2010-10-17 Thread Tamara Temple
gah, i botched that up. For the first part, you want the following: $cxn = new mysql($host, $user, $password); $res = $cxn->query("create database test22:); if (!$res) { die("Failed to create database test22: " . $cxn->error()); } Then, reopen the

Re: [PHP] Questions from a Newbie

2010-10-17 Thread Tamara Temple
On Oct 17, 2010, at 1:22 PM, Ethan Rosenberg wrote: At 01:41 AM 10/17/2010, Tommy Pham wrote: > I cannot get the following to work. In my Firefox [Iceweasel] browser, I > enter the following URL: [w/ the http] Whenever you get a blank screen running a php application, the place to look i

Re: [PHP] Questions from a Newbie

2010-10-17 Thread a...@ashleysheridan.co.uk
Linux can be run as a GUI, using a window manager. Aside from that, have a look at the manual pages on php.net, which give some good examples of how to use the various mysql functions. Also, on your development machine, its a good idea to turn on errors, as it can indicate where these problems

RE: [PHP] Questions from a Newbie

2010-10-17 Thread Ethan Rosenberg
At 01:41 AM 10/17/2010, Tommy Pham wrote: > -Original Message- > From: Ethan Rosenberg [mailto:eth...@earthlink.net] > Sent: Saturday, October 16, 2010 10:01 PM > To: php-general@lists.php.net > Subject: [PHP] Questions from a Newbie > > Dear List - > > Here are some questions, which I

RE: [PHP] Questions from a Newbie

2010-10-17 Thread Tommy Pham
> -Original Message- > From: Alexis [mailto:phplis...@antonakis.co.uk] > Sent: Sunday, October 17, 2010 4:10 AM > To: php-general@lists.php.net > Subject: Re: [PHP] Questions from a Newbie > > Ethan,you have the end of line semi colons enclosed in double > quote

Re: [PHP] Questions from a Newbie

2010-10-17 Thread Christian Heinrich
Am Sonntag, den 17.10.2010, 01:00 -0400 schrieb Ethan Rosenberg: > Dear List - > > Here are some questions, which I am sure are trivial, but I am a > newbie, and cannot find the answers online > > I cannot get the following to work. In my Firefox [Iceweasel] > browser, I enter the followin

Re: [PHP] Questions from a Newbie

2010-10-17 Thread Alexis
Ethan,you have the end of line semi colons enclosed in double quotes..move them to the true end of line. On 17/10/10 04:45, Christian Heinrich wrote: Am Sonntag, den 17.10.2010, 01:00 -0400 schrieb Ethan Rosenberg: Dear List - Here are some questions, which I am sure are trivial, but I am a n

RE: [PHP] Questions from a Newbie

2010-10-16 Thread Tommy Pham
> -Original Message- > From: Ethan Rosenberg [mailto:eth...@earthlink.net] > Sent: Saturday, October 16, 2010 10:01 PM > To: php-general@lists.php.net > Subject: [PHP] Questions from a Newbie > > Dear List - > > Here are some questions, which I am sure are trivial, but I am a newbie, and

Re: [PHP] Questions about $_SERVER

2010-09-03 Thread tedd
Peter and Paul: Sorry, I went on vacation for a few days (it was a surprise vacation with a 2 day notice). I think you both understand what I was looking for and found what I wanted was not possible. It's just one of those things in life you have to live with. Thanks very much for your tim

Re: [PHP] Questions about $_SERVER

2010-08-30 Thread Paul M Foster
On Mon, Aug 30, 2010 at 05:13:59PM -0400, Paul M Foster wrote: > On Mon, Aug 30, 2010 at 10:34:42PM +0200, Peter Lind wrote: > > > On 30 August 2010 22:34, Paul M Foster wrote: > > > On Mon, Aug 30, 2010 at 09:53:46PM +0200, Peter Lind wrote: > > > > > > > > >> > $_SERVER['REMOTE_NAME'] > > >

Re: [PHP] Questions about $_SERVER

2010-08-30 Thread Paul M Foster
On Mon, Aug 30, 2010 at 10:34:42PM +0200, Peter Lind wrote: > On 30 August 2010 22:34, Paul M Foster wrote: > > On Mon, Aug 30, 2010 at 09:53:46PM +0200, Peter Lind wrote: > > > >> > $_SERVER['REMOTE_NAME'] > >> > > >> > So the question is, how would he get that last variable. It becomes > >>

Re: [PHP] Questions about $_SERVER

2010-08-30 Thread Peter Lind
On 30 August 2010 22:34, Paul M Foster wrote: > On Mon, Aug 30, 2010 at 09:53:46PM +0200, Peter Lind wrote: > >> On 30 August 2010 21:32, Paul M Foster wrote: >> > On Sun, Aug 29, 2010 at 06:04:23PM +0200, Per Jessen wrote: >> > >> >> Jason Pruim wrote: >> >> >> >> > My understanding of how share

Re: [PHP] Questions about $_SERVER

2010-08-30 Thread Paul M Foster
On Mon, Aug 30, 2010 at 09:53:46PM +0200, Peter Lind wrote: > On 30 August 2010 21:32, Paul M Foster wrote: > > On Sun, Aug 29, 2010 at 06:04:23PM +0200, Per Jessen wrote: > > > >> Jason Pruim wrote: > >> > >> > My understanding of how shared hosting works would make this near > >> > impossible..

Re: [PHP] Questions about $_SERVER

2010-08-30 Thread Peter Lind
On 30 August 2010 21:32, Paul M Foster wrote: > On Sun, Aug 29, 2010 at 06:04:23PM +0200, Per Jessen wrote: > >> Jason Pruim wrote: >> >> > My understanding of how shared hosting works would make this near >> > impossible... Basically Apache grabs a header that is sent at the >> > initial connecti

Re: [PHP] Questions about $_SERVER

2010-08-30 Thread Paul M Foster
On Sun, Aug 29, 2010 at 06:04:23PM +0200, Per Jessen wrote: > Jason Pruim wrote: > > > My understanding of how shared hosting works would make this near > > impossible... Basically Apache grabs a header that is sent at the > > initial connection which includes the destination hostname and from >

Re: [PHP] Questions about $_SERVER

2010-08-29 Thread Peter Lind
On 29 August 2010 18:04, Per Jessen wrote: > Jason Pruim wrote: > >> My understanding of how shared hosting works would make this near >> impossible... Basically Apache grabs a header that is sent at the >> initial connection which includes the destination hostname and from >> there it translates

Re: [PHP] Questions about $_SERVER

2010-08-29 Thread Per Jessen
Jason Pruim wrote: > My understanding of how shared hosting works would make this near > impossible... Basically Apache grabs a header that is sent at the > initial connection which includes the destination hostname and from > there it translates it to the proper directory on the shared host. > >

Re: [PHP] Questions about $_SERVER

2010-08-29 Thread tedd
At 11:54 AM -0400 8/29/10, Jason Pruim wrote: On Aug 29, 2010, at 10:55 AM, tedd wrote: To all: My post about SERVER globals was simply an observation that the SERVER global report of host and remote was not symmetric -- for example you could obtain both the IP and Domain Name of the host,

Re: [PHP] Questions about $_SERVER

2010-08-29 Thread Jason Pruim
On Aug 29, 2010, at 10:55 AM, tedd wrote: At 10:56 AM +0200 8/29/10, Peter Lind wrote: On 29 August 2010 08:08, Jim Lucas wrote: *snip* Their is not existing variable (if you would) that your server, when connecting to a remote server, would be sending. So, to have the remote end be abl

Re: [PHP] Questions about $_SERVER

2010-08-29 Thread tedd
At 10:56 AM +0200 8/29/10, Peter Lind wrote: On 29 August 2010 08:08, Jim Lucas wrote: *snip* Their is not existing variable (if you would) that your server, when connecting to a remote server, would be sending. So, to have the remote end be able to identify the initiating host identity,

Re: [PHP] Questions about $_SERVER

2010-08-29 Thread Peter Lind
On 29 August 2010 08:08, Jim Lucas wrote: *snip* > Their is not existing variable (if you would) that your server, when > connecting to a remote server, would be sending.  So, to have the remote end > be able to identify the initiating host identity, the initiating side would > have to add some

Re: [PHP] Questions about $_SERVER

2010-08-28 Thread Jim Lucas
tedd wrote: At 12:15 AM +0200 8/29/10, Peter Lind wrote: On 28 August 2010 23:45, tedd wrote: > So, I'm trying to figure out a compliment to $_SERVER['SERVER_NAME'] such as something like $_SERVER['REMOTE_NAME']. > Is there such a beast? You're not making any sense. For the script on y

Re: [PHP] Questions about $_SERVER

2010-08-28 Thread Tamara Temple
Sorry, forgot to include the mailing list email when I replied to this originally... On Aug 28, 2010, at 8:28 PM, tedd wrote: Sorry for not making sense. But sometimes you have to confirm the players (both server and remote) in communications. Try this -- place this script on your site:

Re: [PHP] Questions about $_SERVER

2010-08-28 Thread tedd
At 12:15 AM +0200 8/29/10, Peter Lind wrote: On 28 August 2010 23:45, tedd wrote: > So, I'm trying to figure out a compliment to $_SERVER['SERVER_NAME'] such as something like $_SERVER['REMOTE_NAME']. > Is there such a beast? You're not making any sense. For the script on your local hos

Re: [PHP] Questions about $_SERVER

2010-08-28 Thread Peter Lind
On 28 August 2010 23:45, tedd wrote: > At 9:41 PM +0200 8/28/10, Per Jessen wrote: >> >> tedd wrote: >>  > >>> >>>  So, how can I identify the exact location of the 'server_addr' and of >>>  the 'remote_addr' on shared hosting? Is that possible? >> >> $_SERVER['SERVER_NAME'] will tell you the name

Re: [PHP] Questions about $_SERVER

2010-08-28 Thread tedd
At 9:41 PM +0200 8/28/10, Per Jessen wrote: tedd wrote: > So, how can I identify the exact location of the 'server_addr' and of the 'remote_addr' on shared hosting? Is that possible? $_SERVER['SERVER_NAME'] will tell you the name of the virtual host - I don't know if that is what you're aft

Re: [PHP] Questions about $_SERVER

2010-08-28 Thread Per Jessen
tedd wrote: > Hi gang: > > The server global: > > $_SERVER['SERVER_ADDR'] > > Provides the IP of the server where the current script is executing. > > And, the server global: > > $_SERVER['REMOTE_ADDR'] > > Provides the IP of the server executing the script. Yes, aka the client addr

Re: [PHP] Questions regarding limits of processes launched by system, exec, passthru ...

2008-09-28 Thread Bastien Koert
nning some other binary... > > From: Thodoris [EMAIL PROTECTED] > Sent: Saturday, September 27, 2008 8:24 AM > To: [EMAIL PROTECTED]; php-general@lists.php.net > Subject: Re: [PHP] Questions regarding limits of processes launched by > system, exec,passthru ... > > &

RE: [PHP] Questions regarding limits of processes launched by system, exec, passthru ...

2008-09-27 Thread Richard Lynch
EMAIL PROTECTED]; php-general@lists.php.net Subject: Re: [PHP] Questions regarding limits of processes launched by system, exec,passthru ... > Hello all, > > Is there a way to limit the memory consumption and / or the CPU > consumption of processes launched by the php

Re: [PHP] Questions regarding limits of processes launched by system, exec, passthru ...

2008-09-27 Thread Thodoris
O/H Thodoris έγραψε: Hello all, Is there a way to limit the memory consumption and / or the CPU consumption of processes launched by the php functions system, exec, passthru, proc_open and shell_exec? We use mod_php with an apache (mpm-prefork) on Linux. The following settings don't have any

Re: [PHP] Questions regarding limits of processes launched by system, exec, passthru ...

2008-09-27 Thread Thodoris
Hello all, Is there a way to limit the memory consumption and / or the CPU consumption of processes launched by the php functions system, exec, passthru, proc_open and shell_exec? We use mod_php with an apache (mpm-prefork) on Linux. The following settings don't have any effect at all: PHP:

Re: [PHP] Questions regarding limits of processes launched by system, exec, passthru ...

2008-09-25 Thread Daniel Brown
On Thu, Sep 25, 2008 at 4:28 AM, Valentin Schmid - ICSurselva AG <[EMAIL PROTECTED]> wrote: > Hello all, > > Is there a way to limit the memory consumption and / or the CPU > consumption of processes launched by the php functions system, > exec, passthru, proc_open and shell_exec? Since you're

RE: [PHP] Questions regarding limits of processes launched by system, exec, passthru ...

2008-09-25 Thread Richard Lynch
> -Original Message- > Is there a way to limit the memory consumption and / or the CPU > consumption of processes launched by the php functions system, > exec, passthru, proc_open and shell_exec? I suspect... PHP pretty much releases control to the shell or whatever, and just waits aroun

Re: [PHP] Questions about finding ranges

2008-07-24 Thread Aslan
You guys are just awesome! Thanks already for the help I really appreciate it! My site is up on adslgeek.com/troubleshooter but I have a DNS problem that I have to fix over the weekend. :-( The scenario is an input dashboard, with various settings that measure the quality of an ADSL line. I

Re: [PHP] Questions about finding ranges

2008-07-23 Thread Micah Gersten
Here's the info on the "weirdness" of between: http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#operator_between Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com VamVan wrote: > Hey, > > For ranges you can also use "Between" in the mysql querie

Re: [PHP] Questions about finding ranges

2008-07-23 Thread VamVan
Hey, For ranges you can also use "Between" in the mysql queries. SELECT * FROM table WHERE Type= "Attainable" AND Min LIKE $var can be written as Select * from table where between min and max Just remember that "between" acts a bit wierd with dates or else Jim's solution would be perfect for yo

Re: [PHP] Questions about finding ranges

2008-07-23 Thread Jim Lucas
Aslan wrote: Hey there, I have a range of records that represent different faults and different symptoms that I want to pull out of the database, and to find the records that are the closest within each range. I am currently doing it with a barrage of if statements, but I am sure that this

Re: [PHP] questions about using include() in php

2008-07-18 Thread Robert Cummings
On Sat, 2008-07-19 at 11:57 +0530, Sudhakar wrote: > i am doing seo for a website and this website uses a lot of php for which i > need suggestions. this is how the website is set up. > > in the index.php file there is a flash banner at the top of the page and the > center part is another file whi

Re: [PHP] Questions about overloading and visibility in PHP5

2007-09-24 Thread Larry Garfield
On Tuesday 18 September 2007, Andrew Ballard wrote: > > I'm guessing that the answer to all of my questions is some how > > wrapped up in visibility and overloading. Unfortunately I cannot find > > any resource that documents the interactions. TIA. > > As I understand it, the __get and __set do

Re: [PHP] Questions about overloading and visibility in PHP5

2007-09-18 Thread Andrew Ballard
> 1) It seems that the getter and setter are not called on every single > call. For example, if I do the following: > > $bar = new foo; > $bar->x = 'x'; > > There is no output. I would expect to see "Setting $this->x to x." > Another example: > > $bar = new foo; > $bar->y = 'y'; > echo $bar->y; >

Re: [PHP] questions regarding PHP and Forms

2006-01-28 Thread chris smith
Hi, I missed the start of the thread but it may be because you have a space in "rowing machine" for the option. Try "rowing_machine" or "rowingmachine" and see what happens. (check your javascript console - in firefox type 'javascript:' in the address bar without the quotes). On 1/29/06, Miles

Re: [PHP] questions regarding PHP and Forms

2006-01-28 Thread Miles Thompson
At 05:39 PM 1/28/2006, Paul Goepfert wrote: Thanks for the help everyone. I have decided to use javascript to deal with my second problem. I understand that this is not a JavaScript fourm but I am having some trouble getting my JS function to work correctly. Here is my JS code. function getE

Re: [PHP] questions regarding PHP and Forms

2006-01-28 Thread Paul Goepfert
Thanks for the help everyone. I have decided to use javascript to deal with my second problem. I understand that this is not a JavaScript fourm but I am having some trouble getting my JS function to work correctly. Here is my JS code. function getEquipment () { var mylist = document.get

RE: [PHP] questions regarding PHP and Forms

2006-01-27 Thread Weber Sites LTD
Check out this list of code examples to help with #1 http://www.weberdev.com/AdvancedSearch.php?searchtype=title&search=validatio n Sincerely berber Visit the Weber Sites Today, To see where PHP might take you tomorrow. PHP code examples : http://www.weberdev.com Free Uptime Monitor : htt

Re: [PHP] questions regarding PHP and Forms

2006-01-27 Thread Austin Denyer
On Fri, 27 Jan 2006 12:28:07 -0700 Paul Goepfert <[EMAIL PROTECTED]> wrote: > > I am writing my first website in php. I have a few questions. > > 1) I need to do vaildation on form values that I have entered into a > form. Is there a way I can write the vaildation code on the same page > as th

Re: [PHP] questions regarding PHP and Forms

2006-01-27 Thread Jay Paulson
> 1) I need to do vaildation on form values that I have entered into a > form. Is there a way I can write the vaildation code on the same page > as the form in php? Yes there sure is. :) if (isset($submit)) { // data validation etc. } else { // display html form } > 2) I have a drop do

Re: [PHP] Questions from a ColdFusion Developer

2005-12-16 Thread Robert Cummings
On Thu, 2005-12-15 at 22:24, Christopher Jordan wrote: > > I think you've hit the nail on the head there, but I'm sorta glad the > subject's come up since I'm learning about a concept that I've not > used before. Is it mostly used for purposes of scalability? It seems > like it might be that way.

Re: [PHP] Questions from a ColdFusion Developer

2005-12-15 Thread Christopher Jordan
Robert Cummings <[EMAIL PROTECTED]> wrote:>On Wed, 2005-12-14 at 21:34, Christopher Jordan wrote: > Rob, > > Thanks for responding. :) I have more questions. I hope >that's okay. :) >*lol* No problem :) Thanks! :) > > You said: > "Share nothing" refers to the PHP philosophy of not tying

  1   2   >