|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From:
Date: Sun Mar 04 2001 - 06:40:49 CST
I'm guessing that you are adding the ISAPI version of php. If so, try
installing it as a CGI instead (set the script mappings to php.exe instead
of php4isapi.dll and remove php4isapi.dll from the filters list).
Cheers
-- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org_________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42618.ezm"
Message-ID: <3AA3B0AD.AEEBA6FB
ez.no> Date: Mon, 05 Mar 2001 16:28:45 +0100 From: Paul K Egell-Johnsen <pkej
ez.no> MIME-Version: 1.0 To: Jeff <jeff4e
rochester.rr.com> CC: php-general
lists.php.net Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP] max array size question..
Jeff wrote: > > I'm trying to read in a text file that has 42620 lines. Each line has > zip code information separated by commas. I have no problem reading the > file into an array. But when I try and read each element in the array > and put it into another array I get a "500 server error". The second to > last line is what's causing the problem. > > After doing some debugging I found out that at around iteration 18000 is > when the server error occurs. Any ideas? I know I should use a > database, but i'm intrigued by this problem.
Check out if the memory usage is overrun; check if timeout occurs. (Your probgram isn't much help without the data)
-- Paul K Egell-Johnsen Developer/PR Manager eZ systems as http://ez.no/
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42619.ezm"
From: "kaab kaoutar" <kaab_k
hotmail.com> To: php-general
lists.php.net Date: Mon, 05 Mar 2001 15:27:39 -0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: <F16464hc3DzXDMBxY2E0000aae9
hotmail.com> Subject: delete an element from an array
Hi! how can i decrement the length of an array! In fact i'm trying to delete an element from an array , i'v put the content of i in i-1 (loop) and i tried to decrement the array legnththis way: count($x)=count($x)-1; but it generates an error!
Thanks
_________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42621.ezm"
Date: Mon, 5 Mar 2001 10:43:34 -0500 From: Hardy Merrill <merrill
missioncriticallinux.com> To: kaab kaoutar <kaab_k
hotmail.com> Cc: php-general
lists.php.net Message-ID: <20010305104333.B5918
merrill.lowell.mclinux.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [PHP] delete an element from an array
I'm not sure what you mean - are you trying to remove an element from the array while you are *inside* a loop that is iterating through that same array? If the loop is small enough, copy it in so we can all see what you are trying to do.
kaab kaoutar [kaab_k
hotmail.com] wrote: > Hi! > how can i decrement the length of an array! > In fact i'm trying to delete an element from an array , i'v put the content > of i in i-1 (loop) and i tried to decrement the array legnththis way: > count($x)=count($x)-1; > but it generates an error! > > Thanks > > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > For additional commands, e-mail: php-general-help
lists.php.net > To contact the list administrators, e-mail: php-list-admin
lists.php.net
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42622.ezm"
From: "kaab kaoutar" <kaab_k
hotmail.com> To: merrill
missioncriticallinux.com Cc: php-general
lists.php.net Date: Mon, 05 Mar 2001 15:51:04 -0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: <F247TP0Jd0mAthEhXV6000060c9
hotmail.com> Subject: Re: [PHP] delete an element from an array
Hi! FIRST OF ALL THANKS ! well do u mean that the only way to remove an elemnt from an array is to copy it into another array? it does not suit me cause the array is a session variable and i need to update it !
Thanks _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42623.ezm"
Date: Mon, 5 Mar 2001 10:57:49 -0500 From: Hardy Merrill <merrill
missioncriticallinux.com> To: kaab kaoutar <kaab_k
hotmail.com> Cc: php-general
lists.php.net Message-ID: <20010305105749.D5918
merrill.lowell.mclinux.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [PHP] delete an element from an array
Have a look at
http://www.php.net/manual/en/function.unset.php
"unset" may do what you want.
HTH.
-- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.com
kaab kaoutar [kaab_k
hotmail.com] wrote: > > Hi! > FIRST OF ALL THANKS ! > well do u mean that the only way to remove an elemnt from an array is to > copy it into another array? it does not suit me cause the array is a session > variable and i need to update it ! > > Thanks > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > For additional commands, e-mail: php-general-help
lists.php.net > To contact the list administrators, e-mail: php-list-admin
lists.php.net
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42625.ezm"
From: "kaab kaoutar" <kaab_k
hotmail.com> To: merrill
missioncriticallinux.com Cc: php-general
lists.php.net Date: Mon, 05 Mar 2001 16:11:29 -0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: <F89Edyt3cew8k69RKLp000061e9
hotmail.com> Subject: Re: [PHP] delete an element from an array
Thanks! but i know this function! i can't do that cause my varibale is multidimenssional, and i don't want to update all that ! for one element ! we can't decrement the length of the array ?! no way ?
>From: Hardy Merrill <merrill
missioncriticallinux.com> >To: kaab kaoutar <kaab_k
hotmail.com> >CC: php-general
lists.php.net >Subject: Re: [PHP] delete an element from an array >Date: Mon, 5 Mar 2001 10:57:49 -0500 > >Have a look at > > http://www.php.net/manual/en/function.unset.php > >"unset" may do what you want. > >HTH. > >-- >Hardy Merrill >Mission Critical Linux, Inc. >http://www.missioncriticallinux.com > >kaab kaoutar [kaab_k
hotmail.com] wrote: > > > > Hi! > > FIRST OF ALL THANKS ! > > well do u mean that the only way to remove an elemnt from an array is to > > copy it into another array? it does not suit me cause the array is a >session > > variable and i need to update it ! > > > > Thanks > > >_________________________________________________________________________ > > Get Your Private, Free E-mail from MSN Hotmail at >http://www.hotmail.com. > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > > For additional commands, e-mail: php-general-help
lists.php.net > > To contact the list administrators, e-mail: php-list-admin
lists.php.net > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net >For additional commands, e-mail: php-general-help
lists.php.net >To contact the list administrators, e-mail: php-list-admin
lists.php.net >
_________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42630.ezm"
Date: Mon, 5 Mar 2001 11:36:35 -0500 From: Hardy Merrill <merrill
missioncriticallinux.com> To: kaab kaoutar <kaab_k
hotmail.com> Cc: php-general
lists.php.net Message-ID: <20010305113635.E5918
merrill.lowell.mclinux.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [PHP] delete an element from an array
kaab kaoutar [kaab_k
hotmail.com] wrote: > Thanks! but i know this function! > i can't do that cause my varibale is multidimenssional, and i don't want to > update all that ! for one element ! > we can't decrement the length of the array ?! no way ?
Here's an example of a multidimensional array - I "unset" one of the values in the middle - I don't know why this won't work for you:
<? $arr1 = array("a" => array('1' => "a111", '2' => "a222", '3' => "a333"), "b" => array('1' => "b111", '2' => "b222", '3' => "b333"), "c" => array('1' => "c111", '2' => "c222", '3' => "c333")); foreach ($arr1 as $key1 => $value1) { echo "<br>"; echo "key=[$key1], value=[$value1]<br>"; foreach ($value1 as $key2 => $value2) { echo " key2=[$key2], value2=[$value2]<br>"; } } unset($arr1["b"]["2"]); echo "<br><br>Unset b2 now<br><br>"; foreach ($arr1 as $key1 => $value1) { echo "<br>"; echo "key=[$key1], value=[$value1]<br>"; foreach ($value1 as $key2 => $value2) { echo " key2=[$key2], value2=[$value2]<br>"; } } ?>
Here's the output displayed on the browser: -------------------------------------------
key=[a], value=[Array] key2=[1], value2=[a111] key2=[2], value2=[a222] key2=[3], value2=[a333]
key=[b], value=[Array] key2=[1], value2=[b111] key2=[2], value2=[b222] key2=[3], value2=[b333]
key=[c], value=[Array] key2=[1], value2=[c111] key2=[2], value2=[c222] key2=[3], value2=[c333]
Unset b2 now
key=[a], value=[Array] key2=[1], value2=[a111] key2=[2], value2=[a222] key2=[3], value2=[a333]
key=[b], value=[Array] key2=[1], value2=[b111] key2=[3], value2=[b333]
key=[c], value=[Array] key2=[1], value2=[c111] key2=[2], value2=[c222] key2=[3], value2=[c333]
> > > > >From: Hardy Merrill <merrill
missioncriticallinux.com> > >To: kaab kaoutar <kaab_k
hotmail.com> > >CC: php-general
lists.php.net > >Subject: Re: [PHP] delete an element from an array > >Date: Mon, 5 Mar 2001 10:57:49 -0500 > > > >Have a look at > > > > http://www.php.net/manual/en/function.unset.php > > > >"unset" may do what you want. > > > >HTH. > > > >-- > >Hardy Merrill > >Mission Critical Linux, Inc. > >http://www.missioncriticallinux.com > > > >kaab kaoutar [kaab_k
hotmail.com] wrote: > > > > > > Hi! > > > FIRST OF ALL THANKS ! > > > well do u mean that the only way to remove an elemnt from an array is to > > > copy it into another array? it does not suit me cause the array is a > >session > > > variable and i need to update it ! > > > > > > Thanks > > > > >_________________________________________________________________________ > > > Get Your Private, Free E-mail from MSN Hotmail at > >http://www.hotmail.com. > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > > > For additional commands, e-mail: php-general-help
lists.php.net > > > To contact the list administrators, e-mail: php-list-admin
lists.php.net > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > >For additional commands, e-mail: php-general-help
lists.php.net > >To contact the list administrators, e-mail: php-list-admin
lists.php.net > > > > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > For additional commands, e-mail: php-general-help
lists.php.net > To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.com
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42641.ezm"
Message-ID: <20010305173751.97778.qmail
web10604.mail.yahoo.com> Date: Mon, 5 Mar 2001 09:37:51 -0800 (PST) From: Christian Cresante <cresantec
yahoo.com> To: php <php-general
lists.php.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [PHP] delete an element from an array
Since its the last element, just pop it out: array_pop()
--- kaab kaoutar <kaab_k
hotmail.com> wrote: > Hi! > how can i decrement the length of an array! > In fact i'm trying to delete an element from an > array , i'v put the content > of i in i-1 (loop) and i tried to decrement the > array legnththis way: > count($x)=count($x)-1; > but it generates an error! > > Thanks > > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at > http://www.hotmail.com. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-general-unsubscribe
lists.php.net > For additional commands, e-mail: > php-general-help
lists.php.net > To contact the list administrators, e-mail: > php-list-admin
lists.php.net >
__________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42620.ezm"
From: "kaab kaoutar" <kaab_k
hotmail.com> To: php-general
lists.php.net Date: Mon, 05 Mar 2001 15:30:51 -0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: <F146B24pWW03tKhBm8x00006031
hotmail.com> Subject: input textfield value cat!
Hi! i'm storing values in session variables, when i get a value wich is a sequence of words seperated by space, it echoes successfully but when i try to initialize the value of an input textfield with it i got only the first word! i tried to encode decode but no way ! Thanks _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42628.ezm"
From: "kaab kaoutar" <kaab_k
hotmail.com> To: bjackson
McLeodUSA.com Cc: php-general
lists.php.net Date: Mon, 05 Mar 2001 16:29:47 -0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: <F11VXLuSbh29cM3oryK00020685
hotmail.com> Subject: Re: [PHP] input textfield value cat!
I'm using a variable! <input type="text" name="MyTextInput" value=<?=$val ?>>
>From: "Brad S. Jackson" <bjackson
McLeodUSA.com> >To: "kaab kaoutar" <kaab_k
hotmail.com> >Subject: Re: [PHP] input textfield value cat! >Date: Mon, 5 Mar 2001 10:08:21 -0600 > > > >Make sure you have quotes around the value. > ><input type="text" name="MyTextInput" value="MyValue"> > > >Hi! >i'm storing values in session variables, when i get a value wich is a >sequence of words seperated by space, it echoes successfully but when i try >to initialize the value of an input textfield with it i got only the >first >word! i tried to encode decode but no way ! >Thanks > >
_________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42633.ezm"
Content-Type: text/plain; charset="iso-8859-1" From: Christian Reiniger <creinig
mayn.de> Reply-To: creinig
mayn.de To: php-general
lists.php.net Date: Mon, 5 Mar 2001 18:07:45 +0100 MIME-Version: 1.0 Message-Id: <01030518074500.00839
chrisbig> Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP] input textfield value cat!
On Monday 05 March 2001 17:29, you wrote: > I'm using a variable! > <input type=3D"text" name=3D"MyTextInput" value=3D<?=3D$val ?>>
Well, you *still* need to have quotes around it:
<input type=3D"text" name=3D"MyTextInput" value=3D"<?=3D$val ?>">
> >Make sure you have quotes around the value. > > > ><input type=3D"text" name=3D"MyTextInput" value=3D"MyValue">
--=20 Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/)
=2E..to paraphrase Churchill, while representative democracy may be terrible, it's still the best system that large corporations can buy.
- David Weinberger JOHO January 25, 2000
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42635.ezm"
Date: Mon, 5 Mar 2001 18:10:39 +0100 (CET) From: Batonik <weirdo
poczta.onet.pl> To: kaab kaoutar <kaab_k
hotmail.com> Cc: <bjackson
McLeodUSA.com>, <php-general
lists.php.net> Message-ID: <Pine.LNX.4.30.0103051809130.12603-100000
kasia.asi.pwr.wroc.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP] input textfield value cat!
On Mon, 5 Mar 2001, kaab kaoutar wrote:
> I'm using a variable! > <input type="text" name="MyTextInput" value=<?=$val ?>>
Quote the value: <input type="text" name="MyTextInput" value=\"<?=$val ?>\">
Greets, Batonik
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42624.ezm"
From: Website4S
aol.com Message-ID: <32.1170643c.27d512ea
aol.com> Date: Mon, 5 Mar 2001 11:03:54 EST To: php-general
lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Match Records
I`m trying to find the best method to match records between two tables in a MySQL database. But it must match atleast once, so here is a scenario for you to think about.
Member - Job, Salary, Location Jobs - Job, Salary, Location
All values will be enum sets in both tables as follows
Job = enum 'developer','designer','none' Salary = enum '10K','15K','none' Location = enum 'usa','uk','none'
Ok so the user has come to the site and I have his Job Salary and Location stored, he clicks a link which then performs the search. His values are as follows..
Job = developer, Salary = 10K, Location = uk
I want to search the Jobs table and match it with the above, this part I can do. The next stage is if it doesn`t find any matches it then finds the nearest. So if the only record I have in the Jobs table is as follows
Job = developer, Salary = none, Location = uk
How do I go about making it pick up the nearest.
At the moment I am using
SELECT * FROM Jobs where Job='$Job' and Salary='$Salary' and Location='$Location'
So obviously it won`t match them, anyone wake me up from my slumber and help me out with this?
Cheers Ade
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42626.ezm"
Message-Id: <5.0.2.1.0.20010305101209.00a8eb30
www.carttest.com> Date: Mon, 05 Mar 2001 10:13:08 -0600 To: php-general
lists.php.net From: Chris <chris
ooc2000.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: MySQL - Problem with multiple INSERTs?
Howdy,
I'm getting weird problems trying to INSERT to two different tables, in consecutive mysql_queries. Before, I had 3 queries going, and only 2 would work at any time. It seemed like it was 'rotating' the bad query - first the 1st query would fail (the other two were fine), then I'd empty all my tables and refresh, and this time the 2nd query was the problem, and if I did it again the 3rd was. All queries worked fine in phpMyAdmin, both individually and when executed en masse.
I've boiled it down to just two queries that don't work. I've included everything below (including table schemata), to enable reproduction. It seems like a bug to me - the question is, is the bug in PHP, MySQL, or my brain?
This is driving me CRAZY!!!!!!!!!!!! - Chris
mysql_connect("localhost", "myusername", "mypassword"); mysql_db_query("DocCountry", "INSERT INTO projects (idCreator, name, comment) VALUES (1, 'sysmsg9.txt', 'Some file')"); mysql_db_query("DocCountry", "INSERT INTO files (idProject, name, comment) VALUES (1, 'sysmsg9.txt', 'Some file')");
CREATE TABLE projects ( id int(11) NOT NULL auto_increment, timestamp timestamp(14), idCreator int(11) DEFAULT '0' NOT NULL, name varchar(80) NOT NULL, comment text NOT NULL, authLevel varchar(32) NOT NULL, PRIMARY KEY (id) );
CREATE TABLE files ( id tinyint(4) NOT NULL auto_increment, idProject tinyint(4) DEFAULT '0' NOT NULL, name tinyint(4) DEFAULT '0' NOT NULL, comment text NOT NULL, PRIMARY KEY (id) );
(P.S. I've tried things like using SET syntax, using mysql_query instead of mysql_db_query, etc. Nothing helps.)
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42627.ezm"
To: php-general
lists.php.net From: chris
improbable.org (Chris Adams) Date: Sat, 3 Mar 2001 18:48:39 -0800 Message-ID: <slrn9a3b87.cl.chris
gigante.improbable.org> Subject: Re: [PHP] stumped on mailing a complete page
On 3 Mar 2001 17:17:15 -0800, Brett <brett
jnewman.net> wrote: >I want to send a confirmation email upon receiving an order, and would like >to send the page that I display on the browser to the user.
ob_start();
// do something
mail('confirm
somewhere', 'confirmation', ob_get_contents()); ob_end_flush();
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42629.ezm"
To: php-general
lists.php.net From: chris
improbable.org (Chris Adams) Date: Mon, 5 Mar 2001 08:23:52 -0800 Message-ID: <slrn9a7fcn.cl.chris
gigante.improbable.org> Subject: Re: [PHP] NETSCAPE Screws QUERY STRING!!!!!!
On 4 Mar 2001 04:17:18 -0800, Thomas Edison Jr. <thomasedisonjr
yahoo.com> wrote: >The Internet Explorer converts the spaces in a query >string into it's hexadecimal value of "%20" >automatically, but netscape is not doing so. It's not >reading the space and thus not displaying the page at >all and giving the HTTP error 400.
Use urlencode() or rawurlencode() when generating those URLs. The standards don't allow raw spaces in a URL string, so you'll need to encode your data when generating a link to work with browsers other than IE.
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42631.ezm"
Message-ID: <006301c0a593$6ec16ec0$144cced0
shreve.net> From: "Kansas Territory" <kansast
mac.com> To: "php" <php-general
lists.php.net> Date: Mon, 5 Mar 2001 10:43:40 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: passing variable via url
using PHP 3.x on Linux, I've always been able to pass along a variable like http://www.domain.com/index.php3?foo=bar
and then I could print out this with something like echo $foo; would print out "bar"
I've recently installed the latest PHP4 onto a Windows2000 server, I'm trying the same thing here, a simple test, and echo $foo;
gives me nothing
however including a PHPINFO() on the page displays this: HTTP_GET_VARS["foo"] bar
I'm I missing something here ?
Kevin
-------------------------------------------------------------------- Kevin Heflin | ShreveNet, Inc. | Ph:318.222.2638 x103 VP/Production | 333 Texas St #175 | FAX:318.221.6612 kheflin
shreve.net | Shreveport, LA 71101 | http://www.shreve.net --------------------------------------------------------------------
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42634.ezm"
Content-Type: text/plain; charset="iso-8859-1" From: Christian Reiniger <creinig
mayn.de> Reply-To: creinig
mayn.de To: "php" <php-general
lists.php.net> Date: Mon, 5 Mar 2001 18:08:26 +0100 MIME-Version: 1.0 Message-Id: <01030518082601.00839
chrisbig> Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP] passing variable via url
On Monday 05 March 2001 17:43, you wrote:
> using PHP 3.x on Linux, I've always been able to pass along a variable > like http://www.domain.com/index.php3?foo=3Dbar > > and then I could print out this with something like > echo $foo; > would print out "bar" > > I've recently installed the latest PHP4 onto a Windows2000 server, I'm > trying the same thing here, a simple test, and > echo $foo; > > gives me nothing > > however including a PHPINFO() on the page displays this: > HTTP_GET_VARS["foo"] bar > > I'm I missing something here ?
Check whether register_globals is set to "on"
--=20 Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/)
=2E..to paraphrase Churchill, while representative democracy may be terrible, it's still the best system that large corporations can buy.
- David Weinberger JOHO January 25, 2000
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42632.ezm"
Message-Id: <4.3.1.20010305102947.00ae14e0
pop3.rconnect.com> Date: Mon, 05 Mar 2001 10:56:05 -0600 To: Ken <kenzo
free-music.com>, "Michael A. Peters" <mpeters
abriasoft.com> From: John Henckel <henckel
rconnect.com> Cc: Don Read <dread
texas.net>, php-general
lists.php.net, php-windows
lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-WIN] Re: IE 5.5,authentication,PHP sessions: IE never stops
At 09:51 PM 3/4/01 -0500, Ken wrote:
>Anyway, can someone please test to see if this doesn't happen in IE5.0? > >I really hate this situation, yessir.
I have installed IE 5.00.2614.3500 (that's what came with Win 98 2nd edition CDROM vers 4.10.2222A) and it does NOT have the problem you have described.
However, it has another bug that is almost as good. Make this page called mytest.php (I am using Xitami on localhost for the server)
<?php if(!isset($PHP_AUTH_USER)) { Header("WWW-Authenticate: Basic realm=\"My Realm\""); Header("HTTP/1.0 401 Unauthorized"); echo "Sorry you are not authorized\n"; exit; } else { echo "Hello $PHP_AUTH_USER.<P>"; echo "You entered $PHP_AUTH_PW as your password.<P>"; } ?>
These are the steps I did.
1. open mytest.php and when the password prompt appears, I enter a userid/password. 2. I see the "Hello" page with my userid and password. 3. close IE and reopen mytest.php, again the prompt appears -- this is good. 4. close IE and Restart Windows. 5. open mytest.php and when the password prompt appears, I hit CANCEL. 6. the message "Sorry you are not authorized" appears 7. in the address box I type www.google.com and wait for it to appear 8. I press the BACK button and guess what I see? I see the "Hello" page with my userid and password from step 2 !!!!!!!!!!!!!! apparently the page is retrieved from the browser cache.
John Henckel alt. mailto:henckel
iname.com Zumbro Falls, Minnesota, USA (507) 753-2216
http://geocities.com/jdhenckel/
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42652.ezm"
Date: Mon, 5 Mar 2001 14:39:22 -0500 (EST) From: Chris Poirier <cpoirier
shelluser.net> To: Ken <kenzo
free-music.com> cc: John Henckel <henckel
rconnect.com>, "Michael A. Peters" <mpeters
abriasoft.com>, Don Read <dread
texas.net>, <php-general
lists.php.net>, <php-windows
lists.php.net> Message-ID: <Pine.LNX.4.30.0103051437190.26219-100000
shelluser.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-WIN] Re: IE 5.5,authentication,PHP sessions: IE never stops
Hi Ken,
> At 10:56 AM 3/5/01 -0600, John Henckel wrote: > >1. open mytest.php and when the password prompt appears, I enter a userid/password. > >2. I see the "Hello" page with my userid and password. > >3. close IE and reopen mytest.php, again the prompt appears -- this is good. > >4. close IE and Restart Windows. > >5. open mytest.php and when the password prompt appears, I hit CANCEL. > >6. the message "Sorry you are not authorized" appears > >7. in the address box I type www.google.com and wait for it to appear > >8. I press the BACK button and guess what I see? I see the "Hello" page with my userid and password from step 2 !!!!!!!!!!!!!! apparently the page is retrieved from the browser cache. > > This is exactly one of the things I was complaining about: It is NOT a browser cache issue - it still remembers your username and password, and will continue to send it with page requests. This happens when you hit "cancel" on the new password prompt. You'd think it would forget the username and password at this point, but it doesn't. You have to clear the password field and hit OK. Crazy, huh? > > - Ken
There is a suggestion in the PHP online documentation that has worked for me (except in Opera 5, which seems to ignore the Realm). Add a timestamp to the Realm that changes with each new session. IE 5.0 will prompt for a different password, because it sees it as a different login.
Later, Chris.
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42636.ezm"
To: php-general
lists.php.net From: "Chris Lee" <lee
mediawaveonline.com> Date: Mon, 5 Mar 2001 09:14:20 -0600 Message-ID: <980h9p$3f7$1
toye.p.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: base64 Subject: imap problems.
b2ssIGhlcmUgd2UgZ28uIGltYXAgZnVuY3Rpb25zIHNlZW0gdG9iZSBmdW5ueS4gSSBjb3VsZCBu b3QgZ2V0IHBocCB0byBjb21waWxlIHdpdGggdGhlIGxhdGVzdCBpbWFwLCBJIHdhcyBnZXR0aW5n IGVycm9ycyBhYm91dCB4bWwsIGdvIGZpZ3VyZS4gYW5kIA0KDQpjb3VsZCBub3Qgbm90IGxpa2Ug bGliL3llcw0KDQpnbyBmaWd1cmUuDQoNCkkgZG93bmxvYWRlZCBwaHAgNC4wLjVkZXYgYWxsIGNv bXBpbGVkIHdlbGwsIGJ1dCBJIGdldCBzdHJhbmdlIHRoaW5ncyBoYXBwZW5pbmcsIGxpa2UgaW1h cCBmdW5jdGlvbnMgZG8gbm90IHJldHVybiBlcnJvcnMgdGhleSBqdXN0IHRpbWVvdXQuIHNvbWUg ZnVuY3Rpb25zIGp1c3QgZG9udCB3b3JrLCBvbmx5IHRpbWVvdXQgYW5kIGNhdXNlIHNlZ2ZhdWx0 cywgSSBjYW50IHRlbGwgaWYgdGhlcmUgYXJlIGVycm9ycyBvciBub3QgYmVjYXVzZSBvZiB0aGlz Lg0KDQogICBmb3JlYWNoKCR0aGlzLT5tYWlsX2hlYWRlcnMgYXMgJHBvcyA9PiAkdmFsKQ0KICAg ICR0aGlzLT5tYWlsX2JvZHlbJHBvc10gPSBpbWFwX2JvZHkoJHRoaXMtPm1haWxfc3RyZWFtLCAk cG9zKTsNCg0Kd2hlcmUgbWFpbF9oZWFkZXJzIGlzIGFuIGFycmF5IHdpdGggYWxsIHRoZSBoZWFk ZXJzIHBvcyBhbmQgdGhlaXIgdmFsdWUuIHRoaXMgY2F1c2VzIHNlZ2ZhdWx0cy4NCg0KYW55IGlk ZWEncz8gSSB3b3VsZCBwcmVmIG5vdCB0byB1c2UgdGhlIGRldiB2ZXJzaW9uIG9mIHBocD8gSSBh bHNvIG5vdGljZWQgb24gZnRwOi8vZnRwLmNhYy53YXNoaW5ndG9uLmVkdS9pbWFwLyB0aGF0IHRo ZSBuZXdlc3QgaW1hcCBpcyBiZXRhLCBhbnl0aGluZyBzdGFibGUgb3V0IHRoZXJlPw0KDQoNCi0t IA0KDQogQ2hyaXMgTGVlDQogTWVkaWF3YXZlb25saW5lLmNvbQ0KDQogcGguIDI1MC4zNzcuMTA5 NQ0KIHBoLiAyNTAuMzc2LjI2OTANCiBmeC4gMjUwLjU1NC4xMTIwDQoNCiBsZWVAbWVkaWF3YXZl b25saW5lLmNvbQ0KDQo=
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42637.ezm"
Message-Id: <6.05541896820068.63.8878438472748
1.00010075746579> Date: Mon, 05 Mar 2001 12:22:37 -0500 To: John Henckel <henckel
rconnect.com> From: Ken <kenzo
free-music.com> Cc: "Michael A. Peters" <mpeters
abriasoft.com>, Don Read <dread
texas.net>, php-general
lists.php.net, php-windows
lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: Re: IE 5.5,authentication,PHP sessions: IE never stops
At 10:56 AM 3/5/01 -0600, John Henckel wrote: >1. open mytest.php and when the password prompt appears, I enter a userid/password. >2. I see the "Hello" page with my userid and password. >3. close IE and reopen mytest.php, again the prompt appears -- this is good. >4. close IE and Restart Windows. >5. open mytest.php and when the password prompt appears, I hit CANCEL. >6. the message "Sorry you are not authorized" appears >7. in the address box I type www.google.com and wait for it to appear >8. I press the BACK button and guess what I see? I see the "Hello" page with my userid and password from step 2 !!!!!!!!!!!!!! apparently the page is retrieved from the browser cache.
This is exactly one of the things I was complaining about: It is NOT a browser cache issue - it still remembers your username and password, and will continue to send it with page requests. This happens when you hit "cancel" on the new password prompt. You'd think it would forget the username and password at this point, but it doesn't. You have to clear the password field and hit OK. Crazy, huh?
- Ken
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42673.ezm"
Message-Id: <5.28680408000946.48.8189973831177
1.00012085388975> Date: Mon, 05 Mar 2001 16:16:16 -0500 To: Chris Poirier <cpoirier
shelluser.net> From: Ken <kenzo
free-music.com> Cc: John Henckel <henckel
rconnect.com>, "Michael A. Peters" <mpeters
abriasoft.com>, Don Read <dread
texas.net>, <php-general
lists.php.net>, <php-windows
lists.php.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: Re: IE 5.5,authentication,PHP sessions: IE never stops
At 02:39 PM 3/5/01 -0500, Chris Poirier wrote: >There is a suggestion in the PHP online documentation that has worked for >me (except in Opera 5, which seems to ignore the Realm). Add a timestamp >to the Realm that changes with each new session. IE 5.0 will prompt for a >different password, because it sees it as a different login.
This is, in fact, what my system attempts to do. The catch is that I CAN'T change the realm with a new session...because I don't GET a new session, because IE 5.5 is not starting a new session when it should!
Indeed, when I change the realm, I get the prompt. But I can't tell when the user closed his browser and started a new one, because IE 5.5 (on the machines I'm testing on) is still keeping the old session, acting like the browser never closed.
Again, my system works perfectly on the other browsers I've tried. It changes the realm when appropriate. It sets a flag in the database when the user hits logout. And it works the way it should. Just in IE 5.5 (on the machines I'm testing on) do I get this horrible behavior.
- Ken
>Later, Chris.
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42638.ezm"
To: php-general
lists.php.net From: "Tobias Talltorp" <tobias
talltorp.com> Date: Mon, 5 Mar 2001 18:30:00 +0100 Message-ID: <980i0o$c2h$1
toye.p.sourceforge.net> Subject: Verify session in function
I am building my first basic function to verify a session. If the verification is not in the function it works... What am I missing? (I couldnīt find anything about this in the mailing list archive)
-- This works ------> session_start();
if (isset($PHPSESSID)){ echo "ok"; } else
echo "not ok"; }
-- This does not work -----> session_start(); verifySess();
function verifySess() { if (isset($PHPSESSID)){ echo "ok"; } else
echo "not ok"; } }
Thanks, // Tobias
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42643.ezm"
From: "kaab kaoutar" <kaab_k
hotmail.com> To: tobias
talltorp.com Cc: php-general
lists.php.net Date: Mon, 05 Mar 2001 17:43:54 -0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: <F204PWooOVpIciFUldc00019f6d
hotmail.com> Subject: Re: [PHP] Verify session in function
U just have to add global $PHPSESSID to make the session variable global;
>From: "Tobias Talltorp" <tobias
talltorp.com> >To: php-general
lists.php.net >Subject: [PHP] Verify session in function >Date: Mon, 5 Mar 2001 18:30:00 +0100 > >I am building my first basic function to verify a session. >If the verification is not in the function it works... >What am I missing? >(I couldnīt find anything about this in the mailing list archive) > >-- This works ------> >session_start(); > > if (isset($PHPSESSID)){ > echo "ok"; > } else > > echo "not ok"; > } > > >-- This does not work -----> >session_start(); >verifySess(); > >function verifySess() { > if (isset($PHPSESSID)){ > echo "ok"; > } else > > echo "not ok"; > } > } > >Thanks, >// Tobias > > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net >For additional commands, e-mail: php-general-help
lists.php.net >To contact the list administrators, e-mail: php-list-admin
lists.php.net >
_________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42639.ezm"
From: "Brandon Orther" <brandon
webintellects.com> To: "PHP User Group" <php-general
lists.php.net> Date: Mon, 5 Mar 2001 09:35:54 -0800 Message-ID: <CKEMJEADMOCEHPHJKLPAKEEMCJAA.brandon
webintellects.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: Start you php script over??
Hello,
Is there a way for me to tell my php script to start over? I want to have an if then statement to check if something is done. Then if it isn't I want the php script to start over.
Thank you,
-------------------------------------------- Brandon Orther WebIntellects Design/Development Manager brandon
webintellects.com 800-994-6364 www.webintellects.com --------------------------------------------
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42642.ezm"
Message-ID: <4040BBE81A9AD411BD27009027887A7C042AEF
tiger.wild.net> From: "Boget, Chris" <Chris.Boget
wild.net> To: "'Brandon Orther'" <brandon
webintellects.com>, PHP User Group <php-general
lists.php.net> Date: Mon, 5 Mar 2001 11:42:45 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C0A59B.B44D2A26" Subject: RE: [PHP] Start you php script over??
------_=_NextPart_001_01C0A59B.B44D2A26 Content-Type: text/plain; charset="iso-8859-1"
> Is there a way for me to tell my php script to start over? I > want to have an if then statement to check if something is > done. Then if it isn't I want the php script to start over.
header( "location: $PHP_SELF" );
OR
header( "location: $REQUEST_URI" );
if you are using a query string/GET variables
Chris
------_=_NextPart_001_01C0A59B.B44D2A26--
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42644.ezm"
To: php-general
lists.php.net From: "Chris Lee" <lee
mediawaveonline.com> Date: Mon, 5 Mar 2001 09:44:53 -0600 Message-ID: <980j32$sg8$1
toye.p.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: base64 Subject: Re: [PHP] Start you php script over??
aGVhZGVyKCkNCg0KPD9waHANCg0KICAgIGlmICgkZG9uZSkNCiAgICAgICAgLi4uDQogICAgZWxz ZQ0KICAgIHsNCiAgICAgICAgaGVhZGVyKCJMb2NhdGlvbjogaHR0cDovLyRTRVJWRVJfTkFNRS8k UEhQX1NFTEYiKTsNCiAgICAgICAgZXhpdCgpOw0KICAgIH0NCg0KPz4NCg0KaSB5b3VyIHVzaW5n IHNlc3Npb25zIHdpdGhvdXQgY29vb2tpZXMuDQoNCiAgICAgICAgaGVhZGVyKCJMb2NhdGlvbjog aHR0cDovLyRTRVJWRVJfTkFNRS8kUEhQX1NFTEY/UEhQU0VTU0lEPSRQSFBTRVNTSUQiKTsNCg0K DQotLSANCg0KIENocmlzIExlZQ0KIE1lZGlhd2F2ZW9ubGluZS5jb20NCg0KIHBoLiAyNTAuMzc3 LjEwOTUNCiBwaC4gMjUwLjM3Ni4yNjkwDQogZnguIDI1MC41NTQuMTEyMA0KDQogbGVlQG1lZGlh d2F2ZW9ubGluZS5jb20NCg0KDQoiIkJyYW5kb24gT3J0aGVyIiIgPGJyYW5kb25Ad2ViaW50ZWxs ZWN0cy5jb20+IHdyb3RlIGluIG1lc3NhZ2UgbmV3czpDS0VNSkVBRE1PQ0VIUEhKS0xQQUtFRU1D SkFBLmJyYW5kb25Ad2ViaW50ZWxsZWN0cy5jb20uLi4NCkhlbGxvLA0KDQpJcyB0aGVyZSBhIHdh eSBmb3IgbWUgdG8gdGVsbCBteSBwaHAgc2NyaXB0IHRvIHN0YXJ0IG92ZXI/ICBJIHdhbnQgdG8g aGF2ZQ0KYW4gaWYgdGhlbiBzdGF0ZW1lbnQgdG8gY2hlY2sgaWYgc29tZXRoaW5nIGlzIGRvbmUu IFRoZW4gaWYgaXQgaXNuJ3QgSSB3YW50DQp0aGUgcGhwIHNjcmlwdCB0byBzdGFydCBvdmVyLg0K DQpUaGFuayB5b3UsDQoNCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tDQpCcmFuZG9uIE9ydGhlcg0KV2ViSW50ZWxsZWN0cyBEZXNpZ24vRGV2ZWxvcG1lbnQgTWFu YWdlcg0KYnJhbmRvbkB3ZWJpbnRlbGxlY3RzLmNvbQ0KODAwLTk5NC02MzY0DQp3d3cud2ViaW50 ZWxsZWN0cy5jb20NCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t DQoNCg0KLS0gDQpQSFAgR2VuZXJhbCBNYWlsaW5nIExpc3QgKGh0dHA6Ly93d3cucGhwLm5ldC8p DQpUbyB1bnN1YnNjcmliZSwgZS1tYWlsOiBwaHAtZ2VuZXJhbC11bnN1YnNjcmliZUBsaXN0cy5w aHAubmV0DQpGb3IgYWRkaXRpb25hbCBjb21tYW5kcywgZS1tYWlsOiBwaHAtZ2VuZXJhbC1oZWxw QGxpc3RzLnBocC5uZXQNClRvIGNvbnRhY3QgdGhlIGxpc3QgYWRtaW5pc3RyYXRvcnMsIGUtbWFp bDogcGhwLWxpc3QtYWRtaW5AbGlzdHMucGhwLm5ldA0KDQo=
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42640.ezm"
Message-Id: <200103051733.JAA03971
mail.abriasoft.com> Date: Mon, 5 Mar 2001 09:33:36 -0800 Reply-To: mpeters
abriasoft.com Content-Type: text/plain; charset=us-ascii From: "Michael A. Peters" <mpeters
abriasoft.com> To: Php-General <php-general
lists.php.net> Mime-Version: 1.0 (Apple Message framework v337) Content-Transfer-Encoding: quoted-printable Subject: Supress error message to apache log?
I have the following php function-
function doclink ($documentdir, $rpmname, $doc_file) { $string=3D"rpm -qd $rpmname |head -1 |sed = s?\"$documentdir\"?\"\"? |cut -d\"/\" -f2"; $rpm_installed=3Dexec($string); $DOC_ABSOLUTE=3D"$documentdir/$rpm_installed"; if (file_exists("$DOC_ABSOLUTE/$doc_file")) { if (is_link("$rpmname")) { unlink("$rpmname"); } symlink("$DOC_ABSOLUTE", "$rpmname"); return "$rpmname/$doc_file"; } else { return "failed"; } }
later its used when creating a page of documentation links for the user, = like this-
$mysqldoc=3Ddoclink($docdir, "MySQL", "manual_toc.html"); if (strstr($mysqldoc,"failed")) { echo "<!-- could not locate MySQL documentation -->\n"; } else { echo "<P><font face=3D$font color=3D$color size=3D$size><A = href=3D\"$mysqldoc\">MySQL Documentation</A></font>\n"; }
Works beautifully, problem is- if the rpm isn't installed that's = querried in the doclink function, the error message rpm puts out is sent = to the apache error.log. I don't want that.
Is there a way to supress the error message for that exec call?
Thanks -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Michael A. Peters Abriasoft Senior Developer
(510) 623-9726x357 Fax: (510) 249-9125=
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42645.ezm"
Message-Id: <200103051751.JAA04067
mail.abriasoft.com> Date: Mon, 5 Mar 2001 09:51:23 -0800 From: "Michael A. Peters" <mpeters
abriasoft.com> Reply-To: mpeters
abriasoft.com Content-Type: text/plain; charset=us-ascii Cc: Php-General <php-general
lists.php.net> To: mpeters
abriasoft.com Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v337) Subject: Re: [PHP] Supress error message to apache log?
I feel dumb...
$string=3D"rpm -qd $rpmname 2>/dev/null |head -1 |sed = s?\"$documentdir\"?\"\"? |cut -d\"/\" -f2";
On Monday, March 5, 2001, at 09:33 AM, Michael A. Peters wrote:
> I have the following php function-=20 > =20 > function doclink ($documentdir, $rpmname, $doc_file) {=20 > $string=3D"rpm -qd $rpmname |head -1 |sed = s?\"$documentdir\"?\"\"? |cut -d\"/\" -f2";=20 > $rpm_installed=3Dexec($string);=20 > $DOC_ABSOLUTE=3D"$documentdir/$rpm_installed";=20 > if (file_exists("$DOC_ABSOLUTE/$doc_file")) {=20 > if (is_link("$rpmname")) {=20 > unlink("$rpmname");=20 > }=20 > symlink("$DOC_ABSOLUTE", "$rpmname");=20 > return "$rpmname/$doc_file";=20 > } else {=20 > return "failed";=20 > }=20 > }=20 > =20 > later its used when creating a page of documentation links for the = user, like this-=20 > =20 > $mysqldoc=3Ddoclink($docdir, "MySQL", "manual_toc.html");=20 > if (strstr($mysqldoc,"failed")) {=20 > echo "<!-- could not locate MySQL documentation -->\n";=20 > } else {=20 > echo "<P><font face=3D$font color=3D$color size=3D$size><A = href=3D\"$mysqldoc\">MySQL=20 > Documentation</A></font>\n";=20 > }=20 > =20 > Works beautifully, problem is- if the rpm isn't installed that's = querried in the doclink=20 > function, the error message rpm puts out is sent to the apache = error.log. I don't want that.=20 > =20 > Is there a way to supress the error message for that exec call?=20 > =20 > Thanks=20 > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=20 > Michael A. Peters=20 > Abriasoft Senior Developer=20 > =20 > http://www.abriasoft.com/=20 > =20 > (510) 623-9726x357=20 > Fax: (510) 249-9125=20 > -- =20 > PHP General Mailing List (http://www.php.net/)=20 > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net=20 > For additional commands, e-mail: php-general-help
lists.php.net=20 > To contact the list administrators, e-mail: = php-list-admin
lists.php.net=20 > =20 > =20
-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Michael A. Peters Abriasoft Senior Developer
(510) 623-9726x357 Fax: (510) 249-9125=
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42646.ezm"
Message-ID: <454D444FF5C0D211891800A0C98C7D90359A1E
SERVIDOR> From: Bruno Freire <bruno
fujinor.com.br> To: "'php-general
lists.php.net'" <php-general
lists.php.net> Date: Mon, 5 Mar 2001 15:41:17 -0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C0A5A3.DD4012B0" Subject: HELP!!! FTP!!!!
------_=_NextPart_001_01C0A5A3.DD4012B0 Content-Type: text/plain
Hi my name is bruno from Brazil.
I have a linux server with Apache and PHP 4 running. What i wanna do is upload a file.
Look the problem: I have a lan.(local Network) Consider this: Network server running apache : 6.6.6.6 Network client station : 6.6.6.5 If The apache server executes the php code when a client station requires a php page to make ftp conection, the remote host is the apache server and local host is th apache server.
I think this for this cause: Look my code:
<html> <head> <body bgcolor="#FFFFE6"> <?php $conn_id = ftp_connect("6.6.6.6"); $login_result = ftp_login($conn_id, "login", "password"); $destination="/home/httpd/html/intranet/test.txt"; $oriogin="c:\windows\test.txt"; $upload = ftp_put($conn_id,$destination,$origin,FTP_BINARY); if (!$upload) { echo "Ftp upload has failed!"; ftp_quit($conn_id); exit; } ftp_quit($conn_id); ?> </body> </html> WHAT IS WRONG???
------_=_NextPart_001_01C0A5A3.DD4012B0--
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42647.ezm"
From: "Brandon Orther" <brandon
webintellects.com> To: "PHP User Group" <php-general
lists.php.net> Date: Mon, 5 Mar 2001 11:08:00 -0800 Message-ID: <CKEMJEADMOCEHPHJKLPAOEEOCJAA.brandon
webintellects.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Subject: getting info.. help!
Hello,
Is there a way to remove all the spaces in the beginning of a string?
Example:
" 45 fasfda asdfasf" would be "45 fasfda asdfasf"
and
" 45 fasfda asdfasf" would be "45 fasfda asdfasf"
No matter how many spaces in the begging in I just want it to delete the first spaces.
I hope you can understand. :Þ
Thank you,
-------------------------------------------- Brandon Orther WebIntellects Design/Development Manager brandon
webintellects.com 800-994-6364 www.webintellects.com --------------------------------------------
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42648.ezm"
To: php-general
lists.php.net From: "Chris Lee" <lee
mediawaveonline.com> Date: Mon, 5 Mar 2001 11:11:18 -0600 Message-ID: <980o53$la7$1
toye.p.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: base64 Subject: Re: [PHP] getting info.. help!
DQp0cmltKCkNCg0KDQotLSANCg0KIENocmlzIExlZQ0KIE1lZGlhd2F2ZW9ubGluZS5jb20NCg0K IHBoLiAyNTAuMzc3LjEwOTUNCiBwaC4gMjUwLjM3Ni4yNjkwDQogZnguIDI1MC41NTQuMTEyMA0K DQogbGVlQG1lZGlhd2F2ZW9ubGluZS5jb20NCg0KDQoNCiIiQnJhbmRvbiBPcnRoZXIiIiA8YnJh bmRvbkB3ZWJpbnRlbGxlY3RzLmNvbT4gd3JvdGUgaW4gbWVzc2FnZSBuZXdzOkNLRU1KRUFETU9D RUhQSEpLTFBBT0VFT0NKQUEuYnJhbmRvbkB3ZWJpbnRlbGxlY3RzLmNvbS4uLg0KSGVsbG8sDQoN CklzIHRoZXJlIGEgd2F5IHRvIHJlbW92ZSBhbGwgdGhlIHNwYWNlcyBpbiB0aGUgYmVnaW5uaW5n IG9mIGEgc3RyaW5nPw0KDQpFeGFtcGxlOg0KDQoiICAgNDUgZmFzZmRhIGFzZGZhc2YiICB3b3Vs ZCBiZSAiNDUgZmFzZmRhIGFzZGZhc2YiDQoNCmFuZA0KDQoiIDQ1IGZhc2ZkYSBhc2RmYXNmIiB3 b3VsZCBiZSAiNDUgZmFzZmRhIGFzZGZhc2YiDQoNCk5vIG1hdHRlciBob3cgbWFueSBzcGFjZXMg aW4gdGhlIGJlZ2dpbmcgaW4gSSBqdXN0IHdhbnQgaXQgdG8gZGVsZXRlIHRoZQ0KZmlyc3Qgc3Bh Y2VzLg0KDQpJIGhvcGUgeW91IGNhbiB1bmRlcnN0YW5kLiA63g0KDQpUaGFuayB5b3UsDQoNCi0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQpCcmFuZG9uIE9ydGhl cg0KV2ViSW50ZWxsZWN0cyBEZXNpZ24vRGV2ZWxvcG1lbnQgTWFuYWdlcg0KYnJhbmRvbkB3ZWJp bnRlbGxlY3RzLmNvbQ0KODAwLTk5NC02MzY0DQp3d3cud2ViaW50ZWxsZWN0cy5jb20NCi0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQoNCg0KLS0gDQpQSFAgR2Vu ZXJhbCBNYWlsaW5nIExpc3QgKGh0dHA6Ly93d3cucGhwLm5ldC8pDQpUbyB1bnN1YnNjcmliZSwg ZS1tYWlsOiBwaHAtZ2VuZXJhbC11bnN1YnNjcmliZUBsaXN0cy5waHAubmV0DQpGb3IgYWRkaXRp b25hbCBjb21tYW5kcywgZS1tYWlsOiBwaHAtZ2VuZXJhbC1oZWxwQGxpc3RzLnBocC5uZXQNClRv IGNvbnRhY3QgdGhlIGxpc3QgYWRtaW5pc3RyYXRvcnMsIGUtbWFpbDogcGhwLWxpc3QtYWRtaW5A bGlzdHMucGhwLm5ldA0KDQo=
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42649.ezm"
Message-ID: <004501c0a5a8$8b819cf0$0101a8c0
HH> Reply-To: "Henrik Hansen" <hh
mailserver.dk> From: "Henrik Hansen" <hh
mailserver.dk> To: <php-general
lists.php.net> Date: Mon, 5 Mar 2001 20:14:47 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [PHP] getting info.. help!
> Hello, > > Is there a way to remove all the spaces in the beginning of a string? > > Example: > > " 45 fasfda asdfasf" would be "45 fasfda asdfasf" > > and > > " 45 fasfda asdfasf" would be "45 fasfda asdfasf" >
look at http://www.php.net/manual/en/function.ltrim.php or maybe http://www.php.net/manual/en/function.trim.php -- Henrik Hansen
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42650.ezm"
Message-ID: <BD9C6995EC9DD4119F3000500461631E0519E3
mail.govtech.net> From: Larry Jeannette <LJeannette
erepublic.com> To: 'PHP User Group' <php-general
lists.php.net> Date: Mon, 5 Mar 2001 11:16:50 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PHP] getting info.. help!
ltrim removes spaces on the left rtrim removes spaces on the right trim removes spaces on both the left and right
Larry Jeannette MIS Director, e.Republic
-----Original Message----- From: Brandon Orther [mailto:brandon
webintellects.com] Sent: Monday, March 05, 2001 11:08 AM To: PHP User Group Subject: [PHP] getting info.. help!
Hello,
Is there a way to remove all the spaces in the beginning of a string?
Example:
" 45 fasfda asdfasf" would be "45 fasfda asdfasf"
and
" 45 fasfda asdfasf" would be "45 fasfda asdfasf"
No matter how many spaces in the begging in I just want it to delete = the first spaces.
I hope you can understand. :=DE
Thank you,
-------------------------------------------- Brandon Orther WebIntellects Design/Development Manager brandon
webintellects.com 800-994-6364 www.webintellects.com --------------------------------------------
--=20 PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: = php-list-admin
lists.php.net
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42651.ezm"
Date: Mon, 5 Mar 2001 14:15:10 -0500 (EST) From: Chad Cunningham <ccunning
math.ohio-state.edu> To: php-general
lists.php.net Message-ID: <Pine.LNX.4.21.0103051410290.2548-100000
hooloovoo.math.ohio-state.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Pam Auth 0.2 released
Hi,
I've released Pam Auth 0.2 after many months :) Pam Auth is a php4 extension that allows simple pam authentication. Possible uses for this include using php to authenticate against local password files (dangerous!), samba/nt domains, ldap, mysql databases, and anything else which pam supports.
Changes in version 0.2 include:
- fixed problem with building on some systems - fixed problem with core dumps on solaris - fixed typo which caused errors to not be properly returned - added ability to specify pam servicename in php.ini - it now compiles as a shared module (although it won't load...)
I hope to figure out the shared library issue soon which should simplify the installation process greatly.
For more information and to download, please visit
http://www.math.ohio-state.edu/~ccunning/pam_auth.html
Please let me know if you encounter any problems with this version.
--
Chad Cunningham ccunning
math.ohio-state.edu
"Well, once again my friend, we find that science is a two-headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is bad! Oh beware the other head of science, Arthur, it bites!"
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42653.ezm"
Reply-To: <jeff
webdesigns1.com> From: "Jeff Oien" <jeff
webdesigns1.com> To: "PHP" <php-general
lists.php.net> Date: Mon, 5 Mar 2001 13:31:41 -0600 Message-ID: <NDBBJKNCILKDCEGAJBAOOEMKDFAA.jeff
webdesigns1.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: Regular Expression Help
I want to delete everything after a tab (or space) on each line of a text file and can't figure it out.
An example line is ARIA 5.19 -0.0625 -1.19 5.25 4.5 48.5 100300
I want to the output to be ARIA
Thanks. Jeff Oien
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42654.ezm"
Message-ID: <006501c0a5ac$035c4330$0101a8c0
HH> Reply-To: "Henrik Hansen" <hh
mailserver.dk> From: "Henrik Hansen" <hh
mailserver.dk> To: "php general" <php-general
lists.php.net> Date: Mon, 5 Mar 2001 20:39:37 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [PHP] Regular Expression Help
> I want to delete everything after a tab (or space) on each line of > a text file and can't figure it out. > > An example line is > ARIA 5.19 -0.0625 -1.19 5.25 4.5 48.5 100300 >
you can explode on a tab $arrlines = explode("\t", $the_line); then save $arrlines[0] from every line.
Don't know if it's the most optimal way but it works :)
-- Henrik Hansen
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42655.ezm"
Message-ID: <002f01c0a5ac$146e3a20$170aa8c0
gst.com.br> From: "Paulo Parola" <php
brazilinfo.com> To: "Lista PHP" <php-general
lists.php.net> Cc: <pgsql-general
postgresql.org> Date: Mon, 5 Mar 2001 16:39:49 -0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: RPMs for PHP accessing PostgreSQL via ODBC over RedHat
Hi,
We are currently running the following configuration on our server:
Linux Red Hat 7.0 PostgreSQL 7.1beta4-1 PHP 4.0.1pl2
I need to add some RPM package (or perhaps an apache module) to enable PHP to access PostgreSQL via ODBC.
In order to have PostgreSQL native access support we installed package 'php-pgsql-4.0.1pl2-9.i386.rpm'.
Is there some similar RPM package to enable ODBC access in PHP4.0.1pl2?
If not, how should I procceed?
TIA, Paulo
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42656.ezm"
Reply-To: <matt
adplusonline.com> From: "Matthew Delmarter" <matt
adplusonline.com> To: "PHP Mailing List" <php-general
lists.php.net> Date: Tue, 6 Mar 2001 08:47:34 +1300 Message-ID: <NDBBKBIHLCDMDICHLDKGGEDGCEAA.matt
adplusonline.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: get current events from mysql query by date?
I have a mysql database of events. It contains the following fields:
- EventID - EventName - EventDescription - EventStartDate - EventEndDate
I would like to query the database for the next 5 events from the current date (today). Any ideas?
Regards,
Matthew Delmarter Web Developer
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42658.ezm"
Message-ID: <008b01c0a5ad$6b900620$0101a8c0
HH> Reply-To: "Henrik Hansen" <hh
mailserver.dk> From: "Henrik Hansen" <hh
mailserver.dk> To: "php general" <php-general
lists.php.net> Date: Mon, 5 Mar 2001 20:49:41 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [PHP] get current events from mysql query by date?
> I have a mysql database of events. It contains the following fields: > > - EventID > - EventName > - EventDescription > - EventStartDate > - EventEndDate > > I would like to query the database for the next 5 events from the current > date (today). Any ideas?
works if EventStartDate is a timestamp (i think)
$strselect = "SELECT EventName FROM table WHERE EventStartDate > UNIX_TIMESTAMP() LIMIT 5";
if EventStartDate is not a timestamp what is it then?
hope it helps
-- Henrik Hansen
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42660.ezm"
Reply-To: <jeff
webdesigns1.com> From: "Jeff Oien" <jeff
webdesigns1.com> To: "PHP" <php-general
lists.php.net> Date: Mon, 5 Mar 2001 14:10:28 -0600 Message-ID: <NDBBJKNCILKDCEGAJBAOMEMMDFAA.jeff
webdesigns1.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: RE: [PHP] get current events from mysql query by date?
This is just a guess but wanted to take a shot at it.
Something like
SELECT EventID, EventName, EventDescription, EventStartDate, EventEndDate WHERE EventStartDate > CURRENT_DATE ORDER BY EventStartDate ASC LIMIT 5;
How did I do? Jeff Oien
> I have a mysql database of events. It contains the following fields: > > - EventID > - EventName > - EventDescription > - EventStartDate > - EventEndDate > > I would like to query the database for the next 5 events from the current > date (today). Any ideas? > > Regards, > > Matthew Delmarter > Web Developer
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42676.ezm"
To: <jeff
webdesigns1.com>, php-general
lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Date: Mon, 5 Mar 2001 14:53:41 MST From: php3
developersdesk.com Reply-To: php3
developersdesk.com Subject: RE: [PHP] get current events from mysql query by date?
Addressed to: <jeff
webdesigns1.com> php-general
lists.php.net
** Reply to note from <jeff
webdesigns1.com> Mon, 5 Mar 2001 14:10:28 -0600 > > This is just a guess but wanted to take a shot at it. > > Something like > > SELECT EventID, EventName, EventDescription, > EventStartDate, EventEndDate > WHERE EventStartDate > CURRENT_DATE > ORDER BY EventStartDate ASC > LIMIT 5; > > How did I do?
Close, very close. I belive CURRENT_DATE is a MySQL function. MySQL functions are identified by not having a space between the function name and the required ( that makes it a function. If CURRENT_DATE is actually a function (I use NOW() because it is shorter) then you need to change the WHERE clause to:
WHERE EventStartDate > CURRENT_DATE()
If CURRENT_DATE() is not a valid function change it to:
WHERE EventStartDate > NOW()
Both assume that EventStartDate is a MySQL DATE, DATETIME or TIMESTAMP value. If they are something else, this will not work. It should be one of these types though!!!
Rick Widmer Internet Marketing Specialists http://www.developersdesk.com
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42657.ezm"
Message-Id: <5.0.2.1.0.20010305133430.01d52d50
mail.tca.net> Date: Mon, 05 Mar 2001 13:45:52 -0600 To: php-general
lists.php.net From: Robert Cooper <rcooper
myriad.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Document Contains No Data in Netscape?
I have a set of pages I've been working on to do address entry for registered users to a MySQL database. I'm running up against a wall that I've been fighting for two days...
process is thus: checks session vars to see if user is logged in. if not, present login screen. if logged in: see if this is a submitted form, or a blank request for one. if blank request, present the HTML form. if submitted: check the incoming data to determine if the address type (home, work or other) is set. if not, give error. if set, checks to see if that type was already in the database for that user, and checks to see if this address was flagged as the mailing address. if either case, give error and exit. past all that? The the script SHOULD run the mysql_query and insert the submitted data to the database. if successful, should return one of two options: either go to the site main index page, or reload a blank address form if the user wants to enter an additional address.
My problem is coming in AFTER the type and mailing checks, and before the mysql_query. I can't find any problems with the script; everything looks right to me. However:
if I fill out the form and leave out the type field, I get the correct error. if I mark a type that exists in the database already, or that type already has a mailing flag set, I get the correct error. if I fill out the form correctly, and hit either button, I get a Netscape error "Document Contains No Data".
What in tarnation is going on? Can someone help me please?
Robert Cooper AwakeningRetreat.Net Webmaster
----- Attached script below address.php -----
<? require("backend.php"); session_start(); session_register("refer"); $refer = "/register/address.php"; if (!$seslog) { header("Location: /register/login.php"); exit; } else { $username = $sesusername; $id = $sesid; if (isset($street)) { if (!$type) { include("header.html"); echo "<P><CENTER><FONT SIZE=+2>Must Specify address type.</FONT><BR> <FONT SIZE=+1>Click the back arrow on your browser, select a type, and resubmit.<P> <a href=\"http://www.awakeningretreat.net/\">Continue without entering address information.</FONT></CENTER>"; include("footer.html"); exit; } else { mysql_connect("localhost","www","") or die("Unable to connect to SQL server"); mysql_select_db("awakening") or die("Unable to select database"); $query = mysql_query("select type, mailing from address where id='$id'"); $result = mysql_num_rows($query); if ($result > 0 ) { while ($row = mysql_fetch_array($query)) { if ($row[type] == $type) echo "$type address already exists in database. <a href=\"/register/address.php\"> Back to address entry.</a><P>"; if ($row[mailing] == $mailing) echo "You have already defined $row[type] as mailing address. <a href=\"/register/address.php\"> Back to address entry.</a><P>"; } exit; } else { $result = mysql_query("INSERT INTO address VALUES ('$id', '$street', '$city', '$state', '$ZIP', '$type', '$mailing')"); if (!$result) { echo "Unknown database error in address.<BR> Please contact the <a href=\"mailto:webmaster
awakeningretreat.net\">Webmaster</a> with this information."; exit; } else { include("header.html"); echo "<P>Finished updating addresses."; include("footer.html"); switch ($action) { case "Finish" : header("Location: http://www.awakeningretreat.net/"); break; case "Add Another" : header("Location: /register/address.php"); break; } } } } } else { include("header.html"); echo " <CENTER> <FONT SIZE=+2>Address Information</FONT> <P> <FORM ACTION=\"address.php\" METHOD=\"POST\"> <table border=0 cellspacing=0 cellpadding=0> <TR><td align=right>Street : </td><td><input type=text name=street></td></tr> <TR><td align=right>City : </td><td><input type=text name=city></td></tr> <TR><td align=right>State : </td><td><input type=text name=state SIZE=2></td></tr> <TR><td align=right>ZIP : </td><td><input type=text name=ZIP SIZE=10></td></tr> <TR><td align=right>Address Type : </TD><TD><input type=radio name=type value=home>HOME <input type=radio name=type value=work>WORK<input type=radio name=type value=other>OTHER </SELECT></TD></TR> <TR><td> </TD><TD><input type=checkbox name=mailing value=\"Y\"> This is my Mailing Address</TD></TR> <TR><td align=right>Submit and:</td><td><input type=submit value=\"Finish\" name=\"action\"> <input type=submit value=\"Add Another\" name=\"action\"></td></tr> <TR><TD COLSPAN=2 ALIGN=CENTER><a href=\"http://www.awakeningretreat.net/\">OR: continue without entering address information.</TD></TR> </table> </CENTER> NOTES: <a href=\"/privacy.php\">Privacy Policy</a><BR> All fields on this page are optional. However, answering them will help other Awakeners find you!<BR>
<P> </form> "; include("footer.html"); } } ?>
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42674.ezm"
To: php-general
lists.php.net From: "Chris Lee" <lee
mediawaveonline.com> Date: Mon, 5 Mar 2001 13:21:10 -0600 Message-ID: <980voj$6ri$1
toye.p.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: base64 Subject: Re: [PHP] Document Contains No Data in Netscape?
dGhpcyBpcyBjYXVzZWQgYnkgbmV0c2NhcGUgcmVjZWl2aW5nIG5vIGRhdGEuIGllLg0KDQo8P3Bo cA0KICAgIGV4aXQoKTsNCj8+DQoNCndpbGwgcHJvZHVjdCBubyBkYXRhLCBiZWNhdXNlIG5vdGhp bmcgaXMgZWNobydkLiBuZXRzY2FwZSBoYXRlcyB0aGlzLCBhbmQgd2lsbCBkaXNwbGF5IGEgd2Fy bmluZy4gdGhlIG90aGVyIHJlYXNvbiBjb3VsZCBiZSB0aGVyZSBpcyBzb21ldGhpbmcgd3Jvbmcg d2l0aCBhIGZ1bmt5IGZ1bmN0aW9uIHlvdXIgdXNpbmcuIGllLiBpZiBwZGZsaWIgaXNudCBjb21w aWxlZCBwcm9wZXJseSB3aXRoIFRURiB0aGVuIHdoZW4geW91IHRyeSB0byB1c2UgYSBUVEYgcGhw IHdpbGwgY2F1c2UgYXBhY2hlIH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RpdGlvbmFsIGNvbW1hbmRzLCBlLW1haWw6IHBocC1nZW5lcmFsLWhlbHBA bGlzdHMucGhwLm5ldA0KVG8gY29udGFjdCB0aGUgbGlzdCBhZG1pbmlzdHJhdG9ycywgZS1tYWls OiBwaHAtbGlzdC1hZG1pbkBsaXN0cy5waHAubmV0DQoNCg==
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42659.ezm"
Message-Id: <3.0.6.32.20010305115306.00985200
mail.mnl.com> Date: Mon, 05 Mar 2001 11:53:06 -0800 To: mailing_list
gmx.at, Michael Hall <lists
mulga.com.au> From: "Richard Kitamura - Media Net Link, Inc." <richardk
mnl.com> Cc: php-general
lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: Re: [PHP] Hide Include-Files from the Web
How bout an Apache redirect for .inc files to go to denied.htm or something? PHP scripts could get to them, but they wouldn't be accessible via http.
At 08:01 PM 3/3/01 +0100, mailing_list
gmx.at wrote: >Hi! > >as I wrote in my mail: >1. >I won't name them ".inc" but ".inc.php" (so *I* know, it's an include file) >2. >I don't even want them to be executable!!! > >and therefore my question was, if this (on top of every include-file) would >be safe enough: >>> if (substr($SCRIPT_URL,-8)==".inc.php") exit; >$PHP_SELF better than $SCRIPT_URL in line above??? > >thanks >michi > >> Include files do not have to end with '.inc', which is purely a convention >> of dubious value. If you use '.php' as the extension for included files, >> they will have to be parsed by PHP and can't be read as plain text from >> outside. >> >> > Hi! >> > >> > I want my include-files not be seen from outside AND not be executed!!! >> > I don't have access to a directory outside DOCUMENT_ROOT and I don't >> have >> > .htaccess!!! >> > >> > I think about something like: >> > 1. >> > name: <file>.inc.php >> > 2. >> > add code: >> > if ($PHP_SELF==MY_NAME) exit; >> > as first line in the inluded script. >> > so, if the script is being included from another script, the code will >> be >> > executed - but if the file will be called directly, no code is executed! >> > BUT - how do I get the include-file's name? >> > >> > or is it safe enough, to use something like >> > if (substr($SCRIPT_URL,-8)==".inc.php") exit; > >-- >Sent through GMX FreeMail - http://www.gmx.net > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net >For additional commands, e-mail: php-general-help
lists.php.net >To contact the list administrators, e-mail: php-list-admin
lists.php.net > >
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42669.ezm"
Date: Mon, 5 Mar 2001 21:39:29 +0100 (MET) To: "Richard Kitamura - Media Net Link Inc." <richardk
mnl.com> Cc: lists
mulga.com.au, php-general
lists.php.net Cc: lists
mulga.com.au, php-general
lists.php.net Message-ID: <16559.983824769
www30.gmx.net> From: mailing_list
gmx.at Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: Re: [PHP] Hide Include-Files from the Web
Hi!
As I wrote before, I don't have .htaccess nor access to the apache-conf!!!
michi > How bout an Apache redirect for .inc files to go to denied.htm or > something? PHP scripts could get to them, but they wouldn't be accessible > via http. > > > > At 08:01 PM 3/3/01 +0100, mailing_list
gmx.at wrote: > >Hi! > > > >as I wrote in my mail: > >1. > >I won't name them ".inc" but ".inc.php" (so *I* know, it's an include > file) > >2. > >I don't even want them to be executable!!! > > > >and therefore my question was, if this (on top of every include-file) > would > >be safe enough: > >>> if (substr($SCRIPT_URL,-8)==".inc.php") exit; > >$PHP_SELF better than $SCRIPT_URL in line above??? > > > >thanks > >michi > > > >> Include files do not have to end with '.inc', which is purely a > convention > >> of dubious value. If you use '.php' as the extension for included > files, > >> they will have to be parsed by PHP and can't be read as plain text from > >> outside. > >> > >> > Hi! > >> > > >> > I want my include-files not be seen from outside AND not be > executed!!! > >> > I don't have access to a directory outside DOCUMENT_ROOT and I don't > >> have > >> > .htaccess!!! > >> > > >> > I think about something like: > >> > 1. > >> > name: <file>.inc.php > >> > 2. > >> > add code: > >> > if ($PHP_SELF==MY_NAME) exit; > >> > as first line in the inluded script. > >> > so, if the script is being included from another script, the code > will > >> be > >> > executed - but if the file will be called directly, no code is > executed! > >> > BUT - how do I get the include-file's name? > >> > > >> > or is it safe enough, to use something like > >> > if (substr($SCRIPT_URL,-8)==".inc.php") exit;
-- Sent through GMX FreeMail - http://www.gmx.net
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42661.ezm"
From: "Brandon Orther" <brandon
webintellects.com> To: "PHP User Group" <php-general
lists.php.net> Date: Mon, 5 Mar 2001 12:17:50 -0800 Message-ID: <CKEMJEADMOCEHPHJKLPAGEFCCJAA.brandon
webintellects.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: Is it odd or even???
Hello,
Is there an easy way to check and see if a number is odd or even?
Thank you,
-------------------------------------------- Brandon Orther WebIntellects Design/Development Manager brandon
webintellects.com 800-994-6364 www.webintellects.com --------------------------------------------
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42662.ezm"
Message-ID: <4040BBE81A9AD411BD27009027887A7C042AF1
tiger.wild.net> From: "Boget, Chris" <Chris.Boget
wild.net> To: "'Brandon Orther'" <brandon
webintellects.com>, PHP User Group <php-general
lists.php.net> Date: Mon, 5 Mar 2001 14:20:43 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C0A5B1.C7341E90" Subject: RE: [PHP] Is it odd or even???
------_=_NextPart_001_01C0A5B1.C7341E90 Content-Type: text/plain; charset="iso-8859-1"
> Is there an easy way to check and see if a number is odd or even?
if( $num % 2 ) { echo "Odd";
} else { echo "Even";
}
Chris
------_=_NextPart_001_01C0A5B1.C7341E90--
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42663.ezm"
Message-ID: <003501c0a5b1$926a5350$0e00000a
mainstreams.com> From: "Jon Rosenberg" <php
columbusinteractive.com> To: "Brandon Orther" <brandon
webintellects.com>, "PHP User Group" <php-general
lists.php.net> Date: Mon, 5 Mar 2001 15:19:11 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [PHP] Is it odd or even???
You could divide it by 2, odd numbers will always have a remainder even umbers never will.
here are math functions, but none for odd/even that i see.
Jon
----- Original Message ----- From: "Brandon Orther" <brandon
webintellects.com> To: "PHP User Group" <php-general
lists.php.net> Sent: Monday, March 05, 2001 3:17 PM Subject: [PHP] Is it odd or even???
> Hello, > > Is there an easy way to check and see if a number is odd or even? > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > brandon
webintellects.com > 800-994-6364 > www.webintellects.com > -------------------------------------------- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > For additional commands, e-mail: php-general-help
lists.php.net > To contact the list administrators, e-mail: php-list-admin
lists.php.net >
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42664.ezm"
Message-ID: <BD9C6995EC9DD4119F3000500461631E0519E7
mail.govtech.net> From: Larry Jeannette <LJeannette
erepublic.com> To: 'PHP User Group' <php-general
lists.php.net> Date: Mon, 5 Mar 2001 12:28:48 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: [PHP] Is it odd or even???
use the modulus operator:
($number % 2) returns 0 if the value is even
Larry Jeannette MIS Director, e.Republic
-----Original Message----- From: Brandon Orther [mailto:brandon
webintellects.com] Sent: Monday, March 05, 2001 12:18 PM To: PHP User Group Subject: [PHP] Is it odd or even???
Hello,
Is there an easy way to check and see if a number is odd or even?
Thank you,
-------------------------------------------- Brandon Orther WebIntellects Design/Development Manager brandon
webintellects.com 800-994-6364 www.webintellects.com --------------------------------------------
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42665.ezm"
Message-ID: <4040BBE81A9AD411BD27009027887A7C042AF2
tiger.wild.net> From: "Boget, Chris" <Chris.Boget
wild.net> To: "'Kenneth R Zink II'" <Hellcat1
EV1.Net>, "Php (E-mail)" <php-general
lists.php.net> Date: Mon, 5 Mar 2001 14:32:49 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C0A5B3.74628D9E" Subject: RE: [PHP] Is it odd or even???
------_=_NextPart_001_01C0A5B3.74628D9E Content-Type: text/plain; charset="iso-8859-1"
> That won't work. % returns the remainder from a division of > the number divided by the mod number.
Yours:
> if($num %2 == 0){ > echo "even"; > }else{ > echo "odd"; > }
Mine:
> > if( $num % 2 ) { > > echo "Odd"; > > > > } else { > > echo "Even"; > > > > }
Ours are identical, just the other way around. This:
if( $num % 2 ) {
means if the result of that operation is anything other than 0 (zero), which is a truth in PHP.
Chris
------_=_NextPart_001_01C0A5B3.74628D9E--
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42666.ezm"
Reply-To: <brian
gfx.cncdsl.com> From: "Brian V Bonini" <brian
gfx.cncdsl.com> To: "Brandon Orther" <brandon
webintellects.com>, "PHP User Group" <php-general
lists.php.net> Date: Mon, 5 Mar 2001 15:43:07 -0500 Message-ID: <LOBBKHJGOJFPJMLKAHKFIECDCBAB.brian
gfx.cncdsl.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: RE: [PHP] Is it odd or even???
Use the modulus operator....
> -----Original Message----- > From: Brandon Orther [mailto:brandon
webintellects.com] > Sent: Monday, March 05, 2001 3:18 PM > To: PHP User Group > Subject: [PHP] Is it odd or even??? > > > Hello, > > Is there an easy way to check and see if a number is odd or even? > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > brandon
webintellects.com > 800-994-6364 > www.webintellects.com > -------------------------------------------- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > For additional commands, e-mail: php-general-help
lists.php.net > To contact the list administrators, e-mail: php-list-admin
lists.php.net > >
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42667.ezm"
Message-ID: <1B1034811F8BD311A8C300508B7294E803BB0CA7
EXCHANGE2> From: John Guynn <John.Guynn
telescan.com> To: "Boget, Chris" <Chris.Boget
wild.net> Cc: "Php (E-mail)" <php-general
lists.php.net> Date: Mon, 5 Mar 2001 14:36:34 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: [PHP] Is it odd or even???
Color me confused because I though true was any non zero value and false was zero.
I know I am using the following code:
if (!($num % 4){ do something}
and it does something when $num is evenly divisible by 4 (ie. $num % 4 = 0).
If I were testing for odd vs even I'd do the following:
if (!($num % 2) { Odd } else { Even }
John Guynn
This email brought to you by RFCs 821 and 1225.
-----Original Message----- From: Boget, Chris [mailto:Chris.Boget
wild.net] Sent: Monday, March 05, 2001 2:33 PM To: 'Kenneth R Zink II'; Php (E-mail) Subject: RE: [PHP] Is it odd or even???
> That won't work. % returns the remainder from a division of > the number divided by the mod number.
Yours:
> if($num %2 == 0){ > echo "even"; > }else{ > echo "odd"; > }
Mine:
> > if( $num % 2 ) { > > echo "Odd"; > > > > } else { > > echo "Even"; > > > > }
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42670.ezm"
Message-ID: <4040BBE81A9AD411BD27009027887A7C042AF3
tiger.wild.net> From: "Boget, Chris" <Chris.Boget
wild.net> To: "'John Guynn'" <John.Guynn
telescan.com> Cc: "Php (E-mail)" <php-general
lists.php.net> Date: Mon, 5 Mar 2001 14:42:51 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C0A5B4.DA0CD306" Subject: RE: [PHP] Is it odd or even???
------_=_NextPart_001_01C0A5B4.DA0CD306 Content-Type: text/plain; charset="iso-8859-1"
> Color me confused because I though true was any non zero > value and false was zero.
Right. And
if( $num % 2 ) { echo "it's odd";
}
means that the operation returned a remainder - a non zero value. > I know I am using the following code: > if (!($num % 4){ do something} > and it does something when $num is evenly divisible by 4 (ie. > $num % 4 = 0).
> If I were testing for odd vs even I'd do the following: > if (!($num % 2) { > Odd
And this is:
If( NOT ZERO ) { Odd }
which is the same as:
if( $num % 2 ) {
If there is a remainder, it's not zero.
Chris
------_=_NextPart_001_01C0A5B4.DA0CD306--
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42668.ezm"
Reply-To: <nathan
cjhunter.com> From: "Nathan Cassano" <nathan
cjhunter.com> To: "'Brandon Orther'" <brandon
webintellects.com>, <php-general
lists.php.net> Date: Mon, 5 Mar 2001 12:36:32 -0800 Message-ID: <12ee01c0a5b3$f78213c0$299739cc
ceweekly.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: RE: [PHP] Is it odd or even??? Optimize!!!
You all are a bunch of un-optimizing novices. Just do some bit banging.
i.e.
if(1 & number){ echo "$number is odd"; }else{ echo "$number is even"; }
-----Original Message----- From: Brandon Orther [mailto:brandon
webintellects.com] Sent: Monday, March 05, 2001 12:18 PM To: PHP User Group Subject: [PHP] Is it odd or even???
Hello,
Is there an easy way to check and see if a number is odd or even?
Thank you,
-------------------------------------------- Brandon Orther WebIntellects Design/Development Manager brandon
webintellects.com 800-994-6364 www.webintellects.com --------------------------------------------
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42675.ezm"
Date: Mon, 05 Mar 2001 14:42:18 -0800 From: Julian Wood <woodj
ucalgary.ca> To: <php-general
lists.php.net> Message-ID: <B6C9564A.5DD5%woodj
ucalgary.ca> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Subject: Re: [PHP] Is it odd or even??? Optimize!!!
Clever. For those of us unfamiliar with bitwise ops, here's how this works:
The bitwise and op (&) works on bits like this:
dig1 dig2 Result 0 0 0 0 1 0 1 0 0 1 1 1
An even number's binary representation always ends with 0 (ie 12 = 1100) while an odd ends with 1 (ie 13 = 1101).
So doing a bitwise & with 1 will only produce 1 if the last binary digit is 1 (ie an odd num), otherwise 0 (see table).
And, like Nathan implies, this will be very fast (way faster than modulus), since you only ever deal with 2 bits of info.
For an explanation of other bitwise operators, look here: http://java.sun.com/docs/books/tutorial/java/nutsandbolts/bitwise.html
J
on 3/5/01 12:36 PM, Nathan Cassano at nathan
cjhunter.com wrote:
> > You all are a bunch of un-optimizing novices. Just do some bit banging. > > i.e. > > if(1 & number){ > echo "$number is odd"; > }else{ > echo "$number is even"; > } > > > -----Original Message----- > From: Brandon Orther [mailto:brandon
webintellects.com] > Sent: Monday, March 05, 2001 12:18 PM > To: PHP User Group > Subject: [PHP] Is it odd or even??? > > > Hello, > > Is there an easy way to check and see if a number is odd or even? > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > brandon
webintellects.com > 800-994-6364 > www.webintellects.com > -------------------------------------------- >
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42671.ezm"
Message-ID: <20010305205302.16103.qmail
web9604.mail.yahoo.com> Date: Mon, 5 Mar 2001 12:53:02 -0800 (PST) From: Jeff Schwartz <jeff_schwartz
yahoo.com> To: PHP List <php-general
lists.php.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: carriage return in multipart/form-data form post
We've just moved to a new server and I'm running into an odd problem. The code is below. On my old server it correctly returns:
[test] t 116 e 101 s 115 t 116
But on my new server I get:
[ test] 13 10 t 116 e 101 s 115 t 116
Has anyone else run into this?
<?php echo "[$action] <BR> "; while ($action){ $c = substr($action,0,1); $action = substr($action,1); echo "$c " . ord($c) . "<BR>"; } ?>
<FORM ENCTYPE='multipart/form-data' ACTION='z.html' METHOD='POST'> <input type="hidden" name="action" value="test"> <INPUT TYPE='submit' VALUE='Process'></FORM>
__________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
--lfgjolbaefaoejfhkknn Content-Type: message/rfc822 Content-Disposition: inline; filename="php-general_42672.ezm"
To: php-general
lists.php.net From: "Chris Lee" <lee
mediawaveonline.com> Date: Mon, 5 Mar 2001 13:17:28 -0600 Message-ID: <980vhl$1do$1
toye.p.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: base64 Subject: Re: [PHP] carriage return in multipart/form-data form post
DQo8Zm9ybSBtZXRob2Q9cG9zdCBhY3Rpb249JyRQSFBfU0VMRic+DQo8aW5wdXQgdHlwZT1zdWJt aXQNCjwvZm9ybT4NCg0KZXZlbiB0aGUgc2ltcGxlc3QgZm9ybXMgcHJvZHVjdCBhIDB4MDEzIDB4 MTAgaW1lZGlhdGx5IGFmdGVyIHRoZSA8Zm9ybT4gSSB3aXNoIHRoZXJlIHdhcyBhIHdheSB0byBj b250cm9sIHRoaXMgYmVoYXZpb3VyLiBJIHRob3VnaHQgaXQgd2FzIG5vcm1hbCwgYW5kIGFub3lp bmcuDQoNCg0KLS0gDQoNCiBDaHJpcyBMZWUNCiBNZWRpYXdhdmVvbmxpbmUuY29tDQoNCiBwaC4g MjUwLjM3Ny4xMDk1DQogcGguIDI1MC4zNzYuMjY5MA0KIGZ4LiAyNTAuNTU0LjExMjANCg0KIGxl ZUBtZWRpYXdhdmVvbmxpbmUuY29tDQoNCg0KIkplZmYgU2Nod2FydHoiIDxqZWZmX3NjaHdhcnR6 QHlhaG9vLmNvbT4gd3JvdGUgaW4gbWVzc2FnZSBuZXdzOjIwMDEwMzA1MjA1MzAyLjE2MTAzLnFt YWlsQHdlYjk2MDQubWFpbC55YWhvby5jb20uLi4NCldlJ3ZlIGp1c3QgbW92ZWQgdG8gYSBuZXcg c2VydmVyIGFuZCBJJ20gcnVubmluZyBpbnRvIGFuIG9kZCBwcm9ibG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IgYWRkaXRpb25h bCBjb21tYW5kcywgZS1tYWlsOiBwaHAtZ2VuZXJhbC1oZWxwQGxpc3RzLnBocC5uZXQNClRvIGNv bnRhY3QgdGhlIGxpc3QgYWRtaW5pc3RyYXRvcnMsIGUtbWFpbDogcGhwLWxpc3QtYWRtaW5AbGlz dHMucGhwLm5ldA0KDQo=
--lfgjolbaefaoejfhkknn--
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ez.no>
Date: Mon, 05 Mar 2001 16:28:45 +0100
From: Paul K Egell-Johnsen <pkej