Re: [PHP] Globals

2003-08-01 Thread Chris Boget
> I'm curious if someone could explain to me why this is occuring: > > function blah() { > //global $GLOBALS; > echo 'Globals: '; print_r( $GLOBALS ); echo ''; > > } > > As it is shown above, with the 'global $GLOBALS' line commented > out, the print_r() works and shows all the currently defi

RE: [PHP] Globals

2003-08-01 Thread Jay Blanchard
[snip] $GLOBALS [/snip] >From http://us2.php.net/language.variables.scope "The $GLOBALS array is an associative array with the name of the global variable being the key and the contents of that variable being the value of the array element. Notice how $GLOBALS exists in any scope, this is because

[PHP] Re: Globals

2003-08-01 Thread Greg Beaver
Hi Chris, Chris Boget wrote: function blah() { //global $GLOBALS; echo 'Globals: '; print_r( $GLOBALS ); echo ''; } As it is shown above, with the 'global $GLOBALS' line commented out, the print_r() works and shows all the currently defined variables and their corresponding values. However, if

Re: [PHP] Globals

2003-08-01 Thread Jim Lucas
Maybe it has to do with the fact that the $GLOBALS[] array has a copy of itself inside the parent. kinda weird but it looks like this $GLOBALS['key1'] = 'value1'; $GLOBALS['key2'] = 'value2'; $GLOBALS['GLOBALS']['key1'] = 'value1'; $GLOBALS['GLOBALS']['key2'] = 'value2'; don't ask me why, but it

Re: [PHP] Globals

2003-08-01 Thread Jim Lucas
just to let you know, the $GLOBALS[] superglobals was around long before php 4.1.0 Jim Lucas - Original Message - From: "Jay Blanchard" <[EMAIL PROTECTED]> To: "Chris Boget" <[EMAIL PROTECTED]>; "PHP General" <[EMAIL PROTECTED]> Sent: Friday, August 01, 2003 12:18 PM Subject: RE: [PHP] Gl

RE: [PHP] Globals

2003-08-01 Thread Jay Blanchard
[snip] just to let you know, the $GLOBALS[] superglobals was around long before php 4.1.0 // Superglobals are available in any scope and do // not require 'global'. Superglobals are available // as of PHP 4.1.0 [/snip] This is the quote in the online manual -- PHP General Mailing List (http://

Re: [PHP] Re: Globals

2003-08-01 Thread Leif K-Brooks
Greg Beaver wrote: $GLOBALS does not contain a reference to itself Yes it does. I just ran the following, and I got "Greg is wrong." -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP G

[PHP] preg, patern quantifier limit

2003-08-01 Thread Yann Larrivee
Hi, i did a standard preg [A-Za-z0-9]{1,65536} What i am simply trying to do is to validate the a form that will insert into my TEXT database field. So i just want to prevent a larger insert then expected. PHP trows me this error "preg_match(): Compilation failed: number too big in {} quantifier

Re: [PHP] Re: Globals

2003-08-01 Thread Greg Beaver
Try this code: } blah(); ?> It appears that in a function scope, it doesn't. This is definitely a bug, I'll post it if it hasn't already been noticed. Greg Leif K-Brooks wrote: Greg Beaver wrote: $GLOBALS does not contain a reference to itself Yes it does. I just ran the following, and I

RE: [PHP] _GET question

2003-08-01 Thread Chris W. Parker
Pushpinder Singh Garcha on Friday, August 01, 2003 11:11 AM said: > action="full_profile_1.php?val=$company"> Use a hidden form element instead. > Can some one tell me if the action parameter of the form is correct ? > Since in the first part of the if() stateme

Re: [PHP] Re: Globals

2003-08-01 Thread Jim Lucas
actually, it does work and it does exist. Try using print_r() or print_r(array_keys($GLOBALS)); and you will see an entry for GLOBALS mine is located at #13 Jim Lucas - Original Message - From: "Greg Beaver" <[EMAIL PROTECTED]> To: "Leif K-Brooks" <[EMAIL PROTECTED]> Cc: <[EMAIL PR

Re: [PHP] Re: Globals

2003-08-01 Thread Greg Beaver
Hi Jim, The code you posted is correct, I never contested that. Read carefully. function not_super() { var_dump(isset($GLOBALS['GLOBALS'])); $a = array_keys($GLOBALS); var_dump(isset($a['GLOBALS'])); } not_super(); ?> run this code, don't read it, you will see output of bool(false)

Re: [PHP] Trouble getting $HTTP_RAW_POST_DATA

2003-08-01 Thread Mike Migurski
>$HTTP_RAW_POST_DATA is an array... >with echo you'll only get "array".. No, it's a string - just the raw bytes that were posted. >> Is register globals ON or OFF? Either way, maybe try >> $_SERVER['HTTP_RAW_POST_DATA']... Also, ensure that "always_populate_raw_post_data" is on, too - see: http:

Re: [PHP] preg, patern quantifier limit

2003-08-01 Thread Curt Zirzow
* Thus wrote Yann Larrivee ([EMAIL PROTECTED]): > Hi, i did a standard preg [A-Za-z0-9]{1,65536} > > What i am simply trying to do is to validate the a form that will insert > into my TEXT database field. So i just want to prevent a larger insert > then expected. > > > PHP trows me this error "p

Re: [PHP] Re: Globals

2003-08-01 Thread Jim Lucas
umm... That is what is going to happen when you follow your example. I think you are mistaken in what you are expecting... This line: $a = array_keys($GLOBALS); will give you an array of values that match the keys of the $GLOBALS array it won't copy the arrays. Try this. $value) { echo

[PHP] A long float number.

2003-08-01 Thread zavaboy
How do I prevent a long float number end up like this after/during a calculation? 8.5E-05 //A number error occurs. I even tried keeping the whole calculation in 1 line: //Get the weight (in pounds) of a O-Ring. $N = round((0.03613 * 1.85 * ((pow(pi(), 2) * pow(($iDia[$d] - $oDia[$d]), 2) *

RE: [PHP] Redirect to HTTPS

2003-08-01 Thread Luis Lebron
Here's another way to do it: https://$url_array[host]$url_array[path]";); } ?> Luis -Original Message- From: Richard Baskett [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 3:25 AM To: PHP General Subject: Re: [PHP] Redirect to HTTPS This is how I do it: if ($_SERVER['HTTPS

Re: [PHP] preg, patern quantifier limit

2003-08-01 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Fri, 1 Aug 2003 at 20:35, lines prefixed by '>' were originally written by you. > Hi, i did a standard preg [A-Za-z0-9]{1,65536} > What i am simply trying to do is to validate the a form that will > insert > into my TEXT database field. So i ju

Re: [PHP] Re: Globals

2003-08-01 Thread Greg Beaver
Jim, My bad, I posted the wrong code. Try this instead to see the bug: { var_dump(isset($GLOBALS['GLOBALS'])); return array_keys($GLOBALS); } //var_dump(not_super(), array_keys($GLOBALS)); not_super(); not_super(); ?> run this code, don't read it, you will see output of bool(false), boo

Re: [PHP] Re: Globals

2003-08-01 Thread Jim Lucas
I don't follow what you are trying to say here? it is returning true, just as it should. show me the results that you get by running this code. here is mine bool(true) bool(true) What is wrong about this? Read my notes below To: "Jim Lucas" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent:

Re: [PHP] Multiple targets with fscanf

2003-08-01 Thread Dan Anderson
> Thanks a lot. hehe no thanks needed. Just remember to read up on the functions so you'll know how they work. ;-) -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Globals

2003-08-01 Thread Greg Beaver
What version of PHP are you running? I have PHP 4.3.2 on windows XP here. I'm getting bool(false) bool(false) every time. Greg Jim Lucas wrote: I don't follow what you are trying to say here? it is returning true, just as it should. show me the results that you get by running this code. he

[PHP] Re: A long float number.

2003-08-01 Thread Bogdan Stancescu
Keeping it on one line doesn't affect the calculations (as it shouldn't). Try using either sprintf() or number_format() for this purpose (the latter is generally preferred, but I don't know exactlt what you're after). Bogdan Zavaboy wrote: How do I prevent a long float number end up like this

Re: [PHP] Re: Globals

2003-08-01 Thread Jim Lucas
I am running PHP 4.2.2 on Debian linux with apache 1.3.26 Jim - Original Message - From: Greg Beaver To: Jim Lucas Cc: [EMAIL PROTECTED] Sent: Friday, August 01, 2003 3:02 PM Subject: Re: [PHP] Re: Globals What version of PHP are you running? I have PHP 4.3.2 on window

RE: [PHP] Search Engine

2003-08-01 Thread Ralph Guzman
Check out: http://www.htdig.org/ -Original Message- From: imran [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 4:14 PM To: [EMAIL PROTECTED] Subject: [PHP] Search Engine Hi, Does anyone know any free search engine for web application imee -- PHP General Mailing L

[PHP] weird php error

2003-08-01 Thread Matt Giddings
Hello, I'm getting a weird warning message from a php script that I'm working on. Right now the script does not contain any include or require statements and is basically a very simple straight forward script. But when I try to execute via the browser I get the following error: Warning: Faile

Re: [PHP] weird php error

2003-08-01 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Sat, 2 Aug 2003 at 00:10, lines prefixed by '>' were originally written by you. > Hello, > I'm getting a weird warning message from a php script that I'm > working > on. Right now the script does not contain any include or require > statemen

RE: [PHP] weird php error

2003-08-01 Thread Matt Giddings
David, This is what my php.ini file looks like and I don't seem to have any .htaccess files. Could it be something in the httpd.conf file that’s pointing to an invalid file/directory? ; Automatically add files before or after any PHP document. auto_prepend_file = auto_append_file = Matt > -

[PHP] Re: A long float number.

2003-08-01 Thread zavaboy
Thanks! number_format() fixed it! "Bogdan Stancescu" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Keeping it on one line doesn't affect the calculations (as it > shouldn't). Try using either sprintf() or number_format() for this > purpose (the latter is generally preferred, but I

[PHP] strings

2003-08-01 Thread Anthony Ritter
In the following snippet, I'm trying to open and read a URL into the variable $contents. I'd like to use preg_replace() to return only part of that string beginning with say - regional and ending with new - but I get the complete URL string returned. Thank you for any assistance. Tony Ritter .

Re: [PHP] weird php error

2003-08-01 Thread Jim Lucas
yes it could be in the httpd.conf file. look in your VirtualHost block and see if something there refers to a file called loging.php Jim Lucas - Original Message - From: "Matt Giddings" <[EMAIL PROTECTED]> To: "'David Nicholson'" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, A

[PHP] Test a zip file for validity

2003-08-01 Thread Ivo Pletikosic
Hello all, How do I go about checking if a file is a zip file? Wrapping the zipinfo utility in php did not help since it does not return an exit code whether it succeeded or not. Thanks, IP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

RE: [PHP] Test a zip file for validity

2003-08-01 Thread Chris W. Parker
Ivo Pletikosic on Friday, August 01, 2003 5:10 PM said: > Wrapping the zipinfo utility in php did not help since it does not > return an exit code whether it succeeded or not. Well if zipinfo returns anything at all it's probably valid. If it doesn't then it's proba

Re: [PHP] strings

2003-08-01 Thread Curt Zirzow
* Thus wrote Anthony Ritter ([EMAIL PROTECTED]): > In the following snippet, I'm trying to open and read a URL into the > variable $contents. > I'd like to use preg_replace() to return only part of that string beginning > with say - regional and ending with new - but I get the complete URL string >

Re: [PHP] Test a zip file for validity

2003-08-01 Thread Curt Zirzow
* Thus wrote Ivo Pletikosic ([EMAIL PROTECTED]): > Hello all, > > How do I go about checking if a file is a zip file? > > Wrapping the zipinfo utility in php did not help since it does not return an > exit code whether it succeeded or not. I'm assuming the zipinfo your talking about is part of t

[PHP] strange issue: cygwin- why can't I configure the php.ini ?

2003-08-01 Thread kalmen
Hi, I have installed the latest cygwin - php4.2 with apache, but looking at the configuration file for php.ini , I tried to change value , restart apache and it didn't work then I went and totally rename the php.ini to aaa.bak and restart apache which I expecting the error reading og the php.ini

[PHP] Verisign PFPRO API & PHP: How to ensure hitting "STOP" in the browser will not kill the transcation

2003-08-01 Thread e
I've not been able to find anywhere a good use of the pfpro functionality in PHP. No where do any of the scripts ensure that the script goes through it's full execution. One person's solution was just to exec the pfpro binary in the background, passing it the necessary arguments. This seems i

Re: [PHP] strings

2003-08-01 Thread Anthony Ritter
Curt Zirzow wrote in message: > This exact thing was talked about earlier today, with the subject > 'Using eregi_replace()'. Right. However, I've tried using the following code in which the text from the URL is printed out completely and then I change the variable from $

Re: [PHP] Verisign PFPRO API & PHP: How to ensure hitting "STOP" in the browser will not kill the transcation

2003-08-01 Thread Curt Zirzow
* Thus wrote e ([EMAIL PROTECTED]): > > > I've not been able to find anywhere a good use of the pfpro > functionality in PHP. No where do any of the scripts ensure that the > script goes through it's full execution. > > One person's solution was just to exec the pfpro binary in the > backgrou

[PHP] plPHP released.. yes PostgreSQL functions in PHP

2003-08-01 Thread Joshua D. Drake
Hello, As a recent flurry of activity has commenced within Command Prompt we have released upon this rather unround earth, plPHP. Yes it is trigger safe, yes you can write UDF's in PostgreSQL with PHP now. Find it here: http://www.commandprompt.com/entry.lxp?lxpe=260 Have a glorius weekend.

[PHP] embedding php in C

2003-08-01 Thread April
This was last asked: in 2001 2. 2001-07-31 Embedding PHP into another application... The solution suggested was to adopt a commericial package. I have experimented with a javascript library, but I think the licensing of php is more favourable; I am not lawyer though! I have seen somewhere that

Re: [PHP] strings

2003-08-01 Thread Curt Zirzow
* Thus wrote Anthony Ritter ([EMAIL PROTECTED]): > Curt Zirzow wrote in message: > > > This exact thing was talked about earlier today, with the subject > > 'Using eregi_replace()'. > > > Right. > > However, I've tried using the following code in which the text from the

Re: [PHP] plPHP released.. yes PostgreSQL functions in PHP

2003-08-01 Thread Curt Zirzow
* Thus wrote Joshua D. Drake ([EMAIL PROTECTED]): > Hello, > > As a recent flurry of activity has commenced within Command Prompt we > have released upon this rather unround earth, plPHP. Yes it is trigger > safe, yes you can write UDF's in PostgreSQL with PHP now. I have yet to know what it do

Re: [PHP] strange issue: cygwin- why can't I configure the php.ini ?

2003-08-01 Thread Jason Wong
On Saturday 02 August 2003 09:00, kalmen wrote: > I have installed the latest cygwin - php4.2 with apache, but looking at > the configuration file for > php.ini , I tried to change value , restart apache and it didn't work > then I went and totally rename the php.ini to aaa.bak and restart apache

RE: [PHP] weird php error

2003-08-01 Thread Matt Giddings
Haven't found anything yet. The login.php file is the one I'm trying to view when I get that error. I have a second file "info.php" that works fine, but all it contains is "". So I know apache/php is working, I just don't know why it isn't working with my login script. Matt > -Original Mes

RE: [PHP] weird php error

2003-08-01 Thread Matt Giddings
Duh, I figured it out. I had the permissions screwed up on the file. Thanks for your help and sorry for bothering everybody else with my ignorance. Matt > -Original Message- > From: Matt Giddings [mailto:[EMAIL PROTECTED] > Sent: Friday, August 01, 2003 11:25 PM > To: 'Jim Lucas'; 'David

Re: [PHP] strings

2003-08-01 Thread Anthony Ritter
Curt Zirzow writes: > I did some testing you can see the code and results here: > http://zirzow.dyndns.org/html/php/tests/preg/parse_doc.php .. Thanks Curt. I checked it out and I still pick up the following lines which I was looking to delete on the pattern match. They are:

[PHP] Pushing array onto array

2003-08-01 Thread Hank TT
In comparing Perl's push to array_push in "PHP Developer's Cookbook" (2/e, p. 76), the authors note that pushing an array onto another produces a two-dimensional array. However, I have not been able to reproduce their example result, and php.net/array_push does not document this behavior. Just cu

<    1   2