Re: [PHP] Trouble getting $HTTP_RAW_POST_DATA

2003-08-01 Thread Philip Olson
Your script should work fine, and to fix claims made in this thread: a) $HTTP_RAW_POST_DATA is NOT an array, it's a string. b) It does not live in $_SERVER, or rely on register_globals. Your code is wrong because you don't provide names for your fields, so there is no POST data. Assign

Re: [PHP] Multiple targets with fscanf

2003-08-01 Thread Denis 'Alpheus' Cahuk
Dan Anderson wrote: Is there any reason you couldn't do something like: ?php $buffer = implode(\n,file($somesite)); while (strstr($buffer,li); { $li_tag_start_position = strpos($buffer,li); $li_tag_end_position = strpos($buffer,/li); $data = substr($buffer,(4 + $li_tag_start_position),(4 +

[PHP] using mail()

2003-08-01 Thread Amanda McComb
If I am using this code: mail([EMAIL PROTECTED], test, testbody); and want to add a From: line, how do I do it? Also, is this an excepted way of sending mail from a web page? Thanks, Amanda -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Search Engine

2003-08-01 Thread John W. Holmes
DvDmanDT wrote: I use to write my own search engines... That way they get customized easier... You can write one that spiders like google... Hell, it even found my private server... And there's not a single link ther afaik.. Now, is it for web or site search? If site, just get a MySQL table with

RE: [PHP] using mail()

2003-08-01 Thread Jay Blanchard
[snip] If I am using this code: mail([EMAIL PROTECTED], test, testbody); and want to add a From: line, how do I do it? Also, is this an excepted way of sending mail from a web page? [/snip] Read http://us4.php.net/manual/en/function.mail.php Example 2 (How's that Chris?) And yes, it is

Re: [PHP] Re: Search Engine

2003-08-01 Thread John W. Holmes
John W. Holmes wrote: DvDmanDT wrote: I use to write my own search engines... That way they get customized easier... You can write one that spiders like google... Hell, it even found my private server... And there's not a single link ther afaik.. Now, is it for web or site search? If site,

[PHP] Re: using mail()

2003-08-01 Thread Kevin Stone
Amanda McComb [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If I am using this code: mail([EMAIL PROTECTED], test, testbody); and want to add a From: line, how do I do it? Also, is this an excepted way of sending mail from a web page? Thanks, Amanda The mail() function has

[PHP] _GET question

2003-08-01 Thread Pushpinder Singh Garcha
Hello All, My application has a search / query feature where in the user selects the search criteria and is displayed a page containing the reults. The user must also be allowed to edit these results and save them later on. On the results page I use the following logic, // // START OF

[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: pre'; print_r( $GLOBALS ); echo '/pre'; } As it is shown above, with the 'global $GLOBALS' line commented out, the print_r() works and shows all the currently defined variables

[PHP] FDF Library Issues

2003-08-01 Thread Richard Lynch
Please Cc: me directly, if possible. Thanks! [This got long, but a search for Synopsis: (two of them) should give the gist.] Originally, the machine (Linux 2.4.19-16mdk) had Mandrake 8 RPM's of PHP 4.2.3 and Apache 1.2.26 I was able to install LIBFDFTK.SO 5.0 and the .h file, symlinked to

Re: [PHP] Globals

2003-08-01 Thread Jim Lucas
I can't speek about the first problem, but about the second one. You are not setting the variable $blah as a global variable. Try this instead $GLOBALS['blah'] = 'bob'; and that should work. You need to look into scope when refering to variables and functions. Jim Lucas - Original

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: pre'; print_r( $GLOBALS ); echo '/pre'; } As it is shown above, with the 'global $GLOBALS' line commented out, the print_r() works and shows all the currently

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: pre'; print_r( $GLOBALS ); echo '/pre'; } 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.

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

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] Globals

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

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. ?php $foo = 'Greg is wrong.'; echo $GLOBALS['GLOBALS']['GLOBALS']['GLOBALS']['foo']; ? -- The above message is encrypted with double rot13 encoding. Any

[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: ?php function blah() { var_dump($GLOBALS['GLOBALS']); } 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

RE: [PHP] _GET question

2003-08-01 Thread Chris W. Parker
Pushpinder Singh Garcha mailto:[EMAIL PROTECTED] on Friday, August 01, 2003 11:11 AM said: form name=form1 method=post action=full_profile_1.php?val=$company Use a hidden form element instead. input type=hidden name=val value=$company/ Can some one tell me if the action parameter of the

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 PROTECTED]

Re: [PHP] Re: Globals

2003-08-01 Thread Greg Beaver
Hi Jim, The code you posted is correct, I never contested that. Read carefully. ?php 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

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:

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

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. PRE ?php $a =

[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: ?php $url=$_SERVER[SCRIPT_URI]; $url_array=parse_url($url); if($url_array[scheme]!=https) { header(Location: https://$url_array[host]$url_array[path];); } ? Luis -Original Message- From: Richard Baskett [mailto:[EMAIL PROTECTED] Sent: Friday,

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 just

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: ?php function not_super() { 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

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 ?php function not_super() { $v = isset($GLOBALS['GLOBALS']);

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.

[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

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

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

[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:

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 statements

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 thats 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 don't

[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, August 01,

[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:

RE: [PHP] Test a zip file for validity

2003-08-01 Thread Chris W. Parker
Ivo Pletikosic mailto:[EMAIL PROTECTED] 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 probably

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 the

[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

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 background,

[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 URL is

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 does,

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 ?php phpinfo(); ?. So I know apache/php is working, I just don't know why it isn't working with my login script. Matt

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:

<    1   2