[PHP] Running PHP from Telnet/Cron

2001-11-12 Thread Robert Kemp

Hello--

I am getting the following error message when running a PHP script from a
Telnet session or from Cron: "Failed loading
/usr/local/Zend/lib/ZendOptimizer.so:  /usr/local/Zend/lib/ZendOptimizer.so:
undefined symbol: zend_get_ini_entry".  The problem appears to have started
when my hosting service updated their kernel.

== General Info ==
  PHP v4.0.6
  Zend Engine v1.0.6
  Linux
  Apache v1.3.20
  PHP running as an Apache Module
  PHP/Zend has been rebuilt (to troubleshot problem)

== test.php ==
  

== Command Line 1 (Manual) ==
  php test.php

== Command Line 2 (Cron) ==
  php /home/rkemp/public_html/sec/admin/sitemaint.php > /dev/null

Has anyone seen this error before, and if so have you come up with a
solution?

Thanks,
Robert




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Regular Expression

2001-11-12 Thread Adam . Whitehead

Hi All-

This is probably very simple for most of you.
I have the following statement

if ((ereg("[^[:alnum:]]",$fn)) || (ereg("[^[:alnum:]]",$sn))) {
// Do something here
}

What it's doing is checking two variables to make sure they contain only
alphanumeric
characters.

I have a requirement that hyphens (-) be allowed in $fn and $sn as well.
What do I need
to add to the regular expression to allow hyphens?

I know this is a relatively silly question. I plan on buying a book on
regular expressions
today and learning as much as I need to know about building them.

Cheers.

Regards,
Adam Whitehead
Systems Developer - Computer Support and Maintenance
Ph. (08) 8936 3164 ** Mobile (0411) 241 120
E-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] It doesn't cost you anything, why not try it!

2001-11-12 Thread Saint

  You will find the Legal Info at the bottom


RE: PayPal Account

This is something that I wouldn't normally even look at, except that, I read
an article in the Wall Street Journal about PayPal and x.com.

There have been other articles written about these companies in other well
recognized journals. Because I'm a member of PayPal, I knew that this was
real and would work.

If you need to make a few thousand dollars REALLY FAST, then please 
take a
moment to read this simple program I'm sharing with you.

THIS IS THE FASTEST, EASIEST PROGRAM YOU WILL EVER 
DO!!!

Complete it in one hour and you will never forget the day you first received
it!!!

Oh! Did I say FAST? "The speed of the internet-type fast." The Newsletter
and all payments are made on the Internet by E-Mail. NEED PROOF? 
Here are
just two testimonials from individuals who decided to invest nothing more
than a little of their time.

Testimonials from:
**
Tony Stevens, Vandenberg AFB, CA:
Hey! I got your e-mail! YOU ROCK! I sent it to all of our frat
brothers.and while I haven't seen my $20 grand yet,
I'm up to $8,285. Hook me up when you run this program again.

Mary Gathers, Columbia, SC:
Hey cuz! This is Mary. I only have one thing to say to you...OH MY GOD! 
I
sent 20 e-mails out like you said and went on vacation. When I got back, 
my
account was up to over $12,000! I owe you!

GETTING STARTED.
The very first thing you need to do is go to PayPal and sign up. It takes
two minutes and PayPal will deposit $5.00 in your account. That makes this
program FREE!

Here's the link: 


BE SURE TO SIGN UP FOR A PREMIER ACCOUNT! OR YOU'LL 
BE LIMITED TO $100
DOLLARS ONLY!!! YOU WILL MAKE MUCH MORE THAN 
THIS!!!

Then.. E-Mail the $5.00 from your PayPal account to the FIRST name 
on
the list (#1) along with a little note like "Please add me to your mailing
list." BE PREPARED TO GET EXCITED YOU WON'T BE 
DISAPPOINTED!!!

Read the following and you will agree this is a very exciting opportunity.

ARE YOU IN NEED OF MONEY RIGHT NOW? HOW DOES 
$20,000 IN TWO WEEKS SOUND?

Don't laugh! Try this for a change while you wait for the others to start
working. One hour of work to get started and no mailing lists! This service
is 100% legal (refer to US Postal and Lottery Laws, Title 18,Section 1302
and 1341, or Title 18, Section 3005 in the US code, also in the code of
Federal Regulations,Volume 16, Sections 255 and 436, which state a 
product
or service must be exchanged for money received).

Here's How It Works. Unlike many other programs, this THREE LEVEL 
PROGRAM is
more realistic and much, much faster. Because it is so easy, the response
rate for this program is VERY HIGH VERY FAST -- Internet E-Mail
FAST -- and you will see results in two weeks or less! JUST IN TIME 
FOR NEXT
MONTHS BILLS!

You only mail out 20 copies (not 200 or more as in other programs). You
should also send them to people who send their programs, because they 
know
these programs work and they are already believers in the system! Besides,
this program is MUCH, MUCH FASTER and has a HIGHER 
RESPONSE RATE! Even if
you are already in a program, stay with it, but do yourself a favour and DO
THIS ONE as well.

START RIGHT NOW! It's simple and takes NO INVESTMENT! It will 
pay off long
before others letters even begin to trickle in!

Just give ONE person a $5.00 gift (REMEMBER THOUGH, this $5.00 is 
$5.00 YOU
GOT FREE WHEN YOU SIGNED UP FOR THE PayPal account). 
That's all! If you
already have a PayPal account and do not receive their $5.00 gift, feel free
out of the goodness of your HEART to donate a $5,00 GIFT to the person 
in
the number 1 spot for him to have your name added to the advertisement 
list.
So anyone's MAXIMUM INVESTMENT IS $5.00.

Follow the simple instructions and in two weeks you will have $20,000 in
your bank account! Because of the ZERO INVESTMENT, SPEED, and 
HIGH PROFIT
POTENTIAL, this program has a VERY HIGH RESPONSE RATE! 
FROM just
ONE $5.00 bill that you get FREE at PayPal!!!

Follow These Simple Instructions:

E-Mail the $5.00 from your Paypal account to the FIRST name on the list
(#1)along with a note saying "add me to your mailing list". Only the first
person on the list gets your name and five dollar gift. Edit only the list,
removing the FIRST (#1) NAME FROM THE LIST. Move the other two 
names UP and
ADD YOUR NAME to the list in the THIRD (#3) position.

Don't try to add your name in the first place in order to earn money fast!
If you do that, you will ONLY reach people you sent e-mail to and then 
your
name will be immediately removed from the first place and you can't reach
more people! But if you add your name on the 3rd place, there will be tons
of people receiving E-Mails with your name first later!!!

NOTE: Do not forget to replace the PayPal referring URL in the body of 
the
letter with you

[PHP] Problem

2001-11-12 Thread Max Mouse

I'm trying to update from the CVS...and when I try to make I get the
following error..

[root@freedom:~/php4]# make
Making all in Zend
byacc -p zend -v -d ./zend_language_parser.y -o zend_language_parser.c
usage: yacc [-dlrtv] [-b file_prefix] [-o output_filename]
[-p symbol_prefix] filename
*** Error code 1

Stop in /usr/home/maxmouse/php4/Zend.
*** Error code 1

Stop in /usr/home/maxmouse/php4.

Now, here's the specs on my machine FreeBSD 4.4-Release, libtool-1.4.1,
bison-1.30, autoconf-2.13, automake-1.4-p5.

Any ideas?

Max


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] for loop problem?

2001-11-12 Thread Christopher William Wesley

I just ran your code as you pasted earlier, and set up a mysql database
with the table defined below ... and it inserted 223,110 passcodes into
the table.

PHP 4.0.99-3  (Identifies itself as 4.1.0RC1)
MySQL 3.23.43-3

~Chris   /"\
 \ / September 11, 2001
  X  We Are All New Yorkers
 / \ rm -rf /bin/laden

On Mon, 12 Nov 2001, Tyler Longren wrote:

> Hi John,
>
> MySQL Version: MySQL 3.23.44-nt
>
> SQL:
> CREATE TABLE passcodes (
>   id int(11) NOT NULL auto_increment,
>   passcode varchar(255) NOT NULL default '',
>   PRIMARY KEY  (id),
>   KEY id (id,passcode)
> ) TYPE=MyISAM;
>
> I'm beginning to think it's a MySQL problem also because this PHP SHOULD
> work.
>
> Tyler
>
> - Original Message -
> From: "John Steele" <[EMAIL PROTECTED]>
> To: "PHP General List" <[EMAIL PROTECTED]>
> Sent: Monday, November 12, 2001 3:33 PM
> Subject: Re: [PHP] for loop problem?
>
>
> > Hi Tyler,
> >
> >   This doesn't sound like a problem with PHP, but MySQL.  Can you show
> your CREATE TABLE and MySQL version?
> >
> > John
> >
> > >Hi Martin,
> > >
> > >I just got done doing that, and i got the same thing!  :-(
> > >
> > >Here's something interesting though.  There's an id field that's set to
> > >AUTO_INCREMENT.  I did a "SELECT * FROM passcodes WHERE
> passcode='P100'"
> > >This gave me this:
> > >
> > >id | passcode
> > >---
> > >1   |P100
> > >82145   |P100
> > >209398 |P100
> > >
> > >Shouldn't the ID's be further apart than that?  Know what I'm saying?
> > >
> > >Tyler
> > >
> > >- Original Message -
> > >From: "Martin Towell" <[EMAIL PROTECTED]>
> > >To: "'Tyler Longren'" <[EMAIL PROTECTED]>; "Jack Dempsey"
> > ><[EMAIL PROTECTED]>
> > >Cc: "PHP-General" <[EMAIL PROTECTED]>
> > >Sent: Monday, November 12, 2001 10:45 PM
> > >Subject: RE: [PHP] for loop problem?
> > >
> > >
> > >> How about changing the logic lightly? try this:
> > >>
> > >> $value1 = 0;
> > >> $value2 = 223109;
> > >> for($i=$value1; $i<=$value2; $i++) {
> > >>  $tmp = sprintf("1%06d\n", $i);
> > >>  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$tmp')");
> > >>
> > >> basically taking away 1,000,000 from the numbers then adding it back on
> > >> later
> > >>
> > >> Martin T
> > >>
> > >> -Original Message-
> > >> From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> > >> Sent: Tuesday, November 13, 2001 3:38 PM
> > >> To: Jack Dempsey
> > >> Cc: PHP-General
> > >> Subject: Re: [PHP] for loop problem?
> > >>
> > >>
> > >> I've ran it a few times without the MySQL code in there.  Runs just
> fine
> > >> that way for me too.  After it's run a few times for me (with the MySQL
> > >> code), I start getting duplicate entries of codes in there.  For
> example,
> > >> I'll end up with a few 'P100' entries in the 'passcodes' field.
> > >>
> > >> Oh well, here I come perl!
> > >>
> > >> Thanks,
> > >> Tyler
> > >>
> > >> - Original Message -
> > >> From: "Jack Dempsey" <[EMAIL PROTECTED]>
> > >> To: "Tyler Longren" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> > >> Sent: Monday, November 12, 2001 10:43 PM
> > >> Subject: RE: [PHP] for loop problem?
> > >>
> > >>
> > >> > ran it (without mysql queries) and worked finereal strange.
> > >> > have you tried the loop without the mysql queries?
> > >> >
> > >> > -Original Message-
> > >> > From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> > >> > Sent: Monday, November 12, 2001 11:28 PM
> > >> > To: Jack Dempsey; [EMAIL PROTECTED]
> > >> > Subject: Re: [PHP] for loop problem?
> > >> >
> > >> >
> > >> > Exact code:
> > >> >  > >> > $connection = mysql_connect("host_here","user_here","pass_here");
> > >> > $db = mysql_select_db("db_here", $connection);
> > >> > $value1 = 100;
> > >> > $value2 = 1223109;
> > >> > for($i=$value1; $i<=$value2; $i++) {
> > >> >  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
> > >> >  if (mysql_error() != "") {
> > >> >   print "".mysql_error()."";
> > >> >   exit;
> > >> >  }
> > >> > }
> > >> > mysql_close($connection);
> > >> > ?>
> > >> >
> > >> > Tyler
> > >> >
> > >> > - Original Message -
> > >> > From: "Jack Dempsey" <[EMAIL PROTECTED]>
> > >> > To: <[EMAIL PROTECTED]>
> > >> > Sent: Monday, November 12, 2001 10:34 PM
> > >> > Subject: RE: [PHP] for loop problem?
> > >> >
> > >> >
> > >> > > paste the complete code in and myself and others can run your exact
> > >copy
> > >> > >
> > >> > > -Original Message-
> > >> > > From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> > >> > > Sent: Monday, November 12, 2001 11:22 PM
> > >> > > To: Martin Towell; [EMAIL PROTECTED]
> > >> > > Subject: Re: [PHP] for loop problem?
> > >> > >
> > >> > >
> > >> > > I removed all of the quotes that could be affecting it.  Still, it
> > >loops
> > >> > > until I stop it.  I let it go a

[PHP] Opening a socket

2001-11-12 Thread Todd Cary

On the Linux server and the NT 2000 server, the following open a socket,
but on our NT 4 server, it hangs.  Does anyone have a suggestion on what
may be the problem?


POST http://www.zanzabar.com:80/tdwh/php/testhttp.php HTTP/1.0
Accept-Language: en-us Host: www.zanzabar.com:80 Connection: close
Content-type: application/x-www-form-urlencoded Content-length: 54
req_email=todd%40aristesoftware.com&req_regno=9991

Todd



--
Todd Cary
Ariste Software
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Query about parsing Word doc using PHP of RH Linux

2001-11-12 Thread David Robley

On Tue, 13 Nov 2001 15:06, [EMAIL PROTECTED] wrote:
> Hi all!
> Is it possible to parse a MS Word document using PHP in a webserver
> using RH Linux?
> Any exmaple on it?
>
> Many thanks in advance. :)
>
> Regards
> fidodido

You may find there is a utility called catdoc on your system - it makes a 
fair stab at parsing M$ Word files. If not, google will find it for you.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Change is inevitable, except from a vending machine.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] for loop problem?

2001-11-12 Thread Tyler Longren

Hi John,

MySQL Version: MySQL 3.23.44-nt

SQL:
CREATE TABLE passcodes (
  id int(11) NOT NULL auto_increment,
  passcode varchar(255) NOT NULL default '',
  PRIMARY KEY  (id),
  KEY id (id,passcode)
) TYPE=MyISAM;

I'm beginning to think it's a MySQL problem also because this PHP SHOULD
work.

Tyler

- Original Message -
From: "John Steele" <[EMAIL PROTECTED]>
To: "PHP General List" <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 3:33 PM
Subject: Re: [PHP] for loop problem?


> Hi Tyler,
>
>   This doesn't sound like a problem with PHP, but MySQL.  Can you show
your CREATE TABLE and MySQL version?
>
> John
>
> >Hi Martin,
> >
> >I just got done doing that, and i got the same thing!  :-(
> >
> >Here's something interesting though.  There's an id field that's set to
> >AUTO_INCREMENT.  I did a "SELECT * FROM passcodes WHERE
passcode='P100'"
> >This gave me this:
> >
> >id | passcode
> >---
> >1   |P100
> >82145   |P100
> >209398 |P100
> >
> >Shouldn't the ID's be further apart than that?  Know what I'm saying?
> >
> >Tyler
> >
> >- Original Message -
> >From: "Martin Towell" <[EMAIL PROTECTED]>
> >To: "'Tyler Longren'" <[EMAIL PROTECTED]>; "Jack Dempsey"
> ><[EMAIL PROTECTED]>
> >Cc: "PHP-General" <[EMAIL PROTECTED]>
> >Sent: Monday, November 12, 2001 10:45 PM
> >Subject: RE: [PHP] for loop problem?
> >
> >
> >> How about changing the logic lightly? try this:
> >>
> >> $value1 = 0;
> >> $value2 = 223109;
> >> for($i=$value1; $i<=$value2; $i++) {
> >>  $tmp = sprintf("1%06d\n", $i);
> >>  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$tmp')");
> >>
> >> basically taking away 1,000,000 from the numbers then adding it back on
> >> later
> >>
> >> Martin T
> >>
> >> -Original Message-
> >> From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> >> Sent: Tuesday, November 13, 2001 3:38 PM
> >> To: Jack Dempsey
> >> Cc: PHP-General
> >> Subject: Re: [PHP] for loop problem?
> >>
> >>
> >> I've ran it a few times without the MySQL code in there.  Runs just
fine
> >> that way for me too.  After it's run a few times for me (with the MySQL
> >> code), I start getting duplicate entries of codes in there.  For
example,
> >> I'll end up with a few 'P100' entries in the 'passcodes' field.
> >>
> >> Oh well, here I come perl!
> >>
> >> Thanks,
> >> Tyler
> >>
> >> - Original Message -
> >> From: "Jack Dempsey" <[EMAIL PROTECTED]>
> >> To: "Tyler Longren" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
> >> Sent: Monday, November 12, 2001 10:43 PM
> >> Subject: RE: [PHP] for loop problem?
> >>
> >>
> >> > ran it (without mysql queries) and worked finereal strange.
> >> > have you tried the loop without the mysql queries?
> >> >
> >> > -Original Message-
> >> > From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> >> > Sent: Monday, November 12, 2001 11:28 PM
> >> > To: Jack Dempsey; [EMAIL PROTECTED]
> >> > Subject: Re: [PHP] for loop problem?
> >> >
> >> >
> >> > Exact code:
> >> >  >> > $connection = mysql_connect("host_here","user_here","pass_here");
> >> > $db = mysql_select_db("db_here", $connection);
> >> > $value1 = 100;
> >> > $value2 = 1223109;
> >> > for($i=$value1; $i<=$value2; $i++) {
> >> >  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
> >> >  if (mysql_error() != "") {
> >> >   print "".mysql_error()."";
> >> >   exit;
> >> >  }
> >> > }
> >> > mysql_close($connection);
> >> > ?>
> >> >
> >> > Tyler
> >> >
> >> > - Original Message -
> >> > From: "Jack Dempsey" <[EMAIL PROTECTED]>
> >> > To: <[EMAIL PROTECTED]>
> >> > Sent: Monday, November 12, 2001 10:34 PM
> >> > Subject: RE: [PHP] for loop problem?
> >> >
> >> >
> >> > > paste the complete code in and myself and others can run your exact
> >copy
> >> > >
> >> > > -Original Message-
> >> > > From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> >> > > Sent: Monday, November 12, 2001 11:22 PM
> >> > > To: Martin Towell; [EMAIL PROTECTED]
> >> > > Subject: Re: [PHP] for loop problem?
> >> > >
> >> > >
> >> > > I removed all of the quotes that could be affecting it.  Still, it
> >loops
> >> > > until I stop it.  I let it go all the way up to 350,000 or so.  Any
> >> other
> >> > > ideas anyone?
> >> > >
> >> > > Thank you!
> >> > > Tyler
> >> > >
> >> > > - Original Message -
> >> > > From: "Martin Towell" <[EMAIL PROTECTED]>
> >> > > To: <[EMAIL PROTECTED]>
> >> > > Sent: Monday, November 12, 2001 10:06 PM
> >> > > Subject: RE: [PHP] for loop problem?
> >> > >
> >> > >
> >> > > > hmmm... I just tried :
> >> > > >
> >> > > > $value1 = 100;
> >> > > > $value2 = 1223109;
> >> > > > for($i = $value1; $i <= $value2; $i++)
> >> > > > {
> >> > > >   echo "$i\n";
> >> > > > }
> >> > > >
> >> > > > and it spat out all 223109 numbers (albiet after a VERY long
time)
> >> > > > can't see how adding mysql code would affect the loop...
> >> > > >
> >> > > > Martin T
> >> > > >
> >> > > > -Original Message-

Re: [PHP] for loop problem?

2001-11-12 Thread John Steele

Hi Tyler,

  This doesn't sound like a problem with PHP, but MySQL.  Can you show your CREATE 
TABLE and MySQL version?

John

>Hi Martin,
>
>I just got done doing that, and i got the same thing!  :-(
>
>Here's something interesting though.  There's an id field that's set to
>AUTO_INCREMENT.  I did a "SELECT * FROM passcodes WHERE passcode='P100'"
>This gave me this:
>
>id | passcode
>---
>1   |P100
>82145   |P100
>209398 |P100
>
>Shouldn't the ID's be further apart than that?  Know what I'm saying?
>
>Tyler
>
>- Original Message -
>From: "Martin Towell" <[EMAIL PROTECTED]>
>To: "'Tyler Longren'" <[EMAIL PROTECTED]>; "Jack Dempsey"
><[EMAIL PROTECTED]>
>Cc: "PHP-General" <[EMAIL PROTECTED]>
>Sent: Monday, November 12, 2001 10:45 PM
>Subject: RE: [PHP] for loop problem?
>
>
>> How about changing the logic lightly? try this:
>>
>> $value1 = 0;
>> $value2 = 223109;
>> for($i=$value1; $i<=$value2; $i++) {
>>  $tmp = sprintf("1%06d\n", $i);
>>  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$tmp')");
>>
>> basically taking away 1,000,000 from the numbers then adding it back on
>> later
>>
>> Martin T
>>
>> -Original Message-
>> From: Tyler Longren [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, November 13, 2001 3:38 PM
>> To: Jack Dempsey
>> Cc: PHP-General
>> Subject: Re: [PHP] for loop problem?
>>
>>
>> I've ran it a few times without the MySQL code in there.  Runs just fine
>> that way for me too.  After it's run a few times for me (with the MySQL
>> code), I start getting duplicate entries of codes in there.  For example,
>> I'll end up with a few 'P100' entries in the 'passcodes' field.
>>
>> Oh well, here I come perl!
>>
>> Thanks,
>> Tyler
>>
>> - Original Message -
>> From: "Jack Dempsey" <[EMAIL PROTECTED]>
>> To: "Tyler Longren" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>> Sent: Monday, November 12, 2001 10:43 PM
>> Subject: RE: [PHP] for loop problem?
>>
>>
>> > ran it (without mysql queries) and worked finereal strange.
>> > have you tried the loop without the mysql queries?
>> >
>> > -Original Message-
>> > From: Tyler Longren [mailto:[EMAIL PROTECTED]]
>> > Sent: Monday, November 12, 2001 11:28 PM
>> > To: Jack Dempsey; [EMAIL PROTECTED]
>> > Subject: Re: [PHP] for loop problem?
>> >
>> >
>> > Exact code:
>> > > > $connection = mysql_connect("host_here","user_here","pass_here");
>> > $db = mysql_select_db("db_here", $connection);
>> > $value1 = 100;
>> > $value2 = 1223109;
>> > for($i=$value1; $i<=$value2; $i++) {
>> >  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
>> >  if (mysql_error() != "") {
>> >   print "".mysql_error()."";
>> >   exit;
>> >  }
>> > }
>> > mysql_close($connection);
>> > ?>
>> >
>> > Tyler
>> >
>> > - Original Message -
>> > From: "Jack Dempsey" <[EMAIL PROTECTED]>
>> > To: <[EMAIL PROTECTED]>
>> > Sent: Monday, November 12, 2001 10:34 PM
>> > Subject: RE: [PHP] for loop problem?
>> >
>> >
>> > > paste the complete code in and myself and others can run your exact
>copy
>> > >
>> > > -Original Message-
>> > > From: Tyler Longren [mailto:[EMAIL PROTECTED]]
>> > > Sent: Monday, November 12, 2001 11:22 PM
>> > > To: Martin Towell; [EMAIL PROTECTED]
>> > > Subject: Re: [PHP] for loop problem?
>> > >
>> > >
>> > > I removed all of the quotes that could be affecting it.  Still, it
>loops
>> > > until I stop it.  I let it go all the way up to 350,000 or so.  Any
>> other
>> > > ideas anyone?
>> > >
>> > > Thank you!
>> > > Tyler
>> > >
>> > > - Original Message -
>> > > From: "Martin Towell" <[EMAIL PROTECTED]>
>> > > To: <[EMAIL PROTECTED]>
>> > > Sent: Monday, November 12, 2001 10:06 PM
>> > > Subject: RE: [PHP] for loop problem?
>> > >
>> > >
>> > > > hmmm... I just tried :
>> > > >
>> > > > $value1 = 100;
>> > > > $value2 = 1223109;
>> > > > for($i = $value1; $i <= $value2; $i++)
>> > > > {
>> > > >   echo "$i\n";
>> > > > }
>> > > >
>> > > > and it spat out all 223109 numbers (albiet after a VERY long time)
>> > > > can't see how adding mysql code would affect the loop...
>> > > >
>> > > > Martin T
>> > > >
>> > > > -Original Message-
>> > > > From: Tyler Longren [mailto:[EMAIL PROTECTED]]
>> > > > Sent: Tuesday, November 13, 2001 2:53 PM
>> > > > To: Evan Nemerson; [EMAIL PROTECTED]
>> > > > Subject: Re: [PHP] for loop problem?
>> > > >
>> > > >
>> > > > To everyone that said it had something to do with the quotes:
>> > > > that has nothing to do with it.
>> > > >
>> > > > When I first wrote this, It didn't have all the quotes.  It did the
>> same
>> > > > thing.  Then, I thought I may need some quotes somewhere, but that
>> > > obviously
>> > > > didn't help.  Any other suggestions?  If I HAVE to, I'll do this in
>> > PERL,
>> > > > but would much rather do it in PHP.
>> > > >
>> > > > Thanks everyone,
>> > > > Tyler
>> > > >
>> > > > - Original Message -
>> > > > From: "Evan Nemerson" <[EMAIL 

Re: [PHP] for loop problem?

2001-11-12 Thread Tyler Longren

Hi Martin,

I just got done doing that, and i got the same thing!  :-(

Here's something interesting though.  There's an id field that's set to
AUTO_INCREMENT.  I did a "SELECT * FROM passcodes WHERE passcode='P100'"
This gave me this:

id | passcode
---
1   |P100
82145   |P100
209398 |P100

Shouldn't the ID's be further apart than that?  Know what I'm saying?

Tyler

- Original Message -
From: "Martin Towell" <[EMAIL PROTECTED]>
To: "'Tyler Longren'" <[EMAIL PROTECTED]>; "Jack Dempsey"
<[EMAIL PROTECTED]>
Cc: "PHP-General" <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 10:45 PM
Subject: RE: [PHP] for loop problem?


> How about changing the logic lightly? try this:
>
> $value1 = 0;
> $value2 = 223109;
> for($i=$value1; $i<=$value2; $i++) {
>  $tmp = sprintf("1%06d\n", $i);
>  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$tmp')");
>
> basically taking away 1,000,000 from the numbers then adding it back on
> later
>
> Martin T
>
> -Original Message-
> From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 3:38 PM
> To: Jack Dempsey
> Cc: PHP-General
> Subject: Re: [PHP] for loop problem?
>
>
> I've ran it a few times without the MySQL code in there.  Runs just fine
> that way for me too.  After it's run a few times for me (with the MySQL
> code), I start getting duplicate entries of codes in there.  For example,
> I'll end up with a few 'P100' entries in the 'passcodes' field.
>
> Oh well, here I come perl!
>
> Thanks,
> Tyler
>
> - Original Message -
> From: "Jack Dempsey" <[EMAIL PROTECTED]>
> To: "Tyler Longren" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Monday, November 12, 2001 10:43 PM
> Subject: RE: [PHP] for loop problem?
>
>
> > ran it (without mysql queries) and worked finereal strange.
> > have you tried the loop without the mysql queries?
> >
> > -Original Message-
> > From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, November 12, 2001 11:28 PM
> > To: Jack Dempsey; [EMAIL PROTECTED]
> > Subject: Re: [PHP] for loop problem?
> >
> >
> > Exact code:
> >  > $connection = mysql_connect("host_here","user_here","pass_here");
> > $db = mysql_select_db("db_here", $connection);
> > $value1 = 100;
> > $value2 = 1223109;
> > for($i=$value1; $i<=$value2; $i++) {
> >  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
> >  if (mysql_error() != "") {
> >   print "".mysql_error()."";
> >   exit;
> >  }
> > }
> > mysql_close($connection);
> > ?>
> >
> > Tyler
> >
> > - Original Message -
> > From: "Jack Dempsey" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, November 12, 2001 10:34 PM
> > Subject: RE: [PHP] for loop problem?
> >
> >
> > > paste the complete code in and myself and others can run your exact
copy
> > >
> > > -Original Message-
> > > From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, November 12, 2001 11:22 PM
> > > To: Martin Towell; [EMAIL PROTECTED]
> > > Subject: Re: [PHP] for loop problem?
> > >
> > >
> > > I removed all of the quotes that could be affecting it.  Still, it
loops
> > > until I stop it.  I let it go all the way up to 350,000 or so.  Any
> other
> > > ideas anyone?
> > >
> > > Thank you!
> > > Tyler
> > >
> > > - Original Message -
> > > From: "Martin Towell" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Monday, November 12, 2001 10:06 PM
> > > Subject: RE: [PHP] for loop problem?
> > >
> > >
> > > > hmmm... I just tried :
> > > >
> > > > $value1 = 100;
> > > > $value2 = 1223109;
> > > > for($i = $value1; $i <= $value2; $i++)
> > > > {
> > > >   echo "$i\n";
> > > > }
> > > >
> > > > and it spat out all 223109 numbers (albiet after a VERY long time)
> > > > can't see how adding mysql code would affect the loop...
> > > >
> > > > Martin T
> > > >
> > > > -Original Message-
> > > > From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> > > > Sent: Tuesday, November 13, 2001 2:53 PM
> > > > To: Evan Nemerson; [EMAIL PROTECTED]
> > > > Subject: Re: [PHP] for loop problem?
> > > >
> > > >
> > > > To everyone that said it had something to do with the quotes:
> > > > that has nothing to do with it.
> > > >
> > > > When I first wrote this, It didn't have all the quotes.  It did the
> same
> > > > thing.  Then, I thought I may need some quotes somewhere, but that
> > > obviously
> > > > didn't help.  Any other suggestions?  If I HAVE to, I'll do this in
> > PERL,
> > > > but would much rather do it in PHP.
> > > >
> > > > Thanks everyone,
> > > > Tyler
> > > >
> > > > - Original Message -
> > > > From: "Evan Nemerson" <[EMAIL PROTECTED]>
> > > > To: "Tyler Longren" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> > > > Sent: Monday, November 12, 2001 9:41 PM
> > > > Subject: Re: [PHP] for loop problem?
> > > >
> > > >
> > > > > My word why all the quotes?
> > > > >
> > > > >  > > > > $connection = mysql_connect("bl

Re: [PHP] Question....

2001-11-12 Thread Jason G.

try ".mysite.com"

-Jason Garber

At 12:07 PM 11/13/2001 +1100, Chris Kay wrote:

>I have a simple question that bugging me..
>
>I have a site which I am designing with users auth, I have decided to use
>cookies as I need to store variables after the user leave the site..
>
>Problem I am having is the domain I set it on,
>
>If the user logs into http://www.mysite.com and later logs into
>http://mysite.com without the www the cookie will not work..
>
>Is this because I am setting the domain wrong?
>
>I have tried
>
> ".mysite.com"
> "mysite.com"
> "$HTTP_HOST"
> ""
>
>Is some1 able to point me in the right direction
>
>
>
>  Chris Kay - Tech Support - IDEAL Internet
>email: [EMAIL PROTECTED] phone: +61 2 4628  fax: +61 2 4628 8890
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] for loop problem?

2001-11-12 Thread Martin Towell

How about changing the logic lightly? try this:

$value1 = 0;
$value2 = 223109;
for($i=$value1; $i<=$value2; $i++) {
 $tmp = sprintf("1%06d\n", $i);
 mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$tmp')");

basically taking away 1,000,000 from the numbers then adding it back on
later

Martin T

-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 3:38 PM
To: Jack Dempsey
Cc: PHP-General
Subject: Re: [PHP] for loop problem?


I've ran it a few times without the MySQL code in there.  Runs just fine
that way for me too.  After it's run a few times for me (with the MySQL
code), I start getting duplicate entries of codes in there.  For example,
I'll end up with a few 'P100' entries in the 'passcodes' field.

Oh well, here I come perl!

Thanks,
Tyler

- Original Message -
From: "Jack Dempsey" <[EMAIL PROTECTED]>
To: "Tyler Longren" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 10:43 PM
Subject: RE: [PHP] for loop problem?


> ran it (without mysql queries) and worked finereal strange.
> have you tried the loop without the mysql queries?
>
> -Original Message-
> From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 12, 2001 11:28 PM
> To: Jack Dempsey; [EMAIL PROTECTED]
> Subject: Re: [PHP] for loop problem?
>
>
> Exact code:
>  $connection = mysql_connect("host_here","user_here","pass_here");
> $db = mysql_select_db("db_here", $connection);
> $value1 = 100;
> $value2 = 1223109;
> for($i=$value1; $i<=$value2; $i++) {
>  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
>  if (mysql_error() != "") {
>   print "".mysql_error()."";
>   exit;
>  }
> }
> mysql_close($connection);
> ?>
>
> Tyler
>
> - Original Message -
> From: "Jack Dempsey" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, November 12, 2001 10:34 PM
> Subject: RE: [PHP] for loop problem?
>
>
> > paste the complete code in and myself and others can run your exact copy
> >
> > -Original Message-
> > From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, November 12, 2001 11:22 PM
> > To: Martin Towell; [EMAIL PROTECTED]
> > Subject: Re: [PHP] for loop problem?
> >
> >
> > I removed all of the quotes that could be affecting it.  Still, it loops
> > until I stop it.  I let it go all the way up to 350,000 or so.  Any
other
> > ideas anyone?
> >
> > Thank you!
> > Tyler
> >
> > - Original Message -
> > From: "Martin Towell" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, November 12, 2001 10:06 PM
> > Subject: RE: [PHP] for loop problem?
> >
> >
> > > hmmm... I just tried :
> > >
> > > $value1 = 100;
> > > $value2 = 1223109;
> > > for($i = $value1; $i <= $value2; $i++)
> > > {
> > >   echo "$i\n";
> > > }
> > >
> > > and it spat out all 223109 numbers (albiet after a VERY long time)
> > > can't see how adding mysql code would affect the loop...
> > >
> > > Martin T
> > >
> > > -Original Message-
> > > From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, November 13, 2001 2:53 PM
> > > To: Evan Nemerson; [EMAIL PROTECTED]
> > > Subject: Re: [PHP] for loop problem?
> > >
> > >
> > > To everyone that said it had something to do with the quotes:
> > > that has nothing to do with it.
> > >
> > > When I first wrote this, It didn't have all the quotes.  It did the
same
> > > thing.  Then, I thought I may need some quotes somewhere, but that
> > obviously
> > > didn't help.  Any other suggestions?  If I HAVE to, I'll do this in
> PERL,
> > > but would much rather do it in PHP.
> > >
> > > Thanks everyone,
> > > Tyler
> > >
> > > - Original Message -
> > > From: "Evan Nemerson" <[EMAIL PROTECTED]>
> > > To: "Tyler Longren" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
> > > Sent: Monday, November 12, 2001 9:41 PM
> > > Subject: Re: [PHP] for loop problem?
> > >
> > >
> > > > My word why all the quotes?
> > > >
> > > >  > > > $connection = mysql_connect("blah","blah","blah");
> > > > $db = mysql_select_db("db_to_use", $connection);
> > > > $value1 = 100;
> > > > $value2 = 1223109;
> > > > for($i=$value1; $i<=$value2; $i++) {
> > > >  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
> > > >  if (mysql_error() != "") {
> > > >   print "".mysql_error()."";
> > > >   exit;
> > > >  }
> > > > }
> > > > mysql_close($connection);
> > > > ?>
> > > >
> > > > That should give you some better results.
> > > >
> > > >
> > > > On Monday 12 November 2001 07:32 pm, you wrote:
> > > > > Hello everyone,
> > > > >
> > > > > I have a pretty big list of codes that need to be put into a mysql
> db.
> > > The
> > > > > numbers range from 100 to 1223109.  Here's the PHP I wrote to
> put
> > > these
> > > > > codes into a database:
> > > > >
> > > > >  > > > > $connection = mysql_connect("blah","blah","blah");
> > > > > $db = mysql_select_db("db_to_use", $connection);
> > > > > $value1 = "100";
> > > > > $value2 = "12

Re: [PHP] for loop problem?

2001-11-12 Thread Tyler Longren

I've ran it a few times without the MySQL code in there.  Runs just fine
that way for me too.  After it's run a few times for me (with the MySQL
code), I start getting duplicate entries of codes in there.  For example,
I'll end up with a few 'P100' entries in the 'passcodes' field.

Oh well, here I come perl!

Thanks,
Tyler

- Original Message -
From: "Jack Dempsey" <[EMAIL PROTECTED]>
To: "Tyler Longren" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 10:43 PM
Subject: RE: [PHP] for loop problem?


> ran it (without mysql queries) and worked finereal strange.
> have you tried the loop without the mysql queries?
>
> -Original Message-
> From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 12, 2001 11:28 PM
> To: Jack Dempsey; [EMAIL PROTECTED]
> Subject: Re: [PHP] for loop problem?
>
>
> Exact code:
>  $connection = mysql_connect("host_here","user_here","pass_here");
> $db = mysql_select_db("db_here", $connection);
> $value1 = 100;
> $value2 = 1223109;
> for($i=$value1; $i<=$value2; $i++) {
>  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
>  if (mysql_error() != "") {
>   print "".mysql_error()."";
>   exit;
>  }
> }
> mysql_close($connection);
> ?>
>
> Tyler
>
> - Original Message -
> From: "Jack Dempsey" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, November 12, 2001 10:34 PM
> Subject: RE: [PHP] for loop problem?
>
>
> > paste the complete code in and myself and others can run your exact copy
> >
> > -Original Message-
> > From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, November 12, 2001 11:22 PM
> > To: Martin Towell; [EMAIL PROTECTED]
> > Subject: Re: [PHP] for loop problem?
> >
> >
> > I removed all of the quotes that could be affecting it.  Still, it loops
> > until I stop it.  I let it go all the way up to 350,000 or so.  Any
other
> > ideas anyone?
> >
> > Thank you!
> > Tyler
> >
> > - Original Message -
> > From: "Martin Towell" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, November 12, 2001 10:06 PM
> > Subject: RE: [PHP] for loop problem?
> >
> >
> > > hmmm... I just tried :
> > >
> > > $value1 = 100;
> > > $value2 = 1223109;
> > > for($i = $value1; $i <= $value2; $i++)
> > > {
> > >   echo "$i\n";
> > > }
> > >
> > > and it spat out all 223109 numbers (albiet after a VERY long time)
> > > can't see how adding mysql code would affect the loop...
> > >
> > > Martin T
> > >
> > > -Original Message-
> > > From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, November 13, 2001 2:53 PM
> > > To: Evan Nemerson; [EMAIL PROTECTED]
> > > Subject: Re: [PHP] for loop problem?
> > >
> > >
> > > To everyone that said it had something to do with the quotes:
> > > that has nothing to do with it.
> > >
> > > When I first wrote this, It didn't have all the quotes.  It did the
same
> > > thing.  Then, I thought I may need some quotes somewhere, but that
> > obviously
> > > didn't help.  Any other suggestions?  If I HAVE to, I'll do this in
> PERL,
> > > but would much rather do it in PHP.
> > >
> > > Thanks everyone,
> > > Tyler
> > >
> > > - Original Message -
> > > From: "Evan Nemerson" <[EMAIL PROTECTED]>
> > > To: "Tyler Longren" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
> > > Sent: Monday, November 12, 2001 9:41 PM
> > > Subject: Re: [PHP] for loop problem?
> > >
> > >
> > > > My word why all the quotes?
> > > >
> > > >  > > > $connection = mysql_connect("blah","blah","blah");
> > > > $db = mysql_select_db("db_to_use", $connection);
> > > > $value1 = 100;
> > > > $value2 = 1223109;
> > > > for($i=$value1; $i<=$value2; $i++) {
> > > >  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
> > > >  if (mysql_error() != "") {
> > > >   print "".mysql_error()."";
> > > >   exit;
> > > >  }
> > > > }
> > > > mysql_close($connection);
> > > > ?>
> > > >
> > > > That should give you some better results.
> > > >
> > > >
> > > > On Monday 12 November 2001 07:32 pm, you wrote:
> > > > > Hello everyone,
> > > > >
> > > > > I have a pretty big list of codes that need to be put into a mysql
> db.
> > > The
> > > > > numbers range from 100 to 1223109.  Here's the PHP I wrote to
> put
> > > these
> > > > > codes into a database:
> > > > >
> > > > >  > > > > $connection = mysql_connect("blah","blah","blah");
> > > > > $db = mysql_select_db("db_to_use", $connection);
> > > > > $value1 = "100";
> > > > > $value2 = "1223109";
> > > > > for($i="$value1"; $i<="$value2"; $i++) {
> > > > >  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
> > > > >  if (mysql_error() != "") {
> > > > >   print "".mysql_error()."";
> > > > >   exit;
> > > > >  }
> > > > > }
> > > > > mysql_close($connection);
> > > > > ?>
> > > > >
> > > > > Everytime I run this from a browser, it just keeps looping.  It
> should
> > > put
> > > > > about 223109 entries into the "passcodes" table.  However, it just
> > keeps

RE: [PHP] for loop problem?

2001-11-12 Thread Jack Dempsey

ran it (without mysql queries) and worked finereal strange.
have you tried the loop without the mysql queries?

-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 12, 2001 11:28 PM
To: Jack Dempsey; [EMAIL PROTECTED]
Subject: Re: [PHP] for loop problem?


Exact code:
".mysql_error()."";
  exit;
 }
}
mysql_close($connection);
?>

Tyler

- Original Message -
From: "Jack Dempsey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 10:34 PM
Subject: RE: [PHP] for loop problem?


> paste the complete code in and myself and others can run your exact copy
>
> -Original Message-
> From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 12, 2001 11:22 PM
> To: Martin Towell; [EMAIL PROTECTED]
> Subject: Re: [PHP] for loop problem?
>
>
> I removed all of the quotes that could be affecting it.  Still, it loops
> until I stop it.  I let it go all the way up to 350,000 or so.  Any other
> ideas anyone?
>
> Thank you!
> Tyler
>
> - Original Message -
> From: "Martin Towell" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, November 12, 2001 10:06 PM
> Subject: RE: [PHP] for loop problem?
>
>
> > hmmm... I just tried :
> >
> > $value1 = 100;
> > $value2 = 1223109;
> > for($i = $value1; $i <= $value2; $i++)
> > {
> >   echo "$i\n";
> > }
> >
> > and it spat out all 223109 numbers (albiet after a VERY long time)
> > can't see how adding mysql code would affect the loop...
> >
> > Martin T
> >
> > -Original Message-
> > From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, November 13, 2001 2:53 PM
> > To: Evan Nemerson; [EMAIL PROTECTED]
> > Subject: Re: [PHP] for loop problem?
> >
> >
> > To everyone that said it had something to do with the quotes:
> > that has nothing to do with it.
> >
> > When I first wrote this, It didn't have all the quotes.  It did the same
> > thing.  Then, I thought I may need some quotes somewhere, but that
> obviously
> > didn't help.  Any other suggestions?  If I HAVE to, I'll do this in
PERL,
> > but would much rather do it in PHP.
> >
> > Thanks everyone,
> > Tyler
> >
> > - Original Message -
> > From: "Evan Nemerson" <[EMAIL PROTECTED]>
> > To: "Tyler Longren" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Monday, November 12, 2001 9:41 PM
> > Subject: Re: [PHP] for loop problem?
> >
> >
> > > My word why all the quotes?
> > >
> > >  > > $connection = mysql_connect("blah","blah","blah");
> > > $db = mysql_select_db("db_to_use", $connection);
> > > $value1 = 100;
> > > $value2 = 1223109;
> > > for($i=$value1; $i<=$value2; $i++) {
> > >  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
> > >  if (mysql_error() != "") {
> > >   print "".mysql_error()."";
> > >   exit;
> > >  }
> > > }
> > > mysql_close($connection);
> > > ?>
> > >
> > > That should give you some better results.
> > >
> > >
> > > On Monday 12 November 2001 07:32 pm, you wrote:
> > > > Hello everyone,
> > > >
> > > > I have a pretty big list of codes that need to be put into a mysql
db.
> > The
> > > > numbers range from 100 to 1223109.  Here's the PHP I wrote to
put
> > these
> > > > codes into a database:
> > > >
> > > >  > > > $connection = mysql_connect("blah","blah","blah");
> > > > $db = mysql_select_db("db_to_use", $connection);
> > > > $value1 = "100";
> > > > $value2 = "1223109";
> > > > for($i="$value1"; $i<="$value2"; $i++) {
> > > >  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
> > > >  if (mysql_error() != "") {
> > > >   print "".mysql_error()."";
> > > >   exit;
> > > >  }
> > > > }
> > > > mysql_close($connection);
> > > > ?>
> > > >
> > > > Everytime I run this from a browser, it just keeps looping.  It
should
> > put
> > > > about 223109 entries into the "passcodes" table.  However, it just
> keeps
> > > > looping.  I'll end up with 400,000 or so entries before I stop it.
I
> > make
> > > > sure I empty that table before I start running it again.  Why is
this
> > > > happening?
> > > >
> > > > Thanks everyone,
> > > > Tyler
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-

[PHP] Query about parsing Word doc using PHP of RH Linux

2001-11-12 Thread fidodido

Hi all!
Is it possible to parse a MS Word document using PHP in a webserver using 
RH Linux?
Any exmaple on it?

Many thanks in advance. :)

Regards
fidodido


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] for loop problem?

2001-11-12 Thread Tyler Longren

Exact code:
".mysql_error()."";
  exit;
 }
}
mysql_close($connection);
?>

Tyler

- Original Message -
From: "Jack Dempsey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 10:34 PM
Subject: RE: [PHP] for loop problem?


> paste the complete code in and myself and others can run your exact copy
>
> -Original Message-
> From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 12, 2001 11:22 PM
> To: Martin Towell; [EMAIL PROTECTED]
> Subject: Re: [PHP] for loop problem?
>
>
> I removed all of the quotes that could be affecting it.  Still, it loops
> until I stop it.  I let it go all the way up to 350,000 or so.  Any other
> ideas anyone?
>
> Thank you!
> Tyler
>
> - Original Message -
> From: "Martin Towell" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, November 12, 2001 10:06 PM
> Subject: RE: [PHP] for loop problem?
>
>
> > hmmm... I just tried :
> >
> > $value1 = 100;
> > $value2 = 1223109;
> > for($i = $value1; $i <= $value2; $i++)
> > {
> >   echo "$i\n";
> > }
> >
> > and it spat out all 223109 numbers (albiet after a VERY long time)
> > can't see how adding mysql code would affect the loop...
> >
> > Martin T
> >
> > -Original Message-
> > From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, November 13, 2001 2:53 PM
> > To: Evan Nemerson; [EMAIL PROTECTED]
> > Subject: Re: [PHP] for loop problem?
> >
> >
> > To everyone that said it had something to do with the quotes:
> > that has nothing to do with it.
> >
> > When I first wrote this, It didn't have all the quotes.  It did the same
> > thing.  Then, I thought I may need some quotes somewhere, but that
> obviously
> > didn't help.  Any other suggestions?  If I HAVE to, I'll do this in
PERL,
> > but would much rather do it in PHP.
> >
> > Thanks everyone,
> > Tyler
> >
> > - Original Message -
> > From: "Evan Nemerson" <[EMAIL PROTECTED]>
> > To: "Tyler Longren" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Monday, November 12, 2001 9:41 PM
> > Subject: Re: [PHP] for loop problem?
> >
> >
> > > My word why all the quotes?
> > >
> > >  > > $connection = mysql_connect("blah","blah","blah");
> > > $db = mysql_select_db("db_to_use", $connection);
> > > $value1 = 100;
> > > $value2 = 1223109;
> > > for($i=$value1; $i<=$value2; $i++) {
> > >  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
> > >  if (mysql_error() != "") {
> > >   print "".mysql_error()."";
> > >   exit;
> > >  }
> > > }
> > > mysql_close($connection);
> > > ?>
> > >
> > > That should give you some better results.
> > >
> > >
> > > On Monday 12 November 2001 07:32 pm, you wrote:
> > > > Hello everyone,
> > > >
> > > > I have a pretty big list of codes that need to be put into a mysql
db.
> > The
> > > > numbers range from 100 to 1223109.  Here's the PHP I wrote to
put
> > these
> > > > codes into a database:
> > > >
> > > >  > > > $connection = mysql_connect("blah","blah","blah");
> > > > $db = mysql_select_db("db_to_use", $connection);
> > > > $value1 = "100";
> > > > $value2 = "1223109";
> > > > for($i="$value1"; $i<="$value2"; $i++) {
> > > >  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
> > > >  if (mysql_error() != "") {
> > > >   print "".mysql_error()."";
> > > >   exit;
> > > >  }
> > > > }
> > > > mysql_close($connection);
> > > > ?>
> > > >
> > > > Everytime I run this from a browser, it just keeps looping.  It
should
> > put
> > > > about 223109 entries into the "passcodes" table.  However, it just
> keeps
> > > > looping.  I'll end up with 400,000 or so entries before I stop it.
I
> > make
> > > > sure I empty that table before I start running it again.  Why is
this
> > > > happening?
> > > >
> > > > Thanks everyone,
> > > > Tyler
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] for loop problem?

2001-11-12 Thread Jack Dempsey

paste the complete code in and myself and others can run your exact copy

-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 12, 2001 11:22 PM
To: Martin Towell; [EMAIL PROTECTED]
Subject: Re: [PHP] for loop problem?


I removed all of the quotes that could be affecting it.  Still, it loops
until I stop it.  I let it go all the way up to 350,000 or so.  Any other
ideas anyone?

Thank you!
Tyler

- Original Message -
From: "Martin Towell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 10:06 PM
Subject: RE: [PHP] for loop problem?


> hmmm... I just tried :
>
> $value1 = 100;
> $value2 = 1223109;
> for($i = $value1; $i <= $value2; $i++)
> {
>   echo "$i\n";
> }
>
> and it spat out all 223109 numbers (albiet after a VERY long time)
> can't see how adding mysql code would affect the loop...
>
> Martin T
>
> -Original Message-
> From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 2:53 PM
> To: Evan Nemerson; [EMAIL PROTECTED]
> Subject: Re: [PHP] for loop problem?
>
>
> To everyone that said it had something to do with the quotes:
> that has nothing to do with it.
>
> When I first wrote this, It didn't have all the quotes.  It did the same
> thing.  Then, I thought I may need some quotes somewhere, but that
obviously
> didn't help.  Any other suggestions?  If I HAVE to, I'll do this in PERL,
> but would much rather do it in PHP.
>
> Thanks everyone,
> Tyler
>
> - Original Message -
> From: "Evan Nemerson" <[EMAIL PROTECTED]>
> To: "Tyler Longren" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Monday, November 12, 2001 9:41 PM
> Subject: Re: [PHP] for loop problem?
>
>
> > My word why all the quotes?
> >
> >  > $connection = mysql_connect("blah","blah","blah");
> > $db = mysql_select_db("db_to_use", $connection);
> > $value1 = 100;
> > $value2 = 1223109;
> > for($i=$value1; $i<=$value2; $i++) {
> >  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
> >  if (mysql_error() != "") {
> >   print "".mysql_error()."";
> >   exit;
> >  }
> > }
> > mysql_close($connection);
> > ?>
> >
> > That should give you some better results.
> >
> >
> > On Monday 12 November 2001 07:32 pm, you wrote:
> > > Hello everyone,
> > >
> > > I have a pretty big list of codes that need to be put into a mysql db.
> The
> > > numbers range from 100 to 1223109.  Here's the PHP I wrote to put
> these
> > > codes into a database:
> > >
> > >  > > $connection = mysql_connect("blah","blah","blah");
> > > $db = mysql_select_db("db_to_use", $connection);
> > > $value1 = "100";
> > > $value2 = "1223109";
> > > for($i="$value1"; $i<="$value2"; $i++) {
> > >  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
> > >  if (mysql_error() != "") {
> > >   print "".mysql_error()."";
> > >   exit;
> > >  }
> > > }
> > > mysql_close($connection);
> > > ?>
> > >
> > > Everytime I run this from a browser, it just keeps looping.  It should
> put
> > > about 223109 entries into the "passcodes" table.  However, it just
keeps
> > > looping.  I'll end up with 400,000 or so entries before I stop it.  I
> make
> > > sure I empty that table before I start running it again.  Why is this
> > > happening?
> > >
> > > Thanks everyone,
> > > Tyler
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] for loop problem?

2001-11-12 Thread Tyler Longren

I removed all of the quotes that could be affecting it.  Still, it loops
until I stop it.  I let it go all the way up to 350,000 or so.  Any other
ideas anyone?

Thank you!
Tyler

- Original Message -
From: "Martin Towell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 10:06 PM
Subject: RE: [PHP] for loop problem?


> hmmm... I just tried :
>
> $value1 = 100;
> $value2 = 1223109;
> for($i = $value1; $i <= $value2; $i++)
> {
>   echo "$i\n";
> }
>
> and it spat out all 223109 numbers (albiet after a VERY long time)
> can't see how adding mysql code would affect the loop...
>
> Martin T
>
> -Original Message-
> From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 2:53 PM
> To: Evan Nemerson; [EMAIL PROTECTED]
> Subject: Re: [PHP] for loop problem?
>
>
> To everyone that said it had something to do with the quotes:
> that has nothing to do with it.
>
> When I first wrote this, It didn't have all the quotes.  It did the same
> thing.  Then, I thought I may need some quotes somewhere, but that
obviously
> didn't help.  Any other suggestions?  If I HAVE to, I'll do this in PERL,
> but would much rather do it in PHP.
>
> Thanks everyone,
> Tyler
>
> - Original Message -
> From: "Evan Nemerson" <[EMAIL PROTECTED]>
> To: "Tyler Longren" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Monday, November 12, 2001 9:41 PM
> Subject: Re: [PHP] for loop problem?
>
>
> > My word why all the quotes?
> >
> >  > $connection = mysql_connect("blah","blah","blah");
> > $db = mysql_select_db("db_to_use", $connection);
> > $value1 = 100;
> > $value2 = 1223109;
> > for($i=$value1; $i<=$value2; $i++) {
> >  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
> >  if (mysql_error() != "") {
> >   print "".mysql_error()."";
> >   exit;
> >  }
> > }
> > mysql_close($connection);
> > ?>
> >
> > That should give you some better results.
> >
> >
> > On Monday 12 November 2001 07:32 pm, you wrote:
> > > Hello everyone,
> > >
> > > I have a pretty big list of codes that need to be put into a mysql db.
> The
> > > numbers range from 100 to 1223109.  Here's the PHP I wrote to put
> these
> > > codes into a database:
> > >
> > >  > > $connection = mysql_connect("blah","blah","blah");
> > > $db = mysql_select_db("db_to_use", $connection);
> > > $value1 = "100";
> > > $value2 = "1223109";
> > > for($i="$value1"; $i<="$value2"; $i++) {
> > >  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
> > >  if (mysql_error() != "") {
> > >   print "".mysql_error()."";
> > >   exit;
> > >  }
> > > }
> > > mysql_close($connection);
> > > ?>
> > >
> > > Everytime I run this from a browser, it just keeps looping.  It should
> put
> > > about 223109 entries into the "passcodes" table.  However, it just
keeps
> > > looping.  I'll end up with 400,000 or so entries before I stop it.  I
> make
> > > sure I empty that table before I start running it again.  Why is this
> > > happening?
> > >
> > > Thanks everyone,
> > > Tyler
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Flash and PHP loadvariablesnum

2001-11-12 Thread dharvell

I have a flash movie that is submitting to a PHP page using loadvariablenum
but after being submitted it opens a new window that displays the "print"
line that was supposed to go back to flash. does anyone have any ideas??


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Group by Howto

2001-11-12 Thread Martin Towell

a "control break" code it what your after

basically: 

$old_val = "";
for (??; ??; ??)
{
  $new_val = $place;  // however you get the next entry's place
  if ($new_val != $old_val)
  {
$old_val = $new_val;
echo $new_val;// obviously formatted...
  }
  echo $name;
}

now fill in the blanks

Martin T

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:58 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Group by Howto


I have a database with 2 colums in it
 
-|--|
Place of work| Name |
-|--|
 
I want to print out a listing of peoples name by the place their work from
a php script
 
so
 
Place 1

person a
person b
person c
 
Place 2
 
person d
 
Place 3
person F
person G
 
This has to be easy to do can anyone point me in the right direction...I
understand I have to use the group by clause I just don't know how to get
PHP to sort it
 
Michael


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



RE: [PHP] for loop problem?

2001-11-12 Thread Martin Towell

hmmm... I just tried :

$value1 = 100;
$value2 = 1223109;
for($i = $value1; $i <= $value2; $i++)
{
  echo "$i\n";
}

and it spat out all 223109 numbers (albiet after a VERY long time)
can't see how adding mysql code would affect the loop...

Martin T

-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:53 PM
To: Evan Nemerson; [EMAIL PROTECTED]
Subject: Re: [PHP] for loop problem?


To everyone that said it had something to do with the quotes:
that has nothing to do with it.

When I first wrote this, It didn't have all the quotes.  It did the same
thing.  Then, I thought I may need some quotes somewhere, but that obviously
didn't help.  Any other suggestions?  If I HAVE to, I'll do this in PERL,
but would much rather do it in PHP.

Thanks everyone,
Tyler

- Original Message -
From: "Evan Nemerson" <[EMAIL PROTECTED]>
To: "Tyler Longren" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 9:41 PM
Subject: Re: [PHP] for loop problem?


> My word why all the quotes?
>
>  $connection = mysql_connect("blah","blah","blah");
> $db = mysql_select_db("db_to_use", $connection);
> $value1 = 100;
> $value2 = 1223109;
> for($i=$value1; $i<=$value2; $i++) {
>  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
>  if (mysql_error() != "") {
>   print "".mysql_error()."";
>   exit;
>  }
> }
> mysql_close($connection);
> ?>
>
> That should give you some better results.
>
>
> On Monday 12 November 2001 07:32 pm, you wrote:
> > Hello everyone,
> >
> > I have a pretty big list of codes that need to be put into a mysql db.
The
> > numbers range from 100 to 1223109.  Here's the PHP I wrote to put
these
> > codes into a database:
> >
> >  > $connection = mysql_connect("blah","blah","blah");
> > $db = mysql_select_db("db_to_use", $connection);
> > $value1 = "100";
> > $value2 = "1223109";
> > for($i="$value1"; $i<="$value2"; $i++) {
> >  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
> >  if (mysql_error() != "") {
> >   print "".mysql_error()."";
> >   exit;
> >  }
> > }
> > mysql_close($connection);
> > ?>
> >
> > Everytime I run this from a browser, it just keeps looping.  It should
put
> > about 223109 entries into the "passcodes" table.  However, it just keeps
> > looping.  I'll end up with 400,000 or so entries before I stop it.  I
make
> > sure I empty that table before I start running it again.  Why is this
> > happening?
> >
> > Thanks everyone,
> > Tyler
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



[PHP] Group by Howto

2001-11-12 Thread lists

I have a database with 2 colums in it
 
-|--|
Place of work| Name |
-|--|
 
I want to print out a listing of peoples name by the place their work from
a php script
 
so
 
Place 1

person a
person b
person c
 
Place 2
 
person d
 
Place 3
person F
person G
 
This has to be easy to do can anyone point me in the right direction...I
understand I have to use the group by clause I just don't know how to get
PHP to sort it
 
Michael


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] for loop problem?

2001-11-12 Thread Tyler Longren

To everyone that said it had something to do with the quotes:
that has nothing to do with it.

When I first wrote this, It didn't have all the quotes.  It did the same
thing.  Then, I thought I may need some quotes somewhere, but that obviously
didn't help.  Any other suggestions?  If I HAVE to, I'll do this in PERL,
but would much rather do it in PHP.

Thanks everyone,
Tyler

- Original Message -
From: "Evan Nemerson" <[EMAIL PROTECTED]>
To: "Tyler Longren" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 9:41 PM
Subject: Re: [PHP] for loop problem?


> My word why all the quotes?
>
>  $connection = mysql_connect("blah","blah","blah");
> $db = mysql_select_db("db_to_use", $connection);
> $value1 = 100;
> $value2 = 1223109;
> for($i=$value1; $i<=$value2; $i++) {
>  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
>  if (mysql_error() != "") {
>   print "".mysql_error()."";
>   exit;
>  }
> }
> mysql_close($connection);
> ?>
>
> That should give you some better results.
>
>
> On Monday 12 November 2001 07:32 pm, you wrote:
> > Hello everyone,
> >
> > I have a pretty big list of codes that need to be put into a mysql db.
The
> > numbers range from 100 to 1223109.  Here's the PHP I wrote to put
these
> > codes into a database:
> >
> >  > $connection = mysql_connect("blah","blah","blah");
> > $db = mysql_select_db("db_to_use", $connection);
> > $value1 = "100";
> > $value2 = "1223109";
> > for($i="$value1"; $i<="$value2"; $i++) {
> >  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
> >  if (mysql_error() != "") {
> >   print "".mysql_error()."";
> >   exit;
> >  }
> > }
> > mysql_close($connection);
> > ?>
> >
> > Everytime I run this from a browser, it just keeps looping.  It should
put
> > about 223109 entries into the "passcodes" table.  However, it just keeps
> > looping.  I'll end up with 400,000 or so entries before I stop it.  I
make
> > sure I empty that table before I start running it again.  Why is this
> > happening?
> >
> > Thanks everyone,
> > Tyler
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] for loop problem?

2001-11-12 Thread Evan Nemerson

My word why all the quotes?

".mysql_error()."";
  exit;
 }
}
mysql_close($connection);
?>

That should give you some better results.


On Monday 12 November 2001 07:32 pm, you wrote:
> Hello everyone,
>
> I have a pretty big list of codes that need to be put into a mysql db.  The
> numbers range from 100 to 1223109.  Here's the PHP I wrote to put these
> codes into a database:
>
>  $connection = mysql_connect("blah","blah","blah");
> $db = mysql_select_db("db_to_use", $connection);
> $value1 = "100";
> $value2 = "1223109";
> for($i="$value1"; $i<="$value2"; $i++) {
>  mysql_query("INSERT INTO passcodes (passcode) VALUES ('P$i')");
>  if (mysql_error() != "") {
>   print "".mysql_error()."";
>   exit;
>  }
> }
> mysql_close($connection);
> ?>
>
> Everytime I run this from a browser, it just keeps looping.  It should put
> about 223109 entries into the "passcodes" table.  However, it just keeps
> looping.  I'll end up with 400,000 or so entries before I stop it.  I make
> sure I empty that table before I start running it again.  Why is this
> happening?
>
> Thanks everyone,
> Tyler

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] date conversion and calculation problem...

2001-11-12 Thread Martin Towell

Is this a direct copy of your code? if so, there's an error on this line

$t1 = mktime( $arr_time1[0], $arr_time1[1], $arr_time1[2], $arr_date1[1],
$arr_date1[1], $arr_date1[0] );

should be:

$t1 = mktime( $arr_time1[0], $arr_time1[1], $arr_time1[2], $arr_date1[1],
$arr_date1[2], $arr_date1[0] );

Martin T

-Original Message-
From: py [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:47 PM
To: [EMAIL PROTECTED]
Subject: [PHP] date conversion and calculation problem...


Hello,

I have 2 date string like this

$t1 = "2001-11-12 17:30:10";
$t2 = "2001-11-12 17:15:32";

I need to substracts the number of seconds from $t2 from $t1
(because after I have another script thats converts the number of seconds to
minutes, hours or days if necessary)

I tried: (but it does not give me something rigth)

$t1 = explode( " ", $t1 );
$t2 = explode( " ", $t2 );

// now $t1[0] contains date $t1[1] contains hours

$arr_date1 = explode( "-", $t1[0] );
$arr_date2 = explode( "-", $t2[0] );

$arr_time1 = explode( ":", $t1[1] );
$arr_time2 = explode( ":", $t2[1] );

// now $arr_time1[0] contains the hour, $arr_time1[1] contains minute,
$arr_time1[2] contains second
$t1 = mktime( $arr_time1[0], $arr_time1[1], $arr_time1[2], $arr_date1[1],
$arr_date1[1], $arr_date1[0] );
$t2 = mktime( $arr_time2[0], $arr_time2[1], $arr_time2[2], $arr_date2[1],
$arr_date2[2], $arr_date2[0] );

print "$t2 - $t1 = ". ( $t2 - $t1);

hope you can help me,

py


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



[PHP] Re: for loop problem?

2001-11-12 Thread jimmy elab

Tyler Longren wrote:
> Why is this happening?

Because you have double quotes in your for-statement.

Here's the way to do it (only relevant part copied) 

$value1 = 100;
$value2 = 1223109;
for($i=$value1; $i<=$value2; $i++) {

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] date conversion and calculation problem...

2001-11-12 Thread Jason Murray

> I have 2 date string like this
> 
> $t1 = "2001-11-12 17:30:10";
> $t2 = "2001-11-12 17:15:32";
> 
> I need to substracts the number of seconds from $t2 from $t1

First, convert them to unix time format:



So:



(apologies for stuff that doesn't work, I've coded this in
the email and not tested it :))

Jason

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] for loop problem?

2001-11-12 Thread Martin Towell

try removing the quotes and see if that works
eg
$value1 = "100";
becomes
$value1 = 100;

and
for($i="$value1"; $i<="$value2"; $i++) {
becomes
for($i=$value1; $i<=$value2; $i++) {

Martin T

-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:33 PM
To: PHP-General
Subject: [PHP] for loop problem?


Hello everyone,

I have a pretty big list of codes that need to be put into a mysql db.  The
numbers range from 100 to 1223109.  Here's the PHP I wrote to put these
codes into a database:

".mysql_error()."";
  exit;
 }
}
mysql_close($connection);
?>

Everytime I run this from a browser, it just keeps looping.  It should put
about 223109 entries into the "passcodes" table.  However, it just keeps
looping.  I'll end up with 400,000 or so entries before I stop it.  I make
sure I empty that table before I start running it again.  Why is this
happening?

Thanks everyone,
Tyler


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



[PHP] date conversion and calculation problem...

2001-11-12 Thread py

Hello,

I have 2 date string like this

$t1 = "2001-11-12 17:30:10";
$t2 = "2001-11-12 17:15:32";

I need to substracts the number of seconds from $t2 from $t1
(because after I have another script thats converts the number of seconds to
minutes, hours or days if necessary)

I tried: (but it does not give me something rigth)

$t1 = explode( " ", $t1 );
$t2 = explode( " ", $t2 );

// now $t1[0] contains date $t1[1] contains hours

$arr_date1 = explode( "-", $t1[0] );
$arr_date2 = explode( "-", $t2[0] );

$arr_time1 = explode( ":", $t1[1] );
$arr_time2 = explode( ":", $t2[1] );

// now $arr_time1[0] contains the hour, $arr_time1[1] contains minute,
$arr_time1[2] contains second
$t1 = mktime( $arr_time1[0], $arr_time1[1], $arr_time1[2], $arr_date1[1],
$arr_date1[1], $arr_date1[0] );
$t2 = mktime( $arr_time2[0], $arr_time2[1], $arr_time2[2], $arr_date2[1],
$arr_date2[2], $arr_date2[0] );

print "$t2 - $t1 = ". ( $t2 - $t1);

hope you can help me,

py


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] for loop problem?

2001-11-12 Thread Tyler Longren

Hello everyone,

I have a pretty big list of codes that need to be put into a mysql db.  The
numbers range from 100 to 1223109.  Here's the PHP I wrote to put these
codes into a database:

".mysql_error()."";
  exit;
 }
}
mysql_close($connection);
?>

Everytime I run this from a browser, it just keeps looping.  It should put
about 223109 entries into the "passcodes" table.  However, it just keeps
looping.  I'll end up with 400,000 or so entries before I stop it.  I make
sure I empty that table before I start running it again.  Why is this
happening?

Thanks everyone,
Tyler


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] fopen and paths

2001-11-12 Thread David Robley

On Tue, 13 Nov 2001 03:14, PACKER, Steffan wrote:
> I am trying to log particular information in an access log and I need
> it to be used on several pages all in different directories, I would
> like the actual log to be stored in a directory called data in the root
> directory of my web page. I using an include() on each page where I
> would like the info logged.
> I am using:
>   $log_fp = fopen("../data/access_log.txt", "a",1);
> with the use_include_path set to 1.
>
> My problem is that a new file is being created in each directory that
> the logging.inc file is added to.
>
> Can anyone help?
> Steffan

../data/access_log.txt seems to be a relative address to me, pointing to 
the directory data which hangs off the parent of the current directory.

Why not give full path information, so there is no ambiguity? Or use 
$DOCUMENT_ROOT for portability?

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Do the joke. Get the laugh. Move on.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP]

2001-11-12 Thread Jack Dempsey

you can set error_reporting(E_ALL)that will help...

-Original Message-
From: Alex Tenitsky [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 12, 2001 9:19 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP]


Hello,

I'm curious if there's anything in PHP 
like use strict in Perl.
It would save so much of development time!

Regards, Alexei Tenitski

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP versus all other languages

2001-11-12 Thread Pat Hanna

I'm doing my senior exit project on database languages online. I'm asking
for help from anyone who can provide any information on the comparison
between the different languages. I'm comparing languages such as PHP, ASP,
ColdFussion, perl and any others that I might not know about that you guys
might know. Thank you to anyone who helps me out in the least.

Patrick

--
Database integration--E-commerce solutions
The Wentworth Company

Get paid cash every time you receive email!
Sign up FREE at: http://www.MintMail.com/?m=1080349



Re: [PHP]

2001-11-12 Thread Alex Tenitsky

Hello,

I'm curious if there's anything in PHP 
like use strict in Perl.
It would save so much of development time!

Regards, Alexei Tenitski

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Question....

2001-11-12 Thread Christopher William Wesley

try not setting the domain.

~Chris   /"\
 \ / September 11, 2001
  X  We Are All New Yorkers
 / \ rm -rf /bin/laden

On Tue, 13 Nov 2001, Chris Kay wrote:

>
> I have a simple question that bugging me..
>
> I have a site which I am designing with users auth, I have decided to use
> cookies as I need to store variables after the user leave the site..
>
> Problem I am having is the domain I set it on,
>
> If the user logs into http://www.mysite.com and later logs into
> http://mysite.com without the www the cookie will not work..
>
> Is this because I am setting the domain wrong?
>
> I have tried
>
>   ".mysite.com"
>   "mysite.com"
>   "$HTTP_HOST"
>   ""
>
> Is some1 able to point me in the right direction


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Question....

2001-11-12 Thread Chris Kay


I have a simple question that bugging me..

I have a site which I am designing with users auth, I have decided to use
cookies as I need to store variables after the user leave the site..

Problem I am having is the domain I set it on,

If the user logs into http://www.mysite.com and later logs into
http://mysite.com without the www the cookie will not work..

Is this because I am setting the domain wrong?

I have tried

".mysite.com"
"mysite.com"
"$HTTP_HOST"
""

Is some1 able to point me in the right direction



 Chris Kay - Tech Support - IDEAL Internet
email: [EMAIL PROTECTED] phone: +61 2 4628  fax: +61 2 4628 8890


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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

2001-11-12 Thread Christopher William Wesley

Your problem probably is including the miec.php from the .shtml
document.  Does the .shtml document send any output to the browser before
including your .php script?  If so, you're not going to be able to send
any cookies from the .php script.  Once any standard output makes it to
the browser (including any leading whitespace), no more headers can be
sent to the browser.  PHP sends cookies to the browser as header data.
Hence, if your .shtml document has any output before your .php document is
included, your session cookie cannot be sent.

~Chris   /"\
 \ / September 11, 2001
  X  We Are All New Yorkers
 / \ rm -rf /bin/laden

On Mon, 12 Nov 2001, Christian Dechery wrote:

> I've recently had a problem with sessions, and came up with a problem that
> apparently has no solution...
>
> I want to understand why EXACTLY it does't work...
>
>  From what I understand about sessions (reading PHP Docs), cookies are
> default and URLs holding the session_id are used if the cookies can be used
> to get the current session_id right?
>
> So if, there's a cookie indicating a session, PHP will detect it and the
> session will work beatifully..
> If when a session is created, a cookie cannot be set, then the URLs come
> into play.. right?
>
> -- I'm I right so far? --
>
> So, I can only presume, that whenever I can see those URLs with
> session_ids, this means that no cookie was created... and if one of those
> URLs is clicked, the session will persist, since the URL is carrying the
> session_id.
>
> Well, now to the problem with no solution... I've described it here on the
> list a couple of times... sorry if this is getting too annoying.
>
> 1 - I have a PHP script, that uses sessions, it's called miec.php
>   miec.php uses both cookies and sessions... the cookie holds the
> user_id and the session holds an array of every
>   product the user has seen, so they won't repeat... of course, the
> session only gets initialized if the cookie with the
>   user id is found... if not, a login form is shown...
> 2 - I have a html file, demo.shtml, which with SSI includes miec.php
>   The inclusion works fine, even the cookie with the user id gets
> detected and the username is shown as expected
>
> Now, the problem. If I run miec.php solo on the browser, everything works
> perfectly.
> But if I call demo.shtml, something goes wrong, and I want to know what.
>
> When demo.shtml is called, the cookie works (the user id is detected) and
> the session gets started. I can see the URLs with the session id AND the
> session file in my webserver. The problem is that, the session doesn't
> persist, each time I reload demo.sthml, a new session is created.
>
> Now get this... if I call miec.php and then demo.shtml, everything works.
> Why? My guess is, miec.php running solo is able to create the cookie with
> the session id, while when SSI included it can't, which explain the URLs.
>
> Obviously, URLs (example: demo.shtml?sID=3897348734) aren't helpful here,
> since it's a html file, and it can't parse the query string to send the
> variable to an SSI included php file.
>
> But why the cookie can't be created? Headers aren't the problem... if a
> session can be created and the session vars registered it's because the
> headers have not been sent, so why can't a cookie be created in this
> conditions.
>
> Does anyone has a clue??
>
> p.s: the problem is solved, I force the user to login in case of miec.php
> is SSI included, which works, since the session is created elsewhere
> (login.php).
>
> _
> . Christian Dechery
> . . Gaita-L Owner / Web Developer
> . . http://www.webstyle.com.br
> . . http://www.tanamesa.com.br
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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

2001-11-12 Thread Christian Dechery

I've recently had a problem with sessions, and came up with a problem that 
apparently has no solution...

I want to understand why EXACTLY it does't work...

 From what I understand about sessions (reading PHP Docs), cookies are 
default and URLs holding the session_id are used if the cookies can be used 
to get the current session_id right?

So if, there's a cookie indicating a session, PHP will detect it and the 
session will work beatifully..
If when a session is created, a cookie cannot be set, then the URLs come 
into play.. right?

-- I'm I right so far? --

So, I can only presume, that whenever I can see those URLs with 
session_ids, this means that no cookie was created... and if one of those 
URLs is clicked, the session will persist, since the URL is carrying the 
session_id.

Well, now to the problem with no solution... I've described it here on the 
list a couple of times... sorry if this is getting too annoying.

1 - I have a PHP script, that uses sessions, it's called miec.php
  miec.php uses both cookies and sessions... the cookie holds the 
user_id and the session holds an array of every
  product the user has seen, so they won't repeat... of course, the 
session only gets initialized if the cookie with the
  user id is found... if not, a login form is shown...
2 - I have a html file, demo.shtml, which with SSI includes miec.php
  The inclusion works fine, even the cookie with the user id gets 
detected and the username is shown as expected

Now, the problem. If I run miec.php solo on the browser, everything works 
perfectly.
But if I call demo.shtml, something goes wrong, and I want to know what.

When demo.shtml is called, the cookie works (the user id is detected) and 
the session gets started. I can see the URLs with the session id AND the 
session file in my webserver. The problem is that, the session doesn't 
persist, each time I reload demo.sthml, a new session is created.

Now get this... if I call miec.php and then demo.shtml, everything works. 
Why? My guess is, miec.php running solo is able to create the cookie with 
the session id, while when SSI included it can't, which explain the URLs.

Obviously, URLs (example: demo.shtml?sID=3897348734) aren't helpful here, 
since it's a html file, and it can't parse the query string to send the 
variable to an SSI included php file.

But why the cookie can't be created? Headers aren't the problem... if a 
session can be created and the session vars registered it's because the 
headers have not been sent, so why can't a cookie be created in this 
conditions.

Does anyone has a clue??

p.s: the problem is solved, I force the user to login in case of miec.php 
is SSI included, which works, since the session is created elsewhere 
(login.php).

_
. Christian Dechery
. . Gaita-L Owner / Web Developer
. . http://www.webstyle.com.br
. . http://www.tanamesa.com.br


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Serial Port Programing

2001-11-12 Thread Yasuo Ohgaki

Mark wrote:

> On Mon, 12 Nov 2001 12:36:07 -0500, Brian C. Doyle wrote:
> 
>>Hello all,
>>
>>Does PHP have the ability to control a serial port?  I see we can
>>use the
>>Printer but that was All I saw.
>>
> 
> I don't know about windows but on linux I guess you would just fopen
> /dev/ttyS0 and read or write to it.
> 


Make sure your serial interface supports hardware flow control. 
PHP is not enough for handling software flow control...
(Almost all serial interface supports h/w flow control, though :)

--
Yasuo Ohgaki




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: possible safe mode bug with opendir() ?

2001-11-12 Thread Yasuo Ohgaki

Yasuo Ohgaki wrote:

> [EMAIL PROTECTED] wrote:
>> It happens on our system that there will never be any files owned by
>> user A under a directory owned by user B. But even if there were, I think
>> safe mode should disallow this type of filesystem reading.
> 
> Under UNIX like systems, /tmp is world writable and everyone on the 
> system can open dir/wirte/read files, but it's possible to secure 
> files/directory under /tmp. I think you can apply the same.
> 
> GID support also helps to allow opening files certain group.
> Is it not enough for your security needs?
> 

BTW, if you get rid of read permission for a directory, directory 
listing is not possible under UNIX like systems. You can still 
read/write files with proper permission. (unlink/create files with 
proper permission also. You can get rid of write permission for 
directory, too.)

Just in case, you didn't know about it :)

php.ini entries like

safe_mode_opendir_sid
safe_mode_opendir_gid

will help to improve security still.
I just don't need this kind of feature, but others may need it.

--
Yasuo Ohgaki


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: possible safe mode bug with opendir() ?

2001-11-12 Thread Yasuo Ohgaki

[EMAIL PROTECTED] wrote:

> Hi again,
> 
> I believe it should disallow openning a directory in safe mode if the UID
> of the directory does not match the UID of the PHP script.
> 
> That is exactly the behavior of fopen() in safe mode.

> Without that behavior, users are permitted to write a PHP script that lets

> them crawl around the webserver seeing things they have no rights to see.


Now I see what you want :)

 
> It happens on our system that there will never be any files owned by
> user A under a directory owned by user B. But even if there were, I think
> safe mode should disallow this type of filesystem reading.


Under UNIX like systems, /tmp is world writable and everyone on 
the system can open dir/wirte/read files, but it's possible to 
secure files/directory under /tmp. I think you can apply the same.

GID support also helps to allow opening files certain group.
Is it not enough for your security needs?

> 
> Do you think the fact that this file reading is permitted is a bug that
> should be reported?
> 

I think the feature that check dir UID/GID will be useful for some 
prople. How about submit a feature request (It's one of bug report 
types)

BTW, you have opotion that disallow opendir at all, with 
disable_functions directive in php.ini

--
Yasuo Ohgaki


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] XML DTD

2001-11-12 Thread Brian White

Here's a DTD:



]>

Whether it is of any USE to anyone is debatable..



At 12:41 12/11/2001 -0500, Melih Onvural wrote:
>I know this is a PHP news group, but i've seen some XML questions before and
>I was
>wondering if anyone knew how to apply a DTD, or where to find one. thanks
>for any
>help,
>
>Melih Onvural
>[EMAIL PROTECTED]
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

-
Brian White
Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
Phone: +612-93197901
Web:   http://www.steptwo.com.au/
Email: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] using mail

2001-11-12 Thread Jeff Lewis

I COULD be wrong but wasn't Kurt the guy who posted frequent questions like
this when he was starting off? :)

Jeff
- Original Message -
From: "Kurt Lieber" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 5:55 PM
Subject: Re: [PHP] using mail


> Did you RTFM?
>
> http://www.php.net/manual/en/function.mail.php
>
> Just create a variable and input it as an extra header.
>
> $from = "from: [EMAIL PROTECTED]\r\n" ;
>
> mail($to,$subject,$message,$from);
>
> On Monday 12 November 2001 02:41 pm, you wrote:
> > Hello,
> >
> > I am using the mail() function right now to send e-mails.  Is there a
> > way I can dynamically change where it says the e-mail is from?
> >
> > Thanks
> > Brandon
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: GURU HELP: session_unset

2001-11-12 Thread John Taylor-Johnston

Source is here:

> http://www.CollegeSherbrooke.qc.ca/~languesmodernes/course/test_session.phps
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] using mail

2001-11-12 Thread Jason Murray

Then why didn't you notice that in the additional headers
you can specify the from header?

mail("[EMAIL PROTECTED]", "Whee", "Whee! Mail Body",
 "From: Jason Murray <[EMAIL PROTECTED]>\n");

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
"Work now, freak later!"

> -Original Message-
> From: Brandon Orther [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 9:52 AM
> To: PHP User Group
> Subject: RE: [PHP] using mail
> 
> 
> YES I DID READ THE F...in MANUAL
> 
> -Original Message-
> From: Kurt Lieber [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, November 12, 2001 2:56 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] using mail
> 
> Did you RTFM?
> 
> http://www.php.net/manual/en/function.mail.php
> 
> Just create a variable and input it as an extra header.
> 
> $from = "from: [EMAIL PROTECTED]\r\n" ;
> 
> mail($to,$subject,$message,$from);
> 
> On Monday 12 November 2001 02:41 pm, you wrote:
> > Hello,
> >
> > I am using the mail() function right now to send e-mails.  
> Is there a
> > way I can dynamically change where it says the e-mail is from?
> >
> > Thanks
> > Brandon
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] using mail

2001-11-12 Thread Brandon Orther

YES I DID READ THE F...in MANUAL

-Original Message-
From: Kurt Lieber [mailto:[EMAIL PROTECTED]] 
Sent: Monday, November 12, 2001 2:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] using mail

Did you RTFM?

http://www.php.net/manual/en/function.mail.php

Just create a variable and input it as an extra header.

$from = "from: [EMAIL PROTECTED]\r\n" ;

mail($to,$subject,$message,$from);

On Monday 12 November 2001 02:41 pm, you wrote:
> Hello,
>
> I am using the mail() function right now to send e-mails.  Is there a
> way I can dynamically change where it says the e-mail is from?
>
> Thanks
> Brandon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] using mail

2001-11-12 Thread Kurt Lieber

Did you RTFM?

http://www.php.net/manual/en/function.mail.php

Just create a variable and input it as an extra header.

$from = "from: [EMAIL PROTECTED]\r\n" ;

mail($to,$subject,$message,$from);

On Monday 12 November 2001 02:41 pm, you wrote:
> Hello,
>
> I am using the mail() function right now to send e-mails.  Is there a
> way I can dynamically change where it says the e-mail is from?
>
> Thanks
> Brandon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php slowdown under apache on win 2000 only under netscape

2001-11-12 Thread Steve Knipping

I've noticed this same problem on both of my computers, but have not
yet found a solution.  I've got Apache, Mysql, and php running on my
personal computer.  When I access it via http://localhost any screens
that use a POST will timeout until I ALT-TAB to a non-Netscape window. 
Once I ALT-TAB, or mouse click a different window, the Netscape
localhost issue resolves itself, the variables POST just fine, and my
page displays.

This problem does not happen in IE.

Very strange.
-Steve


"Laurence Gordon" <[EMAIL PROTECTED]> wrote:
>
> Actually I kind of made the problem go away, but I don't know why...
> I reduced the priority of the netscape process to Below Normal and it
works
> fine.  Why would netscape take up so much of the cpu?
> 
> Larry
> 
> ""Laurence Gordon"" <[EMAIL PROTECTED]> wrote in message
> 9c7b2h$qcp$[EMAIL PROTECTED]">news:9c7b2h$qcp$[EMAIL PROTECTED]...
> > Hi,
> >
> > My problem is that my local apache 1.3.19 server running under
windows
> 2000
> > on a LAN has slow execution issues.  When I submit a form with POST
> > variables, the script takes forever and a day to execute, sometimes
> > returning after 15 seconds, sometimes hitting a max execution time.
 This
> > behavior is not seen under IE and is not seen when the scripts are
running
> > from a freeBSD platform through netscape.
> >
> > software:
> > windows 2000 pro sp1
> > php 4.0.4pl1
> > apache 1.3.19
> > mysql 3.23.33
> > all installed from binaries.
> >
> > Thanks in advance,
> > Larry
> >
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> >
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> 
> 

--

ls

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] using mail

2001-11-12 Thread Martin Towell

oops, "forst" is meant to be "forth"

-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 9:44 AM
To: 'Brandon Orther'; PHP User Group
Subject: RE: [PHP] using mail


the forst param to mail is the extra headers to send
add in "Reply-To: [EMAIL PROTECTED]\r\n"
and/or "From: [EMAIL PROTECTED]\r\n"  ( I think this one's correct )

-Original Message-
From: Brandon Orther [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 9:41 AM
To: PHP User Group
Subject: [PHP] using mail


Hello,
 
I am using the mail() function right now to send e-mails.  Is there a
way I can dynamically change where it says the e-mail is from?
 
Thanks
Brandon



RE: [PHP] using mail

2001-11-12 Thread Martin Towell

the forst param to mail is the extra headers to send
add in "Reply-To: [EMAIL PROTECTED]\r\n"
and/or "From: [EMAIL PROTECTED]\r\n"  ( I think this one's correct )

-Original Message-
From: Brandon Orther [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 9:41 AM
To: PHP User Group
Subject: [PHP] using mail


Hello,
 
I am using the mail() function right now to send e-mails.  Is there a
way I can dynamically change where it says the e-mail is from?
 
Thanks
Brandon



[PHP] using mail

2001-11-12 Thread Brandon Orther

Hello,
 
I am using the mail() function right now to send e-mails.  Is there a
way I can dynamically change where it says the e-mail is from?
 
Thanks
Brandon



[PHP] GURU HELP: session_unset

2001-11-12 Thread John Taylor-Johnston

http://www.CollegeSherbrooke.qc.ca/~languesmodernes/course/test_session.phps

I'm trying to "session_unset()" - it worked I thought.

session_unset("postcard");
unset($postcard);
unset($MyImage);

Go to:
http://www.CollegeSherbrooke.qc.ca/~languesmodernes/course/test_session.php
and "click me".

It sets a session, displays an image, and then is supposed to destroy
itself so that when I go back to
http://www.CollegeSherbrooke.qc.ca/~languesmodernes/course/test_session.php
(and or reload
http://www.CollegeSherbrooke.qc.ca/~languesmodernes/course/test_session.php)
I should see the text/html header and not an image/png header.

The only way to right myself is to exit Netscape altogether.

I have tried session_destroy() session_unregister and even
session_write_close - not that any of those worked. I consulted the
online manual and thought this would be enough:

session_unset("postcard");
unset($postcard);
unset($MyImage);

I have even used the echo on line 3 to prove to myself that my session
terminated itself.

I believe the session terminates, but for what ever reason,
http://www.CollegeSherbrooke.qc.ca/~languesmodernes/course/test_session.php
is still receiving header("Content-type: image/png") and not
header("Content-type: text/html")

Can someone help?

John
(Post & reply would be helpful please.)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




PD: [PHP] javascript problems

2001-11-12 Thread Teqila MAN

Hi all,

 Could someone send me URL for JavaScript help list  like this on php3..
..or you could solve my problem ?


---
Here is part of scriptand the problemat the end
-
function checkChoice(whichbox) {

with (whichbox.form) {
if (whichbox.checked == false)
hiddentotal.value = eval(hiddentotal.value) - eval(whichbox.value);

else
hiddentotal.value = eval(hiddentotal.value) + eval(whichbox.value);
hiddentotal2.value = eval(hiddentotal.value)*;
return(formatCurrency(hiddentotal.value));

   }

}


The first checkbox is "Special"...i press it...


the value is send to the total counter. next it the form are those eleme
nts :





How to make a restriction that if you selected Special checkbox you cannot p
ress the 114 and 333 ..some alert box...i cannot make this...

Very glad if someone could help me


TeqilaMan



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Serial Port Programing

2001-11-12 Thread Mark

On Mon, 12 Nov 2001 12:36:07 -0500, Brian C. Doyle wrote:
>Hello all,
>
>Does PHP have the ability to control a serial port?  I see we can
>use the
>Printer but that was All I saw.

I don't know about windows but on linux I guess you would just fopen
/dev/ttyS0 and read or write to it.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHPINTERNATIONAL.COM

2001-11-12 Thread Mark

It's not bad enough that you're squatting the domain, you have to
spam the list on top of it?

On Mon, 12 Nov 2001 11:37:32 -0800, Mark Segal wrote:
>Dear Sir/Madam,
>
>PHPINTERNATIONAL.COM  - $725
>
>- includes 5 year registration (until 2006 worth up to $150*)
>
>I am a domain name broker and have been tracking
>PHPINTERNATIONAL.COM which expired and became available for a very
>short period today. I registered it on behalf of a client, however,
>on contacting this client to notify her of this successful
>registration she informed me that she will not be proceeding with
>her venture.
>
>If you have an interest in acquiring this domain, please contact me
>at your earliest convenience. I will be contacting anyone who I feel
>may have an interest and have priced it for a quick sale.
>
>All transactions are 100% secure and are transacted with the largest
>e-commerce company on the net. The transfer process is extremely
>simple and you can also be confident that with Namegiant.com, you
>are dealing with a reputable company and will receive all the
>assistance and support that you may require throught any transfer
>process - and beyond.
>
>If this email is of no interest, I apologize for this intrusion and
>can assure you you will not be mailed again. This is a one-off
>approach because we felt this development could be of geuine
>interest to you and your company - if it isn't, once again, please
>let me convey our sincere apologies.
>
>Kind regards,
>
>Julia
>Admin
>Namegiant.com
>www.namegiant.com
>
>* based on the $30 per year that many top registrars charge to
>extend the registration period and "park" the domain.
>
>Please note that the whois system takes a couple of days to update
>before it will be reflecting our registration. Thank you



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: session

2001-11-12 Thread Brendon

well i have a solution to my problem that makes no sense

if i declare

session_start();

on my login.html page which precedes these two pages it works and is now
login.php

this page creates the session and all is well if i create session_start();
on the next page and leave it off my login.php page  i get multiple
sessions. I cannot find any reason behind this and no one seems to have any
idea what i am talking about

Thanks anyway
Brendon


"Brendon" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am using PHP 4.06, IE 6 and Win 2000.
>
> When i register a session like so:
>
> session_start();
> session_register("SESSION_UserID");
>
>
> and on the next page refer to the session:
>
> session_start();
> if(!session_is_registered("SESSION_UserID"))
> {
>
> header("Location: error.php?ec=1");
> exit;
> }
>
> ?>
>
> It registers a new session:
> I then have a session as so in the sessons directory:
> SESSION_UserID|s:1:"1";SESSION_UPERMS|s:1:"1";
> and a blank new one.
>
> any ideas?
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Getting uploaded filename & directory

2001-11-12 Thread Luboslav Gabal ml.

> In setting up a form to allow a user to upload a file,
> upon submission of that form, you can get the actual
> file name that is being uploaded by accessing the
> variable:
> 
> $userfile_name
> 
> (assuming the form element's name where the user
> specifies the file is "$userfile").
> 
> Is there a way to get the full path as well?  ie:
> 
> "c:\program files\this directory\uploaded_file.txt"
> 
> ?  I tried echoing out $userfile to no avail.  I also tried
> some javascript that when the form was submitted,
> the value for the userfile element was copied to a hidden
> form element, but that didn't work either.
> 
> Any ideas? Suggestions?

It's not very secure, I think it isn't possible to get a full path 

Lubo Gabal


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] problems with php and jscript....

2001-11-12 Thread Silvia Mahiques


I have written an html page with jscript and php code, but I have some problems. 
The errors are in black letter: why is not correct this code?





















 
  
   

 


  .








If somebody has an idea, please, help me




Silvia Mahiques



[PHP] Re: Destroying Session Prob

2001-11-12 Thread dav

Try a more simple:
");
?>
"Joe Van Meer" <[EMAIL PROTECTED]> ha scritto nel messaggio
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>Hi again, I've just completed my logout process, everything is going
> great but after I log out (logout.php has session_start() followed by
> session_destroy(). )
> I get two weird symbols printing out. One is like a box and the a "B". My
> code is below.
>
> 
>
>  session_destroy();
> print "You are now logged off." & ""
> ?>
>
>
> Any ideas why I'm getting these 2 symbols printing out?
>
> Thx Joe :)
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re[2]: [PHP] Help me to win the battle with browser's cache

2001-11-12 Thread Olexandr Vynnychenko

Hello Girish,

Monday, November 12, 2001, 4:29:55 PM, you wrote:

GN> Hi

GN> I've found some code which i put it into this function. I've never got the
GN> meta tag technique to work but this seems to do the trick.

GN> Call noCache() before outputting anything to the page.

GN> function noCache() {
GN> header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");// Date in the past
GN> header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always
GN> modified
GN> header ("Cache-Control: no-cache, must-revalidate");  file://HTTP/1.1
GN> header ("Pragma: no-cache");  // HTTP/1.0
GN> }

Thanks! That's what I've been looking for. But there is something
wrong with this headers. I pasted the code above, and peges really
stopped loading from cache. But... I tested it with IE 5.5 SP2 and
Netscape 4.77 (I don't use Netscape 6.x because it's just useless
cputime eater). The page works fine with Navigator, but IE shows blank
page each time I click a link. It shows the page properly only after
clicking Refresh. I remember I have the same problem 1/2 year ago when
I was unsuccesfully tried to win the battle with the browser cache :).
Now I commented the 3rd header (with "cache-control"), and now IE
works perfect too. I don't know why it works on your pages :). The
problem is not in my personal IE because the same problem was (as I
said) whan I used IE 5.0.
So, if there are some people who have the same problem, I would
suggest to put these 3 lines on the top of the page:

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Pragma: no-cache");

Thanks to Girish and others who tried to help me!

P.S. There can be another problem: client's clock. If it's 20 Jan 1985
on client's machine, than ... Do you think I can put in the first
header some very old date like 1 Jan 1970? I just want it to work in
any case.

-- 
Best regards,
 Olexandrmailto:[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHPINTERNATIONAL.COM

2001-11-12 Thread Mark Segal

Dear Sir/Madam, 

PHPINTERNATIONAL.COM  - $725

- includes 5 year registration (until 2006 worth up to $150*) 

I am a domain name broker and have been tracking PHPINTERNATIONAL.COM which expired 
and became available for a very short period today. I registered it on behalf of a 
client, however, on contacting this client to notify her of this successful 
registration she informed me that she will not be proceeding with her venture. 

If you have an interest in acquiring this domain, please contact me at your earliest 
convenience. I will be contacting anyone who I feel may have an interest and have 
priced it for a quick sale. 

All transactions are 100% secure and are transacted with the largest e-commerce 
company on the net. The transfer process is extremely simple and you can also be 
confident that with Namegiant.com, you are dealing with a reputable company and will 
receive all the assistance and support that you may require throught any transfer 
process - and beyond. 

If this email is of no interest, I apologize for this intrusion and can assure you you 
will not be mailed again. This is a one-off approach because we felt this development 
could be of geuine interest to you and your company - if it isn't, once again, please 
let me convey our sincere apologies. 

Kind regards, 

Julia
Admin  
Namegiant.com 
www.namegiant.com 

* based on the $30 per year that many top registrars charge to extend the registration 
period and "park" the domain.

Please note that the whois system takes a couple of days to update before it will be 
reflecting our registration. Thank you 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Destroying Session Prob

2001-11-12 Thread Joe Van Meer

   Hi again, I've just completed my logout process, everything is going
great but after I log out (logout.php has session_start() followed by
session_destroy(). )
I get two weird symbols printing out. One is like a box and the a "B". My
code is below.



"
?>


Any ideas why I'm getting these 2 symbols printing out?

Thx Joe :)



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Getting uploaded filename & directory

2001-11-12 Thread Christopher William Wesley

If the path doesn't ride along in the _name variable (and I don't know of
a case when it would), Nope.  The value of the input element when the type
= file isn't useable, except as an initial file name, so using JavaScript
won't be helpful.

I think the input element is implemented for type = file that way on
purpose.  Providing user/visitor filesystem information is a
privacy/security risk.  Your last chance to get the path info would be to
ask the user to explicitly put it into a text form field ;)

~Chris   /"\
 \ / September 11, 2001
  X  We Are All New Yorkers
 / \ rm -rf /bin/laden

On Mon, 12 Nov 2001, Boget, Chris wrote:

> In setting up a form to allow a user to upload a file,
> upon submission of that form, you can get the actual
> file name that is being uploaded by accessing the
> variable:
>
> $userfile_name
>
> (assuming the form element's name where the user
> specifies the file is "$userfile").
>
> Is there a way to get the full path as well?  ie:
>
> "c:\program files\this directory\uploaded_file.txt"
>
> ?  I tried echoing out $userfile to no avail.  I also tried
> some javascript that when the form was submitted,
> the value for the userfile element was copied to a hidden
> form element, but that didn't work either.
>
> Any ideas? Suggestions?
>
> Chris
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Cookies, Sessions and Login Proceess

2001-11-12 Thread Joe Van Meer

Thanx a bunch you guys! Got my login process going the way I wanted it. I
appreciate your help, as I['m new to php. The first of many questions I
suppose :)
Cheers Joe


"Christopher William Wesley" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Mon, 12 Nov 2001, Joe Van Meer wrote:
>
> > Thx Christopher for replying. Ok, let me see if I understand you
> > correctly...
> >
> > The user enters username and password on index.php, this is posted to
> > login.php. On login.php after I verify the user is who he/she says they
are
> > I set a cookie called "accessedbefore" to "yes" and redirect them to the
>
> Exactly.
>
> > main page. Am I allowed to set a cookie and redirect them after
determining
> > who the user is? How would I redirect them after setting the cookie?
Header
>
> You can set a cookie any time before any standard output is sent to the
> browser (and before you send a new Location header).
>
> Your login.php can look something like this (with pseudo-ish code) ...
>
>  $input_ok = validate_user_input( $username, $password );
> if( $input_ok ){
> $user_ok = authenticate_user( $username, $password );
> if( $user_ok ){
> setcookie( "myuser", "ok", time()+7200, "/" );
> header( "Location: congratulations.html" );
> } else {
> header( "Location: go_away.html" );
> }
> } else {
> header( "Location: go_away.html" );
> }
> ?>
>
>
> ~Chris   /"\
>  \ / September 11, 2001
>   X  We Are All New Yorkers
>  / \ rm -rf /bin/laden
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] XML DTD

2001-11-12 Thread Egon Schmid

From: "Melih Onvural" <[EMAIL PROTECTED]>

> I know this is a PHP news group, but i've seen some XML questions
before and
> I was
> wondering if anyone knew how to apply a DTD, or where to find one.
thanks
> for any
> help,

This is not a newsgroup it is a mailing list. We use the DocBook XML
DTD to produce the PHP manuals. You can find a copy of it at
http://www.oasis-open.org/ or http://nwalsh.com/

-Egon


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Getting uploaded filename & directory

2001-11-12 Thread Boget, Chris

In setting up a form to allow a user to upload a file,
upon submission of that form, you can get the actual
file name that is being uploaded by accessing the
variable:

$userfile_name

(assuming the form element's name where the user
specifies the file is "$userfile").

Is there a way to get the full path as well?  ie:

"c:\program files\this directory\uploaded_file.txt"

?  I tried echoing out $userfile to no avail.  I also tried
some javascript that when the form was submitted,
the value for the userfile element was copied to a hidden
form element, but that didn't work either.

Any ideas? Suggestions?

Chris



Re: [PHP] url extracting

2001-11-12 Thread Matt McClanahan

On Mon, Nov 12, 2001 at 04:42:08PM -, Caspar Kennerdale wrote:

> I am yrying to read free urls from a moreover.com to a director app which
> will be a news reader without a browser
> 
> 'm using php top extrat the headlines
> 
> each headline looks similar to this
> 
> ("http://c.moreover.com/click/here.pl?l27536670";)
> 
> 
> If a browser goes to this page then it is redirected to the appropriate page
> ie www.newssite.com/etc/etc/etc
> 
> Director does not interpret the redirection.
> 
> Can anyone think of a way for a script to go the to the moreover link and
> then return the 'real url as a variable or as an array of links (if multiple
> headlines are required

You can open a socket to the web server with PHP and grab the Location
header from the response.

See the fsockopen() man page for examples, or sendtohost.txt for a
simple function to handle passing the right headers.

http://www.php.net/manual/en/function.fsockopen.php
http://dodds.net/~cardinal/sendtohost.txt

Matt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] XML DTD

2001-11-12 Thread Melih Onvural

I know this is a PHP news group, but i've seen some XML questions before and
I was
wondering if anyone knew how to apply a DTD, or where to find one. thanks
for any
help,

Melih Onvural
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Cookies, Sessions and Login Proceess

2001-11-12 Thread Christopher William Wesley

On Mon, 12 Nov 2001, Joe Van Meer wrote:

> Thx Christopher for replying. Ok, let me see if I understand you
> correctly...
>
> The user enters username and password on index.php, this is posted to
> login.php. On login.php after I verify the user is who he/she says they are
> I set a cookie called "accessedbefore" to "yes" and redirect them to the

Exactly.

> main page. Am I allowed to set a cookie and redirect them after determining
> who the user is? How would I redirect them after setting the cookie? Header

You can set a cookie any time before any standard output is sent to the
browser (and before you send a new Location header).

Your login.php can look something like this (with pseudo-ish code) ...




~Chris   /"\
 \ / September 11, 2001
  X  We Are All New Yorkers
 / \ rm -rf /bin/laden


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: possible safe mode bug with opendir() ?

2001-11-12 Thread operator


Hi again,

I believe it should disallow openning a directory in safe mode if the UID
of the directory does not match the UID of the PHP script.

That is exactly the behavior of fopen() in safe mode.

Without that behavior, users are permitted to write a PHP script that lets
them crawl around the webserver seeing things they have no rights to see.

It happens on our system that there will never be any files owned by
user A under a directory owned by user B. But even if there were, I think
safe mode should disallow this type of filesystem reading.

Do you think the fact that this file reading is permitted is a bug that
should be reported?

A.



> It works like user/group permission as you
> know. I don't know what you want to protect :)
>
> Do you mean a script with "opendir()" shouldn't allow openning any
> directory under "open_basedir" if UID does not match?
>
> You can protect file basis, why do you need other protection for
> directories under open_basedir? Do you have good reason for this?
>
> --
> Yasuo Ohgaki
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Cookies, Sessions and Login Proceess

2001-11-12 Thread Julio Nobrega Trabalhando

  header(); function is fine. Another option is javascript which is
dependent on the client software.

  But you get the picture about the login process. I just have to agree with
Chris, something name 'is_logged' is better than 'accessedbefore'.

--

Julio Nobrega

A hora está chegando:
http://toca.sourceforge.net
"Joe Van Meer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Thx Christopher for replying. Ok, let me see if I understand you
> correctly...
>
> The user enters username and password on index.php, this is posted to
> login.php. On login.php after I verify the user is who he/she says they
are
> I set a cookie called "accessedbefore" to "yes" and redirect them to the
> main page. Am I allowed to set a cookie and redirect them after
determining
> who the user is? How would I redirect them after setting the cookie?
Header
> function or is there a better way?
>
> Thx Joe :)
>
>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Serial Port Programing

2001-11-12 Thread Brian C. Doyle

Hello all,

Does PHP have the ability to control a serial port?  I see we can use the 
Printer but that was All I saw.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Cookies, Sessions and Login Proceess

2001-11-12 Thread Joe Van Meer

Thx Christopher for replying. Ok, let me see if I understand you
correctly...

The user enters username and password on index.php, this is posted to
login.php. On login.php after I verify the user is who he/she says they are
I set a cookie called "accessedbefore" to "yes" and redirect them to the
main page. Am I allowed to set a cookie and redirect them after determining
who the user is? How would I redirect them after setting the cookie? Header
function or is there a better way?

Thx Joe :)


"Christopher William Wesley" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Just do your authentication before you send any HTML (including any
> whitespace).  I actually recommend not sending ANY HTML from your
> authentication script.  Authenticate them, set your cookie, and redirect
> the visitor to an appropriate next page, based on whether or not they've
> successfully authenticated.
>
> BTW - storing the username/password in the cookie makes no sense They've
> already authenticated ... just store a user-is-logged-in cookie which
> expires after X minutes/hours/etc.  It's a good practice for when you'll
> have to deal with privacy & security concerns.
>
> ~Chris   /"\
>  \ / September 11, 2001
>   X  We Are All New Yorkers
>  / \ rm -rf /bin/laden
>
> On Mon, 12 Nov 2001, Joe Van Meer wrote:
>
> > Hi there, I'm new to php coming from an asp background and would like to
> > know the easiest way to automate a login process. I have one page called
> > 'index.php' and it contains a form with 2 elements, username and
password.
> > This page is posted to th 'login.php' and here I do a check against the
> > database to see if the person is who they say they are. This where I
came
> > across a problem...I would like to set a cookie on the user's machine
once I
> > know they are who they say they are. So I attempted to create a cookie
to
> > hold their username and password upon successful login..I received the
> > following error...Warning: Cannot add header information - headers
already
> > sent by (output started at E:\ez\codesnipits\login.php:16) in
> > E:\ez\codesnipits\login.php on line 66.
> >
> > So I looked up in the manual and found that I can't do it this way. I
can't
> > send header info after the header has been sent for obvious reasons. So
how
> > the heck do I manage to do this?  What I would to do is have the user
login
> > once, and each subsequent time they visit , skip the login process via
their
> > username and password in the cookie.
> >
> > Any insight to this type of process would greatly be appreciated.
> >
> > Thx Joe
> > p.s  Sorry about the bold font ;)
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Cookies, Sessions and Login Proceess

2001-11-12 Thread Christopher William Wesley

Just do your authentication before you send any HTML (including any
whitespace).  I actually recommend not sending ANY HTML from your
authentication script.  Authenticate them, set your cookie, and redirect
the visitor to an appropriate next page, based on whether or not they've
successfully authenticated.

BTW - storing the username/password in the cookie makes no sense They've
already authenticated ... just store a user-is-logged-in cookie which
expires after X minutes/hours/etc.  It's a good practice for when you'll
have to deal with privacy & security concerns.

~Chris   /"\
 \ / September 11, 2001
  X  We Are All New Yorkers
 / \ rm -rf /bin/laden

On Mon, 12 Nov 2001, Joe Van Meer wrote:

> Hi there, I'm new to php coming from an asp background and would like to
> know the easiest way to automate a login process. I have one page called
> 'index.php' and it contains a form with 2 elements, username and password.
> This page is posted to th 'login.php' and here I do a check against the
> database to see if the person is who they say they are. This where I came
> across a problem...I would like to set a cookie on the user's machine once I
> know they are who they say they are. So I attempted to create a cookie to
> hold their username and password upon successful login..I received the
> following error...Warning: Cannot add header information - headers already
> sent by (output started at E:\ez\codesnipits\login.php:16) in
> E:\ez\codesnipits\login.php on line 66.
>
> So I looked up in the manual and found that I can't do it this way. I can't
> send header info after the header has been sent for obvious reasons. So how
> the heck do I manage to do this?  What I would to do is have the user login
> once, and each subsequent time they visit , skip the login process via their
> username and password in the cookie.
>
> Any insight to this type of process would greatly be appreciated.
>
> Thx Joe
> p.s  Sorry about the bold font ;)
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Url Length Limitations?

2001-11-12 Thread Daniel Kushner

You can try this class for POSTing:

http://phpclasses.upperdesign.com/browse.html/package/375

--Daniel


> -Original Message-
> From: Valentin V. Petruchek [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 12, 2001 7:05 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Url Length Limitations?
> 
> 
> Hi everyone!
> 
> Is there any limitation for length of url like this
> accept.php?set=qwerty...
> 
> What is the maximum $set length i can pass to script as a parameter?
> 
> Zliy Pes: http://zliypes.com.ua
> [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Cookies, Sessions and Login Process

2001-11-12 Thread Joe Van Meer

Hi there, I'm new to php coming from an asp background and would like to
know the easiest way to automate a login process. I have one page called
'index.php' and it contains a form with 2 elements, username and password.
This page is posted to th 'login.php' and here I do a check against the
database to see if the person is who they say they are. This where I came
across a problem...I would like to set a cookie on the user's machine once I
know they are who they say they are. So I attempted to create a cookie to
hold their username and password upon successful login..I received the
following error...Warning: Cannot add header information - headers already
sent by (output started at E:\ez\codesnipits\login.php:16) in
E:\ez\codesnipits\login.php on line 66.

So I looked up in the manual and found that I can't do it this way. I can't
send header info after the header has been sent for obvious reasons. So how
the heck do I manage to do this?  What I would to do is have the user login
once, and each subsequent time they visit , skip the login process via their
username and password in the cookie.

Any insight to this type of process would greatly be appreciated.

Thx Joe
p.s  Sorry about the bold font ;)





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] fopen and paths

2001-11-12 Thread PACKER, Steffan

I am trying to log particular information in an access log and I need it to
be used on several pages all in different directories, I would like the
actual log to be stored in a directory called data in the root directory of
my web page. I using an include() on each page where I would like the info
logged.
I am using:
$log_fp = fopen("../data/access_log.txt", "a",1);
with the use_include_path set to 1.

My problem is that a new file is being created in each directory that the
logging.inc file is added to.

Can anyone help?  
Steffan



DISCLAIMER

Any opinions expressed in this email are those of the individual
and not necessarily the company.  This email and any files 
transmitted with it, including replies and forwarded copies (which
may contain alterations) subsequently transmitted from the 
Company, are confidential and solely for the use of the intended
recipient.  It may contain material protected by attorney-client
privilege.  If you are not the intended recipient or the person
responsible for delivering to the intended recipient, be advised
that you have received this email in error and that any use is
strictly prohibited.

If you have received this email in error please notify the Network
Manager by telephone on +44 (0) 870 243 2431.

Please then delete this email and destroy any copies of it.
This email has been swept for viruses before leaving our system.

Admiral Insurance Services Limited, Cardiff CF10 3AZ



_
This message has been checked for all known viruses by the 
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp



[PHP] url extracting

2001-11-12 Thread Caspar Kennerdale


I am yrying to read free urls from a moreover.com to a director app which
will be a news reader without a browser

'm using php top extrat the headlines

each headline looks similar to this

("http://c.moreover.com/click/here.pl?l27536670";)


If a browser goes to this page then it is redirected to the appropriate page
ie www.newssite.com/etc/etc/etc

Director does not interpret the redirection.

Can anyone think of a way for a script to go the to the moreover link and
then return the 'real url as a variable or as an array of links (if multiple
headlines are required

thanks in advance



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Chopping off extra characters from input

2001-11-12 Thread PHPGalaxy.com

The substr function's a good safeguard, as well as using the  maxlength="8"
param in the  tag for the text field (in the HTML)  =)


--
>From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
and Software on your Site. http://www.phpgalaxy.com/aff/

Also, get a fast free POP3 email account, you @php.la at
http://www.phpgalaxy.com/search/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Chopping off extra characters from input

2001-11-12 Thread Chris O'Brien

> I've got a problem where people are entering extra characters (due to an
> inonsistency in the tracking numbers they are being given) in a number
> they are entering in a form field.  I have a PHP script querying a MySQL
> database.  What's the easiest way to take the input and use only the
> first 8 characters?
> 
> Any help is appreciated!
> 
> Thanks,
> Rory

$tracking = substr($input,0,8);

Would be as easy as I can think of.

* Chris O'Brien ([EMAIL PROTECTED])
* Excel.Net,Inc. - http://www.excel.net/
* (920) 452-0455 - Sheboygan/Plymouth area
* (888) 489-9995 - Other areas, toll-free


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Chopping off extra characters from input

2001-11-12 Thread Rory O'Connor

I've got a problem where people are entering extra characters (due to an 
inonsistency in the tracking numbers they are being given) in a number 
they are entering in a form field.  I have a PHP script querying a MySQL 
database.  What's the easiest way to take the input and use only the 
first 8 characters?

Any help is appreciated!

Thanks,
Rory

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




php-general@lists.php.net

2001-11-12 Thread Jon Haworth

Change your CDATA so it contains & instead of &

HTH
Jon


-Original Message-
From: bill [mailto:[EMAIL PROTECTED]]
Sent: 12 November 2001 15:51
To: [EMAIL PROTECTED]
Subject: [PHP] parsing XML data with ampersands (&)


When parsing XML data, the CDATA sometimes contains an ampersand (&).

The XML parser sends this as two events, one before the ampersand and
one after.  That yields two data sections (when there is only one).

Ideas on how to keep them together?

Is this a bug?

kind regards,

bill hollett


**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




php-general@lists.php.net

2001-11-12 Thread bill

When parsing XML data, the CDATA sometimes contains an ampersand (&).

The XML parser sends this as two events, one before the ampersand and
one after.  That yields two data sections (when there is only one).

Ideas on how to keep them together?

Is this a bug?

kind regards,

bill hollett


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] apache + ftp!

2001-11-12 Thread R'twick Niceorgaw

I use war ftp.. its a free ware and has good features
- Original Message -
From: "Olexandr Vynnychenko" <[EMAIL PROTECTED]>
To: "Benjamin" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 8:37 AM
Subject: Re: [PHP] apache + ftp!


> Hello Benjamin,
>
> Monday, November 12, 2001, 12:00:22 PM, you wrote:
>
> B> hey group!
>
> B> i have apache installed on an win2000 machine and now i need an good
and
> B> stable ftp server! which one does i take!
>
> B> thank you, ben
>
> And what about W2k's built-in FTP server? Has someone used it? Is it
> so bad?
>
> --
> Best regards,
>  Olexandrmailto:[EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] apache + ftp!

2001-11-12 Thread Daniel Masur

never had it runnin, but i didnt heard bout hacking g6ftp.

"Olexandr Vynnychenko" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello Benjamin,
>
> Monday, November 12, 2001, 12:00:22 PM, you wrote:
>
> B> hey group!
>
> B> i have apache installed on an win2000 machine and now i need an good
and
> B> stable ftp server! which one does i take!
>
> B> thank you, ben
>
> And what about W2k's built-in FTP server? Has someone used it? Is it
> so bad?
>
> --
> Best regards,
>  Olexandrmailto:[EMAIL PROTECTED]
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Using PHP for directory indexing

2001-11-12 Thread Mike Harvey

Here's one from my function collection:
~~~
function list_dir($basedir,$type="",$filter=""){
//echo $basedir;
 $handle=opendir($basedir);
 $filelisting=array();
 while ($file = readdir($handle)) {
  if ($file!="." AND $file!=".."){
   switch($type){
case "file":
 if(strstr($file,"."))$filelisting[]="$file";
 break;
case "dir":
 if(!strstr($file,"."))$filelisting[]="$file";
 break;
default:
 $filelisting[]="$file";
   }
  }
 }
 closedir($handle);
 $out=$filelisting;
 if($filter!=""){
  unset($out);
  $fcount=count($filelisting);
  $count=0;
  while($count<=$fcount){
   if(strstr($filelisting[$count],$filter))$out[]=$filelisting[$count];
   $count++;
  }
 }
 sort($out);
 return $out;
}
~
$basedir - the directory you want to list
$type - optional - "" will give you evything, "file" will give you all
files, "dir" will give you all directories
$filter - optional - allows you to specify a file type ie: "gif"
--
 Mike
~~~
   MICHAEL R. HARVEY 
   Web Creation - http://vestudiohost.com
   Internet Business Tools - http://ibiz-tools.com
   Sculpture, Craft, Jewelry - http://sculpture-by-mrh.com
http://jewelry-by-mrh.com http://craft-by-mrh.com
   New Product Innovations and Development. Ph: 845-279-8295
"Rudolf Visagie" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> function GetFiles ($DataPath, &$files, &$nfiles) {
>
> // Reads a directory and puts filenames into a sorted array
>
> $handle=opendir($DataPath);
> if ($handle) {
> $nfiles = -1;
> while (false!==($file = readdir($handle))) {
> if ($file != "." && $file != "..") {
> $nfiles++;
> $files[$nfiles] = $file;
> }
> }
> sort($files);
> closedir($handle);
> }
> return 0;
> }
>
> Rudolf Visagie
> Principal Software Developer
> Digital Healthcare Solutions
> Tel. +27(0)11 266 6946
> Fax. +27(0)11 266 5080
> Cell: +27(0)82 895 1598
> E-mail: [EMAIL PROTECTED]
>
>
> -Original Message-
> From: Kevin Garrett [mailto:[EMAIL PROTECTED]]
> Sent: 12 November 2001 03:08
> To: [EMAIL PROTECTED]
> Subject: [PHP] Using PHP for directory indexing
>
>
> Hi All,
>
> I am wondering if anyone can help me with this.  I want people
> accessing my
> site to see a list of HTML reports but I don't want to turn on Directory
> indexing on my Apache webserver, seeing as the directory path is present.
> What I'm looking to do, is to write a basic php script which will read the
> files in a certain directory & create links to be presented to the user.
> Has anyone ever done this before?  Can someone give me an example or a
> headstart on this.
>
> Thanks in advance
> Kev
>
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: executing another php.script

2001-11-12 Thread Mike Harvey

Just "include(script2.inc)" in your loop.

--
 Mike
~~~
   MICHAEL R. HARVEY 
   Web Creation - http://vestudiohost.com
   Internet Business Tools - http://ibiz-tools.com
   Sculpture, Craft, Jewelry - http://sculpture-by-mrh.com
http://jewelry-by-mrh.com http://craft-by-mrh.com
   New Product Innovations and Development. Ph: 845-279-8295
"David Tod Sigafoos" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am sure that I am just .. missing this ..
>
> From one script I wish to 'execute' another script.  How is this done?
>
> Setting a link and clicking is not the answer .. one script loops
> through all the 'selected' rows and I want to 'execute' another script
> for each row .. can this be done?
>
> thanks
>
> DSig
> David



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Url Length Limitations?

2001-11-12 Thread l0t3k

Valentin,
actually if you use ICS (Francois Piettes components), you can POST as
well. im doing that in a project im working on just this moment. you should
be able to find his component set at Torry's ( www.torry.ru )


Valentin V. Petruchek <[EMAIL PROTECTED]> wrote in message
009501c16b75$0e9f2160$[EMAIL PROTECTED]">news:009501c16b75$0e9f2160$[EMAIL PROTECTED]...
> You see, I call for php script from Delphi program...
> I can do it with InternetOpen() so the only method available for me is
GET -
> i can use page url only
>





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: pass javascript variable to php without submit or reload

2001-11-12 Thread Mike Harvey

If you are trying to collect things like monitor size or other user data you
could try putting the JS in the head and then put a  tag with
time period of 0. I haven't actually tried this but it might work.

--
 Mike
~~~
   MICHAEL R. HARVEY 
   Web Creation - http://vestudiohost.com
   Internet Business Tools - http://ibiz-tools.com
   Sculpture, Craft, Jewelry - http://sculpture-by-mrh.com
http://jewelry-by-mrh.com http://craft-by-mrh.com
   New Product Innovations and Development. Ph: 845-279-8295
"Phieu Huynh" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
> 
> function changebuilding (which) {
>  sel_var = which.selectedIndex
>  $sql_query = "select distinct room
>  from general.room_info
>  where building='$variable' group by level asc";
>
>$sql_result = mysql_query($sql_query) or die (" Can't execute the
> query");
>
>$i=0;
>while ($row = mysql_fetch_array($result_sec_level))
>  print ("ar[".$i++."] = \"".$row[0]."\";\n");
>  ?>
> for (i=0; i < ar.length; i++) {
> option = new Option(ar[i])
> document.myform.room.options[i]=option
>}
> }
> 
> 
> 
> Building :   
>  1
> 2
>   3
>  
> Room :   
>  
> 
> 
>
>
> I can pass the variable in building to $variable by submit button
> but I want to pass the sel_var variable to $variable and dynamic update
> the content in room.
>
> --
>
> phil



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Form Name Attribute

2001-11-12 Thread Mike Harvey

I would use a  field and look for that variable.

--
 Mike
~~~
   MICHAEL R. HARVEY 
   Web Creation - http://vestudiohost.com
   Internet Business Tools - http://ibiz-tools.com
   Sculpture, Craft, Jewelry - http://sculpture-by-mrh.com
http://jewelry-by-mrh.com http://craft-by-mrh.com
   New Product Innovations and Development. Ph: 845-279-8295
"Kal Amry" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi guys, If I have a code in file1.php such as:
>
> 
> code..
> code..
> 
>
> And
>
> 
> code..
> code..
> 
>
> Now in file2.php, I need to check which form I am receiving!! How do I
> check!!
>
> In other words, let's assume we only have the form names "formName1" and
> "formName1" - What code I can use in file2.php to get the name of the
> calling form. I just want to know how can I get the name of the form (in
the
> above case, formName1 or formName2)
>
> Thanx
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: post variables to MySQL fields

2001-11-12 Thread Mike Harvey

This isn't the code you were talking about but it's something I wrote and
use all the time. update_table() requires a "where" variable which is an
array which needs to be declared before the function is called. The $where
array is only 2 parts with the column name as [0] and the condition as [1].
It would be declared something like: $where=array("name","George");  They
both require $db as the database pointer and $db_name as the database name.
insert_table() has the option of using a second database ($db_name2, $db2)
if desired. I haven't needed this feature in update_table() yet so I didn't
add it in. It wouldn't be hard to take the code from one to the other if
needed.


function update_table($table,$where){
 GLOBAL $db,$db_name,$HTTP_POST_VARS;
 $fields = mysql_list_fields($db_name, $table, $db);
 $columns = mysql_num_fields($fields);
 for ($i = 0; $i < $columns; $i++) {
  $colnames[$i]= mysql_field_name($fields, $i);
 }
 foreach($HTTP_POST_VARS as $key=>$value){
  if(in_array($key,$colnames) AND $value!="~NULL~"){
   $value=addslashes($value);
   $save.="$c $key='$value'";
   $c=",";
  }
 }
 $update="UPDATE $table SET $save WHERE $where[0]='$where[1]'";
  mysql_query($update,$db);
}
~~~
function insert_table($table,$db_name2="",$db2=""){
 GLOBAL $db,$db_name,$HTTP_POST_VARS;
  $db1=$db;
  if($db2!="")$db1=$db2;
  $db_name1=$db_name;
  if($db_name2!="")$db_name1=$db_name2;
 $fields = mysql_list_fields($db_name1, $table, $db1);
 $columns = mysql_num_fields($fields);
 for ($i = 0; $i < $columns; $i++) {
  $colnames[$i]= mysql_field_name($fields, $i);
 }
 $cols="(";
 $save="(";
 foreach($HTTP_POST_VARS as $key=>$value){
  if(in_array($key,$colnames) AND $value!="~NULL~"){
   if($value==" ")$value="";
   $value=addslashes($value);
   $cols.="$comma$key";
   $save.="$comma'$value'";
   $comma=",";
  }
 }
 $cols.=")";
 $save.=")";
 mysql_query("INSERT INTO $table $cols VALUES $save",$db1);
}
~
"Rory O'Connor" <[EMAIL PROTECTED]> wrote in message
20011109191732.B783@jacktasty">news:20011109191732.B783@jacktasty...
> A while back somebody answered a question about some PHP code that would
> take the $HTTP_POST_VARS and create the SQL that would write them to a
> MySQL table  (provided the posted var names matches the MySQL
> fieldnames).
>
> Does anyone have info on that project?  The PHP searchable archive is
> down, otherwise I wouldn't be asking on the list.
>
> Thanks,
> Rory



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Help me to win the battle with browser's cache

2001-11-12 Thread Girish Nath

Hi

I've found some code which i put it into this function. I've never got the
meta tag technique to work but this seems to do the trick.

Call noCache() before outputting anything to the page.

function noCache() {
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");// Date in the past
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always
modified
header ("Cache-Control: no-cache, must-revalidate");  file://HTTP/1.1
header ("Pragma: no-cache");  // HTTP/1.0
}

Regards


Girish


- Original Message -
From: "Olexandr Vynnychenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 1:32 PM
Subject: [PHP] Help me to win the battle with browser's cache


> Hello php-general,
>
>   I have index.php, which has Log out.
>   When I click it, I am logged out the site. But I type "index.php" in
>   browser's address bar, press Enter and ... it shows "non-logouted"
>   page. What should I write in php code to tell browser something like
>   "forget about old page, don't display it, get the newest version"?
>   Some time ago I tried to do that in several ways and nothing gived
>   100% result. And other thing I saw was that Netscape and Explorer
>   behave in different ways in such cases. Could someone help me? Maybe
>   this topic was discussed before, but still... I appreciate greatly
>   any suggestion.
>
> --
>  Olexandr Vynnychenko  mailto:[EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Using PHP for directory indexing

2001-11-12 Thread Galkov Vladimir

line
print ''.$filenames[$
i].'';


change on
print ''.$filenames[$i].''
;



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Faking MS Access on MySQL linux box

2001-11-12 Thread MrBaseball34

> What I need is to write PHP pages which manipulate a MS Access DB
> via ODBC, because this is what the hosting company makes available
> (and it's not going to change because of several reasons)
> 


My suggestion would be to change hosting companies due to their
stupidity of using Access as a web database and not willing to
offer anything more robust.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Using PHP for directory indexing

2001-11-12 Thread Galkov Vladimir

Hi! Kevin!
Try this... :-) have a nica day!


«'.START_PATH.$catalog.'»';
 print $str;

 echo '';
 echo '';
 echo 'Record type Path';

 for ($i = 0; $i < count($filenames); $i++)
  {
   if ($filenames[$i]!='.' && $filenames[$i]!='..')
{
 if (is_dir(START_PATH.$catalog.'/'.$filenames[$i]))
  {
   print 'Directory';
   print ''.$filenames[$i].'';
  }
  else
   {
print 'File';
print ''.$filenames[$
i].'';
   }
  print '';
}
  }


?>
 





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Help me to win the battle with browser's cache

2001-11-12 Thread Balaji Ankem

Hi,
  me also faced many probs last 3 months back and i overcome that.
solution
-
use session variables..

register login info as session vars and during logout unregister...

This is the solution to u'r problem..

-

All the best
-Balaji

- Original Message - 
From: "Olexandr Vynnychenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 7:02 PM
Subject: [PHP] Help me to win the battle with browser's cache


Hello php-general,

  I have index.php, which has Log out.
  When I click it, I am logged out the site. But I type "index.php" in
  browser's address bar, press Enter and ... it shows "non-logouted"
  page. What should I write in php code to tell browser something like
  "forget about old page, don't display it, get the newest version"?
  Some time ago I tried to do that in several ways and nothing gived
  100% result. And other thing I saw was that Netscape and Explorer
  behave in different ways in such cases. Could someone help me? Maybe
  this topic was discussed before, but still... I appreciate greatly
  any suggestion.

-- 
 Olexandr Vynnychenko  mailto:[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




---
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


RE: [PHP] Re: Faking MS Access on MySQL linux box

2001-11-12 Thread Andrew Hill

John,

OpenLink's Multi-Tier drivers can get you from Linux to MSAcess on Windows.

Mweb,

I'd just use ODBC against MySQL for testing.  There isn't any way to
actually run an Access DB on Linux.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access & Data Integration Technology Providers

> -Original Message-
> From: John Lim [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, November 10, 2001 12:06 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Re: Faking MS Access on MySQL linux box
>
>
> Hi Mweb,
>
> yes it is overkill, but I don't know any other way to do it unless
> you want to buy a 3rd party odbc driver for Access on Linux (is
> there one?)
>
> Bye, John
>
> Mweb <[EMAIL PROTECTED]> wrote in message
> 2000104958.B3706@polaris">news:2000104958.B3706@polaris...
> > John,
> >
> > thanks for the link, but isn't it a bit of overkill in my case?
> >
> > What I need is to write PHP pages which manipulate a MS Access DB
> > via ODBC, because this is what the hosting company makes available
> > (and it's not going to change because of several reasons)
> >
> > So, I am looking for explanation on how to do ONLY the testing
> > of suche pages on a STAND-ALONE Linux box. I want to run some DB
> > engine on it which is accessible through ODBC, so that I can
> > say "if my ODBC call was OK here, it will work also when I upload
> > on the NT/IIS server, because the interface is the same".
> >
> > Keep in mind that performance is not an issue here. On the linux
> > PC I would only do testing, and the site on the real server currently
> > has ~4000 visits/month querying a DB with some hundreds of entries.
> >
> > What do you think?
> >mweb
> >
> > On Sat, Nov 10, 2001 13:02:14 at 01:02:14PM +0800, John Lim wrote:
> > > See http://php.weblogs.com/adodb_csv
> > >
> > > "ADODB also supports SQL communications through HTTP as a database
> proxy. In
> > > plain English, if you have a FoxPro or Access database that
> you need to
> > > connect to from Unix, you can do so via HTTP (eg. Apache
> talking to IIS,
> > > which talks to a small PHP program [the proxy] that queries the
> database,
> > > packs it into serialized text and sends it back to Apache).
> > >
> > >   PHP client -- Apache  IIS -- PHP server -- Database
> > >
> > > Or if you have to go through a firewall to access your database, this
> > > solution allows you to stream SQL queries as HTTP through the
> firewall."
> > >
> > > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote in message
> > > GMJD1G$[EMAIL PROTECTED]">news:GMJD1G$[EMAIL PROTECTED]...
> > > Hello,
> > >
> > > For reasons not worth discussing here, I have to develop and test on
> > > Linux/Apache some PHP pages that will have to access via ODBC a MS
> Access
> > > database on an NT/IIS/PHP server.
> > >
> > > I would like to do it by writing PHP pages that access via ODBC
> > > some mysql or other database on my linux box, in such a way that,
> > > if it works there, I just change some general setting, upload
> the pages
> > > and they work for sure on the MS Access thing (something like:
> > > ifdef LINUX then ODBC_ACCESSES_MYSQL
> > > ifdef NTthen ODBC_ACCESSES_MS_Access)
> > >
> > > I am sure that this must be possible, but would really appreciate some
> > > examples/pointers to specific tutorial/similar stories/etc.
> > >
> > > TIA,
> > > mweb
> > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> >
> > --
> > Never let your sense of morals prevent you from doing what is right
> > Salvor Hardin , "Foundation"
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Help me to win the battle with browser's cache

2001-11-12 Thread Galkov Vladimir

Good time of a day!
Hello Alex!


may be?
but if you use $PHP_AUTH_USER, $PHP_AUTH_PW i don't see simple way
if you check password every time page reqwesting... may be try to check
password from temp file/table (just a miror of original).

On login place reg data from original to temp and work with them...
On logout delete or breake reg data in temp fille to resive the situation
$PHP_AUTH_USER, $PHP_AUTH_PW entered before are denied now...

Vladimir.

"Olexandr Vynnychenko" <[EMAIL PROTECTED]> ???/ ? 
?: [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello php-general,
>
>   I have index.php, which has Log out.
>   When I click it, I am logged out the site. But I type "index.php" in
>   browser's address bar, press Enter and ... it shows "non-logouted"
>   page. What should I write in php code to tell browser something like
>   "forget about old page, don't display it, get the newest version"?
>   Some time ago I tried to do that in several ways and nothing gived
>   100% result. And other thing I saw was that Netscape and Explorer
>   behave in different ways in such cases. Could someone help me? Maybe
>   this topic was discussed before, but still... I appreciate greatly
>   any suggestion.
>
> --
>  Olexandr Vynnychenko  mailto:[EMAIL PROTECTED]
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Using PHP for directory indexing

2001-11-12 Thread Kevin Garrett


Wow that was a quick response...Thanks alot! That those the listing part of 
my problem but is there a way of only showing a certain type of file such as 
only HTML?  & is there a way of somehow automatically making a link to 
access those pages?

>From: "Oosten, Sjoerd van" <[EMAIL PROTECTED]>
>To: 'Kevin Garrett' <[EMAIL PROTECTED]>, "'[EMAIL PROTECTED]'"  
><[EMAIL PROTECTED]>
>Subject: RE: [PHP] Using PHP for directory indexing
>Date: Mon, 12 Nov 2001 14:15:14 +0100
>
>   // print the current directory in unordered list
>   print("\n");
>
>   // open directory
>   $myDirectory = dir(".");
>
>   // get each entry
>   while($entryName = $myDirectory->read())
>   {
>   print("$entryName \n");
>   }
>
>   // close directory
>   $myDirectory->close();
>
>   print("\n");
>?>
>
>
>Sjoerd van Oosten
>Digitaal vormgever [EMAIL PROTECTED]
>Datamex E-sites B.V.
>http://www.esites.nl
>Minervum 7368 Telefoon: (076) 5 730 730
>4817 ZH BREDA Telefax: (076) 5 877 757
>___
>
>
>-Oorspronkelijk bericht-
>Van: Kevin Garrett [mailto:[EMAIL PROTECTED]]
>Verzonden: maandag 12 november 2001 14:08
>Aan: [EMAIL PROTECTED]
>Onderwerp: [PHP] Using PHP for directory indexing
>
>
>Hi All,
>
>   I am wondering if anyone can help me with this.  I want people
>accessing my
>site to see a list of HTML reports but I don't want to turn on Directory
>indexing on my Apache webserver, seeing as the directory path is present.
>What I'm looking to do, is to write a basic php script which will read the
>files in a certain directory & create links to be presented to the user.
>Has anyone ever done this before?  Can someone give me an example or a
>headstart on this.
>
>Thanks in advance
>Kev
>
>_
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] apache + ftp!

2001-11-12 Thread Olexandr Vynnychenko

Hello Benjamin,

Monday, November 12, 2001, 12:00:22 PM, you wrote:

B> hey group!

B> i have apache installed on an win2000 machine and now i need an good and
B> stable ftp server! which one does i take!

B> thank you, ben

And what about W2k's built-in FTP server? Has someone used it? Is it
so bad?

-- 
Best regards,
 Olexandrmailto:[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   >