php-general Digest 16 Jul 2002 09:16:04 -0000 Issue 1467

Topics (messages 107759 through 107823):

Online Document
        107759 by: Glenn Antoine
        107762 by: Kevin Stone
        107776 by: John Holmes

Re: Installing MYSQL on Windows
        107760 by: Lee
        107764 by: Analysis & Solutions
        107774 by: John Holmes
        107782 by: Yamin Prabudy
        107801 by: Richard Lynch

Multi-Part PostToHost?
        107761 by: Steve Keller
        107802 by: Richard Lynch

Re: Encoding problem ONLY with _command line_ PHP.exe
        107763 by: Analysis & Solutions

Date () Help please
        107765 by: Attila
        107766 by: Richard Baskett
        107768 by: Attila
        107769 by: Attila
        107775 by: John Holmes

Re: Apache 2.0 + PHP
        107767 by: Gerard Samuel

PHP and Jigsaw
        107770 by: Murray Nicholas
        107803 by: Richard Lynch

Re: Editing files by line
        107771 by: Onaje Johnston
        107772 by: Analysis & Solutions

Re: NMTP server and db
        107773 by: John Holmes

Free PHP Books in PDF or HTML Format
        107777 by: Chris Carlson
        107778 by: Martin Towell

OOH Forms ?
        107779 by: DoL
        107780 by: John Holmes

Sorting getmxrr()
        107781 by: Chris Knipe

how can I log to my cvs in php.net and translate files
        107783 by: Alawi

Re: Multiple Tables -add, edit, delete
        107784 by: Richard Lynch

Re: PHP codes and variables
        107785 by: Richard Lynch

Re: Gainesville, Florida PHP Users? (Re: [PHP-WIN] PHP meetup [CROSS-POST] Meet other 
PHP Developers in Your Area)
        107786 by: Richard Lynch

Re: is_null question
        107787 by: Richard Lynch

Re: hello the list
        107788 by: Richard Lynch

Re: Creating an PHP program and C program
        107789 by: Richard Lynch

Re: Training / Courses in Australia
        107790 by: Richard Lynch

Re: DOM XML : experimental ?
        107791 by: Richard Lynch

Re: IF inside LOOP?
        107792 by: Richard Lynch

Re: ignore_user_abort question
        107793 by: Richard Lynch

Re: fputs - need help!
        107794 by: Richard Lynch

Re: dio_seek, dio_tell
        107795 by: Richard Lynch

Re: Detecting network connections
        107796 by: Richard Lynch

Re: PHP 4.3.x..
        107797 by: Richard Lynch

Re: outputting a pdf file to IE browser? POST/GET method bug or not?
        107798 by: Richard Lynch

Re: newbie: mysql statement
        107799 by: Richard Lynch

Re: Solaris 8 + php 4.2.1 setup problem
        107800 by: Richard Lynch

Re: [PHP-DEV] OOH Forms ?
        107804 by: Arnaud Limbourg

Complex session issue
        107805 by: Divyank Turakhia

Submit code
        107806 by: MindHunter
        107807 by: Martin Towell
        107809 by: Peter Janett
        107818 by: Martin Thoma

Re: integrating usenet into http? how is this done???
        107808 by: Latex Master

Problem on file_exists()
        107810 by: Jack
        107811 by: David Redmond
        107816 by: liljim

Inclusion error
        107812 by: Sachin Keshavan
        107819 by: David Freeman
        107823 by: Sachin Keshavan

PostgreSQL
        107813 by: rdkurth.starband.net
        107815 by: Lejanson C. Go

MsSQL connection !!! HELP !
        107814 by: Djurovski Dejan

Get Anchor out of Url
        107817 by: Martin Thoma
        107820 by: Martin Thoma

Re: ^k ? -- how do I match that?
        107821 by: liljim

Crazy idea about detecting visitor's connection speed
        107822 by: Cedric Veilleux

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
We are currently looking to put a very sizable document on a website so
that it will be easily.  The document is currently maintained by a
single user in a MS Word format.  Ideally it would be very nice if the
index would take the user to the index of the appropriate section of the
document, which would then drill down to the exact contents of that
section.  The document should also be easily updateable, via her web
browser, by the user that has been tasked with maintaining the manual.
Any suggestions for the design of such a project would be greatly
appreciated.

TIA
Glenn

--- End Message ---
--- Begin Message ---
I would recommend applying a simple templating system to the file.  Anything
that needs to be extracted out of the page for navigation purposes will be
enclosed in special characters such as a chapter title.. [:chapter =
"CHAPTER 2: Beating a Dead Horse":].  A very simple script parses the file
and extracts these strings to build an interactive Table of Contents.
-Kevin

----- Original Message -----
From: "Glenn Antoine" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 15, 2002 3:19 PM
Subject: [PHP] Online Document


> We are currently looking to put a very sizable document on a website so
> that it will be easily.  The document is currently maintained by a
> single user in a MS Word format.  Ideally it would be very nice if the
> index would take the user to the index of the appropriate section of the
> document, which would then drill down to the exact contents of that
> section.  The document should also be easily updateable, via her web
> browser, by the user that has been tasked with maintaining the manual.
> Any suggestions for the design of such a project would be greatly
> appreciated.
>
> TIA
> Glenn
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
I hate to say it, but the easiest way to maintain this might just be to
do all of the hyperlinking from within Word, with its own
function/buttons, etc, and then save the Word document as HTML. Yeah,
it'll be bloated and crappy HTML, but it'll load into a browser. Then,
when she needs to update it, she just updates the word document, and
resaves it as HTML format in the web root...

---John Holmes...

> -----Original Message-----
> From: Glenn Antoine [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 15, 2002 5:19 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Online Document
> 
> We are currently looking to put a very sizable document on a website
so
> that it will be easily.  The document is currently maintained by a
> single user in a MS Word format.  Ideally it would be very nice if the
> index would take the user to the index of the appropriate section of
the
> document, which would then drill down to the exact contents of that
> section.  The document should also be easily updateable, via her web
> browser, by the user that has been tasked with maintaining the manual.
> Any suggestions for the design of such a project would be greatly
> appreciated.
> 
> TIA
> Glenn
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Have a look at

http://www.mysql.com/doc/W/i/Windows_installation.html

Cheers

Lee.

----- Original Message ----- 
From: "Varsha Agarwal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 15, 2002 10:12 PM
Subject: [PHP] Installing MYSQL on Windows


> Hi,
> Can anyone tell me steps for installing MYSQL on
> windows ??
> -Varsha
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Autos - Get free new car price quotes
> http://autos.yahoo.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


--- End Message ---
--- Begin Message ---
On Mon, Jul 15, 2002 at 02:12:47PM -0700, Varsha Agarwal wrote:
>
> Can anyone tell me steps for installing MYSQL on windows ??

Very simple, step by step, instructions:

http://www.analysisandsolutions.com/code/mybasic.htm

--Dan

-- 
               PHP classes that make web design easier
        SQL Solution  |   Layout Solution   |  Form Solution
    sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409
--- End Message ---
--- Begin Message ---
> Hi,
> Can anyone tell me steps for installing MYSQL on
> windows ??

Umm...download, unzip, run the setup program. How hard is that?

---John Holmes...

--- End Message ---
--- Begin Message ---
you might want a phptriad (apache,mysql,php)
find it in sourceforge
On Tuesday 16 July 2002 06:15 am, Analysis & Solutions wrote:
> On Mon, Jul 15, 2002 at 02:12:47PM -0700, Varsha Agarwal wrote:
> > Can anyone tell me steps for installing MYSQL on windows ??
>
> Very simple, step by step, instructions:
>
> http://www.analysisandsolutions.com/code/mybasic.htm
>
> --Dan

--- End Message ---
--- Begin Message ---
>Can anyone tell me steps for installing MYSQL on
>windows ??

1. Download from http://mysql.com
2. Follow the instructions in the download.

If you get stuck, you've *GOT* to say which *VERSION* of Windows, since they
are all too damn different. :-)

-- 
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
First, thanks to the people who've helped me so far.

I'm a UI designer who's suddenly found himself responsible for a very large
website that integrates services from no less than four different providers,
and I've been dumped into learning PHP on my own under a heavy deadline.

Anyway, I'm catching data from a form post and writing an XML document out
of it. That's done, the server can process the XML correctly. But, from
there, I need that file to be appended to a POST to a script on another
server for processing. I've tried looking up how this is accomplished, and
Richard Lynch was kind enough to point me in the direction of PostToHost,
which got me off to a jump start on how to find more information.

So now I'm at a point where I need help.

After opening the socket, can I declare a multi-part POST and then start
sending the data? Such as:

        fputs($fp, "Content-Type: multipart/form-data; boundary=AaB03x\n");
        fputs($fp, "--AaB03x\n");
        fputs($fp, "Content-Disposition: form-data; name="variable1"\n");
        fputs($fp, "\n");
        fputs($fp, "Variable 1 Data\n");
        fputs($fp, "--AaB03x\n");
        fputs($fp, "Content-Disposition: form-data; name="files";
filename="myFile.xml"\n");
        fputs($fp, "Content-Type: text/plain\n");
        fputs($fp, "\n");
        fputs($fp, "... contents of myFile.xml ...\n");
        fputs($fp, "--AaB03x--\n");

And again, I've only been doing PHP a week, so if I'm following a totally
wrong track here, feel free to smack me around.



As always, any help is greatly appreciated.

~Steve-o

--- End Message ---
--- Begin Message ---
> fputs($fp, "Content-Type: multipart/form-data; boundary=AaB03x\n");
> fputs($fp, "--AaB03x\n");
> fputs($fp, "Content-Disposition: form-data; name="variable1"\n");
> fputs($fp, "\n");
> fputs($fp, "Variable 1 Data\n");
> fputs($fp, "--AaB03x\n");
> fputs($fp, "Content-Disposition: form-data; name="files";
>filename="myFile.xml"\n");
> fputs($fp, "Content-Type: text/plain\n");
> fputs($fp, "\n");
> fputs($fp, "... contents of myFile.xml ...\n");
> fputs($fp, "--AaB03x--\n");

That looks quite reasonable, EXCEPT:

It's *POSSIBLE* that "Aa03x" will be *IN* the document...  I'd choose a
longer and more random boundary, and maybe even be 100% sure by using
something like this:

$myfile = file('/full/path/to/myFile.xml') or die("Could not open
myFile.xml");
$myfile = implode('', $myfile);
$boundary = md5(uniqid(''));
# Hey, the odds are one in a zillion, but why not?
while (strstr($myfile, $boundary)){
  $boundary = md5(uniqid(''));
}

And I think you need a different boundary for *EACH* part of the multipart
stuff...  But maybe that's just me thinking wrongly...

Other than that, I'm guessing that you *MIGHT* need to somehow "escape" the
contents of the data...

I dunno if browsers and web-servers expect that data to be uuencoded, or
base64 encoded, or anything like that... But if they do, and you don't do
that, well, it ain't gonna work.  PHP has the functions for doing it, I just
don't know if you need them or which one...

But you're definitely on the right track, and you're down to minutia at this
point.

-- 
Like Music?  http://l-i-e.com/artists.htm
--- End Message ---
--- Begin Message ---
On Fri, Jul 12, 2002 at 11:02:54PM +0100, Emile Axelrad wrote:
> Hello - My problem is as follows (I am trying to migrate from a mssql
> server to a mysql server)

OH!


> The data in the MSSQL table is: Æã
>  
> IF I call this PHP code from my browser (IE6) it results in the
> following output: Æã and it also places into the MySQL database the
> value: Æã
>  
> However, if I call this PHP code from the command line, using "php.exe
> test.php" it also results in the following output: Æã but it places into
> the MySQL database: ’Æ

This _could_ be happening because you're viewing the data using different
systems and software.  Each has it's own character sets.  This could throw
things off, making the output LOOK different, even when it's the same.


> I am sure it is a character set issue, but for the life of me I cannot
> work out why the command-line does not run the exact same script in the
> same way as a browser would?

The website could be running PHP as an Apache module (or some other 
binary) while the command line uses a standalone binary.  They could be 
using different php.ini files.  They could be different versions.

--Dan

A:  No.
Q:  Is top posting okay?

-- 
               PHP classes that make web design easier
        SQL Solution  |   Layout Solution   |  Form Solution
    sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409
--- End Message ---
--- Begin Message ---
Hello all,
    I am very new to PHP and I have added some minor PHP to my website.  I
would like to make a PHP calander to keep track of things going on.  Could
someone tell me how I can get the first day of every month.

For Example:
01 Jul 2002 was a Monday.
01 Mar 2002 will be a Thursday

I need the dates to start my tables so they insert the numbers in the right
day.

Thanks,
Attila


--- End Message ---
--- Begin Message ---
$today = date("w"); // $today will result in '1'
$today = date("D"); // $today will result in 'Mon'
$today = date("l"); // $today will result in 'Monday'

Now if you wanted to feed the script something like this:

$string = "01 Jul 2002";
$today = date("l",strtotime($string));

This will result in the long textual day of '01 Jul 2002', so 'Monday' or if
you interchange the "l" in the first part of the date function with "w" you
will get the the day of the week, numeric, i.e. "0" (Sunday) to "6"
(Saturday) or if you use "D" you will get the short textual day so 'Mon'

I hope all of that makes sense to you.  Check out the php manual for the
function date and strtotime.

http://www.php.net/date
http://www.php.net/strtotime

Rick

"Trust in the Lord with all your heart, And lean not on your own
understanding; In all your ways acknowledge Him, And he shall direct your
paths." - Proverbs 3:5-6


> From: "Attila" <[EMAIL PROTECTED]>
> Date: Mon, 15 Jul 2002 16:44:39 -0600
> To: [EMAIL PROTECTED]
> Subject: [PHP] Date () Help please
> 
> Hello all,
>   I am very new to PHP and I have added some minor PHP to my website.  I
> would like to make a PHP calander to keep track of things going on.  Could
> someone tell me how I can get the first day of every month.
> 
> For Example:
> 01 Jul 2002 was a Monday.
> 01 Mar 2002 will be a Thursday
> 
> I need the dates to start my tables so they insert the numbers in the right
> day.
> 
> Thanks,
> Attila
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
Ok your way works and thanks for the help but still struggling a little bit
here is what I have.

$year = date (Y);          //This gets me the current year 2002
$month = date (m);       //This gets me the current month 07
$day= 1;                      //always looking for the 1st day of the month
$string = "$year $month $day";
$today = date("w",strtotime($string));
echo $today;

My result is: 3

What am I doing wrong should this work????

Thanks for the help
attila
http://www.glorynaspiration.com




"Richard Baskett" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> $today = date("w"); // $today will result in '1'
> $today = date("D"); // $today will result in 'Mon'
> $today = date("l"); // $today will result in 'Monday'
>
> Now if you wanted to feed the script something like this:
>
> $string = "01 Jul 2002";
> $today = date("l",strtotime($string));
>
> This will result in the long textual day of '01 Jul 2002', so 'Monday' or
if
> you interchange the "l" in the first part of the date function with "w"
you
> will get the the day of the week, numeric, i.e. "0" (Sunday) to "6"
> (Saturday) or if you use "D" you will get the short textual day so 'Mon'
>
> I hope all of that makes sense to you.  Check out the php manual for the
> function date and strtotime.
>
> http://www.php.net/date
> http://www.php.net/strtotime
>
> Rick
>
> "Trust in the Lord with all your heart, And lean not on your own
> understanding; In all your ways acknowledge Him, And he shall direct your
> paths." - Proverbs 3:5-6
>
>
> > From: "Attila" <[EMAIL PROTECTED]>
> > Date: Mon, 15 Jul 2002 16:44:39 -0600
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Date () Help please
> >
> > Hello all,
> >   I am very new to PHP and I have added some minor PHP to my website.  I
> > would like to make a PHP calander to keep track of things going on.
Could
> > someone tell me how I can get the first day of every month.
> >
> > For Example:
> > 01 Jul 2002 was a Monday.
> > 01 Mar 2002 will be a Thursday
> >
> > I need the dates to start my tables so they insert the numbers in the
right
> > day.
> >
> > Thanks,
> > Attila
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>


--- End Message ---
--- Begin Message ---
OK thought I should share in case any needs it but got it to work.  Here is
what it looks like and thanks to Richard Baskett for the help.

$yr= date (Y);
$mnth = date (F);
$dy= 1;
$string = "$dy $mnth $yr";
$today = date("w",strtotime($string));

Thanks for the help
Attila
http://www.glorynaspiration.com


"Attila" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Ok your way works and thanks for the help but still struggling a little
bit
> here is what I have.
>
> $year = date (Y);          //This gets me the current year 2002
> $month = date (m);       //This gets me the current month 07
> $day= 1;                      //always looking for the 1st day of the
month
> $string = "$year $month $day";
> $today = date("w",strtotime($string));
> echo $today;
>
> My result is: 3
>
> What am I doing wrong should this work????
>
> Thanks for the help
> attila
> http://www.glorynaspiration.com
>
>
>
>
> "Richard Baskett" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > $today = date("w"); // $today will result in '1'
> > $today = date("D"); // $today will result in 'Mon'
> > $today = date("l"); // $today will result in 'Monday'
> >
> > Now if you wanted to feed the script something like this:
> >
> > $string = "01 Jul 2002";
> > $today = date("l",strtotime($string));
> >
> > This will result in the long textual day of '01 Jul 2002', so 'Monday'
or
> if
> > you interchange the "l" in the first part of the date function with "w"
> you
> > will get the the day of the week, numeric, i.e. "0" (Sunday) to "6"
> > (Saturday) or if you use "D" you will get the short textual day so 'Mon'
> >
> > I hope all of that makes sense to you.  Check out the php manual for the
> > function date and strtotime.
> >
> > http://www.php.net/date
> > http://www.php.net/strtotime
> >
> > Rick
> >
> > "Trust in the Lord with all your heart, And lean not on your own
> > understanding; In all your ways acknowledge Him, And he shall direct
your
> > paths." - Proverbs 3:5-6
> >
> >
> > > From: "Attila" <[EMAIL PROTECTED]>
> > > Date: Mon, 15 Jul 2002 16:44:39 -0600
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] Date () Help please
> > >
> > > Hello all,
> > >   I am very new to PHP and I have added some minor PHP to my website.
I
> > > would like to make a PHP calander to keep track of things going on.
> Could
> > > someone tell me how I can get the first day of every month.
> > >
> > > For Example:
> > > 01 Jul 2002 was a Monday.
> > > 01 Mar 2002 will be a Thursday
> > >
> > > I need the dates to start my tables so they insert the numbers in the
> right
> > > day.
> > >
> > > Thanks,
> > > Attila
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>
>


--- End Message ---
--- Begin Message ---
You could use mktime() with date, too...

$first_day = date("w",mktime(0,0,1,$month,1,$year));

Set your $month and $year accordingly.

---John Holmes...

> -----Original Message-----
> From: Attila [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 15, 2002 8:07 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Date () Help please
> 
> OK thought I should share in case any needs it but got it to work.
Here
> is
> what it looks like and thanks to Richard Baskett for the help.
> 
> $yr= date (Y);
> $mnth = date (F);
> $dy= 1;
> $string = "$dy $mnth $yr";
> $today = date("w",strtotime($string));
> 
> Thanks for the help
> Attila
> http://www.glorynaspiration.com
> 
> 
> "Attila" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Ok your way works and thanks for the help but still struggling a
little
> bit
> > here is what I have.
> >
> > $year = date (Y);          //This gets me the current year 2002
> > $month = date (m);       //This gets me the current month 07
> > $day= 1;                      //always looking for the 1st day of
the
> month
> > $string = "$year $month $day";
> > $today = date("w",strtotime($string));
> > echo $today;
> >
> > My result is: 3
> >
> > What am I doing wrong should this work????
> >
> > Thanks for the help
> > attila
> > http://www.glorynaspiration.com
> >
> >
> >
> >
> > "Richard Baskett" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > $today = date("w"); // $today will result in '1'
> > > $today = date("D"); // $today will result in 'Mon'
> > > $today = date("l"); // $today will result in 'Monday'
> > >
> > > Now if you wanted to feed the script something like this:
> > >
> > > $string = "01 Jul 2002";
> > > $today = date("l",strtotime($string));
> > >
> > > This will result in the long textual day of '01 Jul 2002', so
'Monday'
> or
> > if
> > > you interchange the "l" in the first part of the date function
with
> "w"
> > you
> > > will get the the day of the week, numeric, i.e. "0" (Sunday) to
"6"
> > > (Saturday) or if you use "D" you will get the short textual day so
> 'Mon'
> > >
> > > I hope all of that makes sense to you.  Check out the php manual
for
> the
> > > function date and strtotime.
> > >
> > > http://www.php.net/date
> > > http://www.php.net/strtotime
> > >
> > > Rick
> > >
> > > "Trust in the Lord with all your heart, And lean not on your own
> > > understanding; In all your ways acknowledge Him, And he shall
direct
> your
> > > paths." - Proverbs 3:5-6
> > >
> > >
> > > > From: "Attila" <[EMAIL PROTECTED]>
> > > > Date: Mon, 15 Jul 2002 16:44:39 -0600
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [PHP] Date () Help please
> > > >
> > > > Hello all,
> > > >   I am very new to PHP and I have added some minor PHP to my
> website.
> I
> > > > would like to make a PHP calander to keep track of things going
on.
> > Could
> > > > someone tell me how I can get the first day of every month.
> > > >
> > > > For Example:
> > > > 01 Jul 2002 was a Monday.
> > > > 01 Mar 2002 will be a Thursday
> > > >
> > > > I need the dates to start my tables so they insert the numbers
in
> the
> > right
> > > > day.
> > > >
> > > > Thanks,
> > > > Attila
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > >
> >
> >
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
I dont think Apache 2 or php 4.3.x are meant for production boxes..
My opinion, the latest verion of apache 1.3.x and php 4.1.2 (my test box 
is 4.2.1 but thats ok)

Michael Hall wrote:

>I've had a hunt through the mail archives but can't find a definite
>answer:
>
>Is Apache 2.0.x and PHP 4.2.x/4.3.x on Linux a viable proposition yet in a
>production environment? 
>
>I guess the diversity of experiences described in the archives probably
>means no, but what is the current opinion? Some of the archive messages
>I read are quite old now.
>
>
>--------------------------------
>Michael Hall     [EMAIL PROTECTED]
>--------------------------------
>
>
>  
>

-- 
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/



--- End Message ---
--- Begin Message ---
I've been trying to get a simple php page to produce any output through a
Jigsaw server.

I've got past the problem of cgi.redirect and now my server launches php and
returns a "page" but it's blank.  There is no evidence of my html or php
code having been seen by the server.  I've run the php script from the
command line and I get the html code I'd expect.

With Jigsaw's debug facility DISabled for the cgi scripts I get the
following html served to the browser:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
</HEAD>
<BODY>
</BODY>
</HTML>
which produces a totally empty, white page.

With Jigsaw's debug facility Enabled, I get two lines on the page and the
same two lines (without html tags of any sort) in "view source" display:
X-Powered-By: PHP/4.2.1
Content-type: text/html


At this point, my php script file contains only php commands - no html.

Any clues?

Murray Nicholas

--- End Message ---
--- Begin Message ---
>With Jigsaw's debug facility Enabled, I get two lines on the page and the
>same two lines (without html tags of any sort) in "view source" display:
>X-Powered-By: PHP/4.2.1
>Content-type: text/html

If these two lines are showing up in the BROWSER, then something is pretty
wrong...

They're supposed to be headers...

So something could be sending out a blank line or something before these,
somehow...

If they are just showing up in debugging output, and they *ARE* headers,
then PHP *IS* getting invoked, and then dying when it tries to execute your
code.

Try using *JUST* this in your PHP document:

<?php phpinfo();?>

It's pretty hard to screw up something that short, so you'll know the PHP is
valid :-)

And, if it works, you get a wonderfully long HTML document spewed out.  It's
so fun to type so little and get so much :-)

-- 
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
-----Original Message-----
From: Analysis & Solutions
Sent: Friday, July 12, 2002 9:57 AM
To: PHP List
Subject: Re: [PHP] Re: Editing files by line

>Unfortunately, if a file is opened for appending via fopen('name', 'a'),
>the manual says the data is put at the end of the file regardless of using
>fseek().
>
> --Dan
I've written a script that edits a specific line in a text file and saves
the changes to the file for that specific line. I've noticed though that I
can't edit the first line in the file, which would be zero in the array
created by the file() function. When I write the edited data back to the
file I am using "w+" as the mode.

Is this related to the array or to the file mode?

-- Onaje Johnston

--- End Message ---
--- Begin Message ---
On Mon, Jul 15, 2002 at 08:46:14PM -0400, Onaje Johnston wrote:
>
> I've written a script that edits a specific line in a text file and saves
> the changes to the file for that specific line. I've noticed though that I
> can't edit the first line in the file

Without seeing the script, it'd be hard for us to say.  So, post the
_relevant parts_ of the script to the list.

--Dan

-- 
               PHP classes that make web design easier
        SQL Solution  |   Layout Solution   |  Form Solution
    sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409
--- End Message ---
--- Begin Message ---
> > - how is it possible to run a php script periodicly?
> 
> Depends on your OS. If you're on Linux or similar then use cron. If
you're
> on
> Windows NT/2k, use AT. If you're on Windows 9x IIRC there is a
scheduler
> in the
> control panel.

AT seemed flaky when I tried to use it. You can use the Program
Scheduler and have it open up IE with an address. The command line would
be something like 

C:\whatever\path\iexplore.exe http://www.yourpage.com/script.php

And somewhere in the config you can tell it to "End this program after X
minutes". Set that at whatever and IE will shutdown after that many
minutes. Seems to work well if you can't get AT working...

---John Holmes...

--- End Message ---
--- Begin Message ---
Hey guys,

I was wondering if anyone on the list could recommend web sites to visit
to find free PHP books available on the 'net in either PDF or HTML
format.

Thanks,

CHRIS(.deletedscenes.org)

--- End Message ---
--- Begin Message ---
try out http://www.informit.com

-----Original Message-----
From: Chris Carlson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 16, 2002 11:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Free PHP Books in PDF or HTML Format


Hey guys,

I was wondering if anyone on the list could recommend web sites to visit
to find free PHP books available on the 'net in either PDF or HTML
format.

Thanks,

CHRIS(.deletedscenes.org)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi there

I came across with some reference indicating there was a library called OOH
forms, wondering if anyone knows about the status of that lib, or has those
features been incorporated into some others?  OR simply, Is there any
similar one, thanks.

/dl


--- End Message ---
--- Begin Message ---
> I came across with some reference indicating there was a library
called
> OOH
> forms, wondering if anyone knows about the status of that lib, or has
> those
> features been incorporated into some others?  OR simply, Is there any
> similar one, thanks.

http://www.google.com/search?sourceid=navclient&q=OOH+forms

---John Holmes...

--- End Message ---
--- Begin Message ---
Lo all,

  if (getmxrr($DomainPart, $DomainMX, $Weight)) {
    for ($Counter = 0; $Counter < count($DomainMX); $Counter++) {
      echo "$DomainMX[$Counter] ($Weight[$Counter]) ";
    }
  }

How can I manage to sort $DomainMX from the lowest $Weight to the highest,
while still preserving the proper $Weight to the $DomainMX?

Thankies :-)

--
me


--- End Message ---
--- Begin Message ---
Hi

I want to use my cvs to log to php.net servers and get the manual files and
translate it to arabic ..
How can I log to cvs and what the important setting and info for that ?
How can I log using Wincvs

--- End Message ---
--- Begin Message ---
>Problem: How do I display all the tblCountriesOfOperation for one 
>tblContacts record SO THAT MULTIPLE COUNTRIES CAN BE ADDED OR DELETED FOR 
>THAT RECORD?

create table contacts(
  contact_id int(11) unsigned auto_increment unique not null primary key,
  name text
);

create table countries(
  country_code char(2) unique not null primary key,
  name text
);

create table contact_countries(
  contact_id int(11) unsigned,
  country_code char(2),
  unique key contact_country_key(contact_id, country_code)
);

This last table is a "lookup" table, or cross-join table, or ...

Lots of names for it.

Basic idea is to just have a running list of contacts and countries "matched
up" by their IDs.

Sample Data:
insert into contacts(name) values('Rasmus Lerdorf');
insert into contacts(name) values('Ze\'ev Suraski');
insert into contacts(name) values('Andi Gutman);

insert into countries(country_code, name) values('US', 'United States');
insert into countries(country_code, name) values('CA', 'Canada');
insert into countries(country_code, name) values('IL', 'Israel');

insert into contact_countries(1, 'US'); # I think Rasmus is still in Silicon
Valley somewhere
insert into contact_countries(1, 'CA'); # But he used to work in Canada
insert into contact_countries(2, 'US'); # Zeev and Andi are mostly in
Israel, but
insert into contact_countries(2, 'IL'); # but come to the US for conferences
frequently.
insert into contact_countries(3, 'US');
insert into contact_countries(3, 'IL');

The above assumes that your table was empty, so Rasmus is 1, Ze'ev is 2, and
Andi is 3...

This "middle" table, contact_countries, lets you associate as many, or as
few, people with countries as you need.

The display code could be something like this:

<HTML><BODY><FORM ACTION=<?=$PHP_SELF?> METHOD=POST>
<?php
  $contact_id = (int) $_REQUEST['contact_id']; # Don't really care if it's
_GET or _POST
                                               # (int) is a crude but
effective anti-hack measure
  if (isset($_POST['contact_countries'])){
    # First, wipe out all the "old" contact/country for this person:
    $query = "delete from contact_countries where contact_id = $contact_id";
    mysql_query($query) or error_log(mysql_error());
    # Then put in the "new" settings:
    while (list($country_code) = each($contact_countries)){
      $country_code = substr($country_code, 0, 2); # Crude but effective
anti-hack
      $query = "insert into contact_countries(contact_id, country_code) ";
      $query .= " values ($contact_id, $country_code)";
      mysql_query($query) or error_log(mysql_error());
    }
  }
  
  # Display contact name:
  $query = "select name from contacts where contact_id = $contact_id";
  $contact = mysql_query($query) or error_log(mysql_error());
  list($name) = mysql_fetch_row($contact);
  echo "Contact: <B>$name</B><BR>\n<BR>\n";
  
  # Now to display current country selections:
  
  # Crucial:  ' order by name ' lets me run through $contact_countries and
$countries "in parallel"
  $query = "select countries.country_code from contact_countries, countries
";
  $query .= " where contact_id = $contact_id ";
  $query .= "   and countries.country_code = contact_countries.country_code
";
  $query .= " order by name ";
  $contact_countries = mysql_query($query) or error_log(mysql_error());
  
  $query = "select country_code, name from countries order by name ";
  $all_countries = mysql_query($query) or error_log(mysql_error());
  
  $contact_country_row = 0;
  while (list($code, $name) = mysql_fetch_row($all_countries)){
    if ($code == mysql_result($contact_countries, 0, 0)){
      $selected = 'SELECTED';
      $contact_country_row++;
    }
    else{
      $selected = '';
    }
    echo "<INPUT TYPE=CHECKBOX NAME=contact_countries[$code] $selected>
$name<BR>\n";
  }
?>
  <INPUT TYPE=SUBMIT VALUE='Update Countries'>
</FORM></BODY></HTML>

This code is untested, but should be okay other than typos...

-- 
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
>Anyone know how to do have a variable equal the contents of a file?  I tried
>the include function, but it just prints the file out on the screen rather
>than including the contents in the variable itself.  I need help with this
>ASAP.  Thanks.

<?php
  $data = file('/full/path/to/filename') or die("Could not open file.");
  $data = implode('', $data);
?>


-- 
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
>
>Well I don't see a user group listed for Gainesville, FL... and we could 
>have a cool acronym too
>
> PUGG
>
>(php users group of gainesville)
>
>ok, that's a first attempt, but anyway....
>
>So are there other Gainesville, Florida folks around?  If so please drop 
>me a link and maybe we can form a local UG.

Some of the listings at http://phpusergroups.org are nothing more than a
single person trying to form a group...

I would assume, then, that such additions are welcome, and more likely to be
effective in the long run than just posting here.

Not saying you shouldn't have posted, just that your odds will increase a
lot if you go "on record" permanently as desiring to form a User Group.

-- 
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
>It looks like I should be using is_null(), but I'm not sure how to use it,
>especially since all of this is embedded in a print statement.

Disclaimer:
is_null() is new-fangled, and while I assume it matches up with SQL NULL,
it's *POSSIBLE* that PHP's NULL is for something entirely different than SQL
NULL.  Read the docs.

>Instead of just printing Email: $row[1], I'd like to test whether it's null
>first--maybe something like this?
>
>if (is_null($row[1])) print " " else print ("Email: $row[0]")
>
>but can I put that line inside of another print statement?  if so, do I have
>to escape the quotation marks?  Please forgive my confusion--I'm new to
>programming in general and PHP in particular.

Several options are available.

In all cases, I've replaced the if/else with the trinary ? : operator.  Less
clunky.

$email = is_null($row[0]) ? 'NULL' : $email;
# Didja know you could just hit TAB instead of that funky \t stuff?  Way
prettier, IMNSHO.
print("    <tr><td>$email</td>...");

print("    <TR><TD>" . is_null($row[0]) ? 'NULL' : $email . "</TD>";

#echo will take as many arguments as you like.
echo "<TR><TD>", is_null($row[0]) ? 'NULL' : $email, "</TD>...";


-- 
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
>i'm new and i'm trouble with this code :'( can U help me please ??

This would be much easier if you told us what was going wrong...

I'll point out the ones I see, but it's just a guessing game (not a very fun
guessing game).

>while ($cd_tbl = mysql_fetch_array ($result))
>{

>if(is_int("$cd_id") = TRUE)

This will never be TRUE...

"$cd_id" *FORCES* $cd_id to be a string.

And, actually, you want == here, not =
The = is used to store a value in something.
The == is used to test for equality

Since it comes from the database, $cd_id will probably always be a string
anyway...

You can't do this:

>echo "<td bgcolor="$bgcolor"><font face=Verdana size=1><b>$cd_id</b></font></td>";
      ^            ^^       ^                                               
    ^
      |            |\       |                                               
    |
PHP sees        And  \      Way too confused by now...
this as the     this  \
beginning       is the \
of a string.    *END* of\
                that     This is junk...
                string.

You want:

echo "<td bgcolor=\"$bgcolor\"><font face=Verdana
size=1><b>$cd_id</id></font></td>";

Or, since HTML accepts ' as well as ", so long as they are 'matched'

echo "<td bgcolor='$bgcolor'><font face=Verdana
size=1><b>$cd_id</id></font></td>";

Or, if you only care about browsers working, and not some pie-in-the-sky W3C
proclamation of style:

echo "<td bgcolor=$bgcolor><font face=Verdana
size=1><b>$cd_id</id></font></td>";


You should, however, realize that many, many, many people will *NOT* have
Verdana font installed.
They will see that icky Times font.
You can list multiple fonts:

echo "<td bgcolor=$bgcolor><font face=Verdana,Helvetica,Arial
size=1><b>$cd_id</id></font></td>";

'Course, if you start putting spaces in the font, you *NEED* the quotes:

echo "<td bgcolor=$bgcolor><font face='Verdana,Comic sans,Helvetica,Arial'
size=1><b>$cd_id</id></font></td>";

You may also want to tack \n at the end of every string, so when you do
"View Source" in your browser, you can see something intelligible.

echo "<td bgcolor=$bgcolor><font face=Verdana
size=1><b>$cd_id</id></font></td>\n";

-- 
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
>    I wrote some times ago an library to draw graphics in 2 and 3 D, but
>this sources are write in C, whats the procedures I need to use this rotines
>in PHP.

You need to create a PHP "extension" library.

Samples are in Rasmus' talks at http://conf.php.net

They are Un*x .so files on steroids -- IE, with some PHP wrappers to make
the PHP-callable.

-- 
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
>Would anyone know of any PHP training or courses in Australia...

Luke and Laura :-) run a fabulous PHP program through the Royal Mumble Iblle
T-something...

Royal Melbourne Institute of Technology?

>Also for the devolopers...
>
>Is there at present, or a future plan for a PHPCE
>A certified engineer :)
>
>Just a thought since everyone else has them....

Enh.  I mean, to me, an MCSE proves nothing of any value, really.  That's
just my opinion, though.

-- 
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
>I am planning to use PHP to develop some scripts that will need to 
>create and manipulate html pages.  One of the things that will be 
>created is a DOM tree of the html.
>
>After reading the manual I've found that php supports the event-driven 
>and dom xml, but with the latter tagged as EXPERIMENTAL.  I've also 
>noticed that as of 4.3.0-dev (which I am using) the api has changed.
>
>So I'd like to know how "experimental" (also stable) this support is and 
>suggestions regarding this issue and DOM itself.
>
>One of the main issues is that I'll need to cope with html (not xml) and 
>mostly not "well-formed".

Disclaimer:
The following statements are based strictly on heresay:

I don't think the DOM in PHP lets you have any "hooks" for mal-formed XML.

It either is well-formed, or DOM pukes all over your pretty blue suede
shoes.

I think you may be better off writing a SAX parser-based XML algorithm.

You'll be able to deal with the idiosyncracies of your HTML-coders better,
and to recover with more flexibility from the errors.

I think DOM will give you a line number and column (character within the
line) number, and maybe even an XML error message.  But you won't be able to
convince it to just "accept" the HTML and move on with life as it is. 
You'll be forced to "fix" the HTML to match XML specs, which, like is just
wrong, since HTML isn't XML.

-- 
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
>I’ve been fooling around with a LOOP which should show one or more text
>string stored in separate rows in a DB. The trick would we to separate
>them with commas (,) when there’s another string to show or end it with
>a period (.) if no other row is found according to the SELECT criteria.
>This is what I have so far:
>
>for ($m=0; $m<$num_rows2; $m++)
>{
>$row2 = mysql_fetch_array($result2);
>
>echo $row2[devlanguage];
>
>if ($m < $num_rows2)
>{
>echo ", ";
>}
>else
>{
>echo ".";
>}
>}
>
>The problem is that the LOOP stops as it’s told to do, keeping the ELSE
>statement from doing it’s work, resulting in comma separated string as
>it should, but also add an extra comma at the end of it instead of a
>period. What approach should I use?

This is a case where doing echo as you go is not so good, because you can't
take it back :-)

$output = '';
while (list($devlanguage) = mysql_fetch_row($result2)){
  $output .= "$devlanguage, ";
}
# Strip off final comma:
$output = substr($output, 0, -2);
$output .= ".";
echo $output;

--
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
>Hi, got a question.
>
>What happend if ignore_user_abort is true, and the user closes the window?
>
>Also, i tried, but i push the stop button, and the script stops, shouldn 
>ignore that?.

I *THINK* ignore_user_abort() is only useful with some browsers...

Or, perhaps, it relies on Apache figuring out that the connection is dead,
and reporting back to PHP, and there's a fair amount of time-lag in that
process...

Or, perhaps, it never really worked very well...

All I now for sure is that I have this vague idea in my head that it's just
not something you can really rely on.

It's still convenient to kill lengthy processes, but not for
mission-critical knowledge of the HTTP status.

If you *NEED* to be sure, I think you're stuck with Java applet/servelet
setup, from what I hear.  (Strictly heresay.)

-- 
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
>
>Hi
>
>I use this line
>
>fputs ($sysname_log, "$time - SystemName: $sysname\n");
>
>I would like to get a log file, and everytime I refresh this page it will
>make a new line and write
>$the local time - SystemName: $sysname
>So after a while it will look like this
>
>$the local time - SystemName: $sysname
>$the local time - SystemName: $sysname
>$the local time - SystemName: $sysname
>
>BUT, this is not working, I don´t get a new line, everything is on the same
>line. Why??
>I use WIN2K and IIS.

The Windows newline characters are "\r\n" not just "\n"

--
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
>Hi,
>I have two questions:
>what is the meaning of (int type) return value of dio_seek() function in PHP ?
>second question:  
>how can I get the position in file, pointed by file descriptor (dio_*() )?
>In C/C++ language, this is implemented in ftell function.

http://php.net/fseek
http://php.net/ftell

-- 
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
>Is there any way I can set up a php script so that it will detect the 
>login of the current Netware user on a PC and use that user's 
>information to customize a greeting for the user?

Almost for sure, no.

But, to be 100% sure, do this:

<?php phpinfo();?>

And surf from that Netware box to it.

If Netware is telling PHP something useful (unlikely), PHP will spew it out
there.

-- 
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
>One of the threads above Speak of PHP 4.3  I was not
>aware that it existed...  Is it still in its Testing stages?
>How come its not on the PHP Website?  Are there any
>great modifications to it?

If other need to look even farther ahead, http://cvs.php.net is a safe bet
for the most recent developments for 'way in the future.

-- 
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
>this is fine under netscape but IE has problems.
>
>consider the following code:

>but this code which only has the difference of using the POST method 
>instead of the GET metod results in a "file is corrupt" message!

Assuming there's not something more subtle going on...

My best rationalization is that Microsoft somehow thinks that the only valid
response to a POST is an HTML document...

Maybe try using Keep-Alive or whatever and sending out some HTML as well as
the PDF, just to see...

Or, just live with GET and move on with life :-)

Actually...

Is the *NAME* of the ACTION= file ending in .pdf?  If it's not, make it be
.pdf, and use ForceType to force PHP to parse it.

Perhaps IE is just upset that you told it to expect an HTML file with the
URL, but then sent a PDF.

-- 
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
>I want to update the most recent record (based on the timestamp in field
>posted) where the parent field == a specified value (in a table called
>header).
>
>I tried the following mysql statement:
>
>"UPDATE header WHERE parent = '$this->postid' ORDER by posted SET
>parent='$this->parent' LIMIT1";
>
>but apparently you can't use ORDER in an UPDATE statement.  If I take order
>out, the statement works.  That being true (and please correct me if its
>not) how can I ensure that the newest record is the one being acted upon?

Perhaps:

where posted = max(posted)

assuming no *TWO* are ever posted within the same second, which is a very
dangerous assumption for a busy site...

Can't you just pass in the ID of the actual header you want changed, instead
of only its parent?

-- 
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
>I am trying to get PHP 4.2.1 installed on Solaris 8 with apache 1.3.22.
>It installed ok, but when I restart apache I get the follow error in my
>error_log file.
>
>/usr/local/apache/logs/error_log
>[Thu Jul 11 13:13:11 2002] [notice] Apache/1.3.22 (Unix) PHP/4.2.1
>configured -- resuming normal operations
>[Thu Jul 11 13:13:11 2002] [notice] Accept mutex: fcntl (Default: fcntl)
>[Thu Jul 11 13:13:11 2002] [alert] Child 20902 returned a Fatal error...
>
>Any ideas of what to try next.

Didja search the archives and http://bugs.php.net for "Accept mutex:
fcntl"?...

-- 
Like Music?  http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
Hello,

There is such a library, you can find it in PEAR.

It needs some cleanup and improvements though.

Arnaud.

> Hi there
> 
> I came across with some reference indicating there was a library called OOH
> forms, wondering if anyone knows about the status of that lib, or has those
> features been incorporated into some others?  OR simply, Is there any
> similar one, thanks.
> 
> /dl
--- End Message ---
--- Begin Message ---
I have a situation where I have one browser window open for lets say web
application 'x'. Now I want my user to goto application 'y' on the same
domain in a new browser window by passing the authentication information
from application 'x' to application 'y'. I obviously donot want my
session variables to be continued in application 'y'. But at the same
time I donot want to destroy the session of my application 'x'

Since they r in two COMPLETELY separate browser windows, both sessions
should logically be separate. But for some reason IE & netscape take a
new window in the same Instance.

Is there any way I can open a new browser instance, such that the same
session is not continued and a new session in created leaving the old
session as it is?

Or is there any other work around for the same?

- Divyank


--- End Message ---
--- Begin Message ---
I am looking for PHP code that will submit (post) a form automaically to a
ANOTHER php page.  I do not want to press a submit button.  I have found a
class at PHPClasses but it is too complicated for my needs.  What is the
simplest way of doing this?  What is the theoretical approach?

The reason I need this is that I have a table output from a database after
one submits 'n list of variables (form inputs).  I want to update a graph in
another Iframe automatically without clicking on another submit button.

Tx
MH


--- End Message ---
--- Begin Message ---
three methods that I can think of:
1. header("location: url");
2. <meta http-equiv="refresh" content="0;url">
3. Hidden form + JavaScript

-----Original Message-----
From: MindHunter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 16, 2002 4:33 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Submit code


I am looking for PHP code that will submit (post) a form automaically to a
ANOTHER php page.  I do not want to press a submit button.  I have found a
class at PHPClasses but it is too complicated for my needs.  What is the
simplest way of doing this?  What is the theoretical approach?

The reason I need this is that I have a table output from a database after
one submits 'n list of variables (form inputs).  I want to update a graph in
another Iframe automatically without clicking on another submit button.

Tx
MH



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
The Snoopy class would do this nicely.  http://snoopy.sourceforge.net/

That may be too complicated of class as you mentioned, but it's probably the
best solution for you, and once setup, your task will be very easy to do
with
this class.  I had a similar situation where I needed to do a simple form
post, and found some very basic code, but it slowed by app down so much it
had to be replaced eventually anyway.

HTH,

Peter Janett

New Media One Web Services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New Upgrades Are Now Live!!!
Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1
Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25,
Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PostgreSQL coming soon!

http://www.newmediaone.net
[EMAIL PROTECTED]
(303)828-9882

----- Original Message -----
From: "Martin Towell" <[EMAIL PROTECTED]>
To: "'MindHunter'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, July 16, 2002 12:33 AM
Subject: RE: [PHP] Submit code


> three methods that I can think of:
> 1. header("location: url");
> 2. <meta http-equiv="refresh" content="0;url">
> 3. Hidden form + JavaScript
>
> -----Original Message-----
> From: MindHunter [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 16, 2002 4:33 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Submit code
>
>
> I am looking for PHP code that will submit (post) a form automaically to a
> ANOTHER php page.  I do not want to press a submit button.  I have found a
> class at PHPClasses but it is too complicated for my needs.  What is the
> simplest way of doing this?  What is the theoretical approach?
>
> The reason I need this is that I have a table output from a database after
> one submits 'n list of variables (form inputs).  I want to update a graph
in
> another Iframe automatically without clicking on another submit button.
>
> Tx
> MH
>


--- End Message ---
--- Begin Message ---
> I am looking for PHP code that will submit (post) a form automaically to a
> ANOTHER php page.  I do not want to press a submit button.  I have found a
> class at PHPClasses but it is too complicated for my needs.  What is the
> simplest way of doing this?  What is the theoretical approach?

I think the only way to submit a form automatically is with JavaScript.

--- End Message ---
--- Begin Message ---
Hello andy,

      Well i do work on the same project. Now i got little lost with
      headers. If anyone can help me I'll be glad. as for all othe
      issues like updating databases they are solved :) With now cron
      job :)
      
Monday, July 15, 2002, 7:27:19 PM, you wrote:

>> It would be relatively straight-forward to have a PHP script run
a> periodically,
>> read from an NNTP server ..

a> ok sounds logical. Don't have any experiance on doing anything nntp related
a> in php.

a> There are some questions I am wondering about:

a> - do I have to compile php with a special flag to do this?
a> - how is it possible to run a php script periodicly?
a> - can you mak a short example how to read from a nntp server?

a> Thanx for your help,

a> Andy



a> "Stuart Dallas" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
a> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> On Monday, July 15, 2002, 2:42:24 PM, Stuart Dallas wrote:
>> > On Monday, July 15, 2002, 1:55:44 PM, "Andy" wrote:
>> >> Has anybody an idea how they do this.
>>
>> It would be relatively straight-forward to have a PHP script run
a> periodically,
>> read from an NNTP server and add new posts into the forum database. This
a> is how
>> I would guess that they do it.
>>
>> --
>> Stuart
>>






-- 
Best regards,
 Latex                            mailto:[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Dear all
I had a folder which the path is : (\\nedcoraa\pdf_reports\dealing
room\report) it stores a lot of PDF reports in there.
I'm trying to use the file_exists() function to detect if a specific file
exist in this folder, but i got a problem is :
It seems that php can go through (\\nedcoraa\pdf_reports) but it can't go
through (dealing room) folder. i had made test on it, i moved a file into
(\\nedcoraa\pdf_reports), then php can detect it, but if i move it to
(\\nedcoraa\pdf_reports\dealing room), then it can't detect the file! why?

I'm using php in windows NT IIS environment!

Please help me!

--
Thx a lot!
Jack
[EMAIL PROTECTED]


--- End Message ---
--- Begin Message ---
Jack, try using forward slashes instead of backslashes;eg

$fp = fopen("//nedcoraa/pdf_reports/dealing/filename.ext", "r+");

Cheers

-----Original Message-----
From: Jack [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, 16 July 2002 5:02 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] Problem on file_exists()


Dear all
I had a folder which the path is : (\\nedcoraa\pdf_reports\dealing
room\report) it stores a lot of PDF reports in there.
I'm trying to use the file_exists() function to detect if a specific file
exist in this folder, but i got a problem is :
It seems that php can go through (\\nedcoraa\pdf_reports) but it can't go
through (dealing room) folder. i had made test on it, i moved a file into
(\\nedcoraa\pdf_reports), then php can detect it, but if i move it to
(\\nedcoraa\pdf_reports\dealing room), then it can't detect the file! why?

I'm using php in windows NT IIS environment!

Please help me!

--
Thx a lot!
Jack
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Jack,

Probably because of the space in the directory "dealing room" - you'd be
best advised to avoid spaces in directory names.

~James

"Jack" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Dear all
> I had a folder which the path is : (\\nedcoraa\pdf_reports\dealing
> room\report) it stores a lot of PDF reports in there.
> I'm trying to use the file_exists() function to detect if a specific file
> exist in this folder, but i got a problem is :
> It seems that php can go through (\\nedcoraa\pdf_reports) but it can't go
> through (dealing room) folder. i had made test on it, i moved a file into
> (\\nedcoraa\pdf_reports), then php can detect it, but if i move it to
> (\\nedcoraa\pdf_reports\dealing room), then it can't detect the file! why?
>
> I'm using php in windows NT IIS environment!
>
> Please help me!
>
> --
> Thx a lot!
> Jack
> [EMAIL PROTECTED]
>
>


--- End Message ---
--- Begin Message ---

> Failed opening '/var/www/html/BOOKS/newbooks.php' for inclusion
> (include_path='.:/php/includes:/usr/share/php') in Unknown on line 0
> 
> I am getting the following error, when the file newbooks.php is invoked.
> The first lines in this entire file starts with the <?php tag, followed by
> 4 lines of comments. What could be the problem here.
> 
> Thanks in advance,
> Sachin.
--- End Message ---
--- Begin Message ---

 > > Failed opening '/var/www/html/BOOKS/newbooks.php' for inclusion
 > > (include_path='.:/php/includes:/usr/share/php') in Unknown 
 > on line 0
 > > 
 > > I am getting the following error, when the file 
 > newbooks.php is invoked.
 > > The first lines in this entire file starts with the <?php 
 > tag, followed by
 > > 4 lines of comments. What could be the problem here.

At a guess I'd say you've got something in your code that looks
something like this:

Include("some/path/newbooks.php");

You'll need to check the 'some/path' bit to see if that is where the
file 'newbooks.php' is actually stored. Making another guess based on
the above I'd also check that 'BOOKS' is the right directory name,
particularly keeping in mind that 'BOOKS' is a completely different
directory to 'Books' and to 'books' on a unix system.

CYA, Dave



--- End Message ---
--- Begin Message ---
Hello all,

Thanks for the suggestions. But my .php file does not have any include
statement any where in the page. Is there any thing which I have to check
out? The site contains 6 .php files, and it is only in this file the error
comes.

Thanks once again,
Sachin.

--- End Message ---
--- Begin Message ---
PHP is compiled with PostgreSQL support but I can not connect. I get
this error message What does it mean and what do I need to do to fix
it

Warning: pg_connect() unable to connect to PostgreSQL server: connectDB()
-- connect() failed: Connection refused Is the postmaster running (with -i)
at 'localhost' and accepting connections on TCP/IP port '5583'? in
/home/sites/home/web/test/test.php on line 2


  

-- 
Best regards,
 rdkurth                          mailto:[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:

> PHP is compiled with PostgreSQL support but I can not connect. I get
> this error message What does it mean and what do I need to do to fix
> it
> 
> Warning: pg_connect() unable to connect to PostgreSQL server: connectDB()
> -- connect() failed: Connection refused Is the postmaster running (with -i)
> at 'localhost' and accepting connections on TCP/IP port '5583'? in
> /home/sites/home/web/test/test.php on line 2
> 
> 
>   
> 
> 

either your postmaster is not running... or your postmaster does not 
accept TCP/IP connections... read the documentation for PostgreSQL 
Installation it has tons of info there for your convenience...

try editing your pg_hba.conf file for postgreSQL... so it will accept
tcp IP connections:

host         all         <IP>  255.255.255.0       trust


where IP is the ip address of the host that will access the postgreSQL
database at the server.

i hope i got it right



-- 
Lejanson C. Go, SDE I

--- End Message ---
--- Begin Message ---
I can't connect to mssql!
When I start PHP page with MsSQL connection, PHP craches and I receive this:

PHP caused an invalid page fault in
module NTWDBLIB.DLL at 0167:73330fde.
Registers:
EAX=00000020 CS=0167 EIP=73330fde EFLGS=00010246
EBX=00000010 SS=016f ESP=0063f600 EBP=0063f610
ECX=00797fe0 DS=016f ESI=00000012 FS=4b5f
EDX=00000000 ES=016f EDI=00797fe0 GS=0000
Bytes at CS:EIP:
c6 04 01 00 8b 45 f4 d1 e0 8b e5 5d c2 14 00 cc
Stack dump:
760014d7 00000010 00000000 00000010 0063f67c 7333165e 014d7980 00797fe0
00000010 00000000 ffffffff 00797fe0 00000012 0000000b 7335a294 00000030

What is the problem?
lease help!


--- End Message ---
--- Begin Message ---
Hello! I have a page which is called by:

<A
HREF="/myfolder/mypage.php4?MyVar1=Something&MyVar2=Someother#JumpHere">

Now I want to get the Anchor "#JumpHere" (which could be different each
time) in mypage.php4.

With PATH_INFO, I only get "/myfolder/mypage.php4";
With QUERY_STRING, I only get "MyVar1=Something&MyVar2=Someother"
With PhpInfo, I couldn't find any "JumpHere".

Any ideas how I can get the anchor in a php-page?

Martin


--- End Message ---
--- Begin Message ---
Oh, it seems, that only Netscape 4 is doing this wrong...


--- End Message ---
--- Begin Message ---
Hi Jimmy,

In many cases, I'd go for a regex, though with this (because it's just a
straight replacement), I'd just use str_replace (and since about the closest
thing to a vertical tab would be a new line in html, use that as the
replacement):

$string = str_replace("^K", "\n", $string);

James


"Jimmy Brake" <[EMAIL PROTECTED]> wrote in message
1026765137.15017.151.camel@linux">news:1026765137.15017.151.camel@linux...
> Hi!
>
> I keep getting that evil little character ... ^k  from mac users (pre X)
> and I need to remove it. Does anyone know how to remove?
>
> This site has that character as a vertical tab. This character is what
> is used in MS Excel when people hit return inside a cell. If they copy
> and paste that into a form its ok, but when I export that data to a csv
> it gets ugly.
>
> http://www.robelle.com/smugbook/ascii.html
>
> Thanks in advance!
>
> Jimmy
>


--- End Message ---
--- Begin Message ---
Hey,

        Anybody has ideas on how to detect the connection speed of visitors in order 
to automatically take them to the Hi-speed or low-speed version of a site?

        We want to make a hi and low speed side, but I would prefer not to confuse 
visitors with a page where they have to choose between hi or low speed. I 
personnaly find these annoying, as they are a useless step towards the 
information I am looking for when I am checking a website.

        What I was thinking about is doing a reverse dns lookup on the client's IP 
and try to determine quickly if he's on a low or hi speed connection. For a 
very good proportion of visitors, I think it is possible to determine it.

These would go to the low-speed site:
"dialup" (ex.: dialup-209.244.92.247.dial1.dallas1.level3.net)
"aol"
"ppp"
...

These would go to the hi-speed site:
"cable" (ex.: wc08.ym.rnc.net.cable.rogers.com)
"dsl" (ex.: mpy-77-035.adsl.reimari.net)
"home" (ex.: cp111494-a.roemd1.lb.nl.home.com)
...
and any IP starting by 24., since these seems to be owned only by cable 
modems.


        With a little bit of tweaking it would be possible to properly route more 
than half of the visitors, simply by looking at their IP address and 
associtated hostname. The remaining would go to the default side (hi or low), 
and we would make it easy to switch from the hi-speed side to the low-speed 
one and vice-versa.

        I am open to suggestions on ways to improve such system and general 
comments.. 


Cedric

--- End Message ---

Reply via email to