[PHP] About Session_Start() with different Browser

2003-09-18 Thread Harry Yau
Hi all,
I am new to php. At first, I wrote a php script to generate a pdf
file from a tex file and load that pdf file to the browser by call a
system call of latex -pdftex. After loading the pdf file. I wrote a
function to remove all temp file created by latex. It work fine and it
did all I expected. The php script work on IE 5, Netscape 4.79 and
Mozilla 5.0.
However, when I've tried to add a command "session_start" at the
beginning of my script and even did set and get those session variables,
different functionility of the php script MISSed upon different browse.
On Netscape 4.79,  it does generate the pdf file and  remove those
temp file, but loading the pdf file to the browser. The Netscape keeps
complainning about the pdf file is damaged and could not be repaired.
On IE5, the script does load the pdf file, but it does not remove
those temp file.
Nevertheless, on Mozilla, it works fine for me!!
For not loading the pdf on netscape, I thought it is because the
script does some output to the browser before I call
"header("content-type:application/pdf");" Therefore, I put "ob_start()"
before starting session and call "ob_end_clean()" before setting the
header for pdf content. It does not correct the problem.
I am wondering what exactly the "session_start()" does? How it can
have different effect upon various browser? Of simply, please tell me
how to correct those problems!~
Thank You Very Much!~

Best Regards,
Harry Yau

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



[PHP] Session with various Browser.

2003-09-18 Thread Harry Yau
Hi all,
I am new to php. At first, I wrote a php script to generate a pdf
file from a tex file and load that pdf file to the browser by call a
system call of latex -pdftex. After loading the pdf file. I wrote a
function to remove all temp file created by latex. It work fine and it
did all I expected. The php script work on IE 5, Netscape 4.79 and
Mozilla 5.0.
However, when I've tried to add a command "session_start" at the
beginning of my script and even did set and get those session variables,
different functionility of the php script MISSed upon different browse.
On Netscape 4.79,  it does generate the pdf file and  remove those
temp file, but loading the pdf file to the browser. The Netscape keeps
complainning about the pdf file is damaged and could not be repaired.
On IE5, the script does load the pdf file, but it does not remove
those temp file.
Nevertheless, on Mozilla, it works fine for me!!
For not loading the pdf on netscape, I thought it is because the
script does some output to the browser before I call
"header("content-type:application/pdf");" Therefore, I put "ob_start()"
before starting session and call "ob_end_clean()" before setting the
header for pdf content. It does not correct the problem.
I am wondering what exactly the "session_start()" does? How it can
have different effect upon various browser? Of simply, please tell me
how to correct those problems!~
Thank You Very Much!~


Best Regards,
Harry Yau

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



Re: [PHP] Session with various Browser.

2003-09-19 Thread Harry Yau
Thanks Marek!~ I have solved this problem with the exactly suggestion from
you.
session_cache_limiter("private_no_expire");

Marek Kilimajer wrote:

> Experiment with session_cache_limiter(), for example try to set it to
> private_no_expire.
>
> Harry Yau wrote:
>
> > Hi all,
> > I am new to php. At first, I wrote a php script to generate a pdf
> > file from a tex file and load that pdf file to the browser by call a
> > system call of latex -pdftex. After loading the pdf file. I wrote a
> > function to remove all temp file created by latex. It work fine and it
> > did all I expected. The php script work on IE 5, Netscape 4.79 and
> > Mozilla 5.0.
> > However, when I've tried to add a command "session_start" at the
> > beginning of my script and even did set and get those session variables,
> > different functionility of the php script MISSed upon different browse.
> > On Netscape 4.79,  it does generate the pdf file and  remove those
> > temp file, but loading the pdf file to the browser. The Netscape keeps
> > complainning about the pdf file is damaged and could not be repaired.
> > On IE5, the script does load the pdf file, but it does not remove
> > those temp file.
> > Nevertheless, on Mozilla, it works fine for me!!
> > For not loading the pdf on netscape, I thought it is because the
> > script does some output to the browser before I call
> > "header("content-type:application/pdf");" Therefore, I put "ob_start()"
> > before starting session and call "ob_end_clean()" before setting the
> > header for pdf content. It does not correct the problem.
> > I am wondering what exactly the "session_start()" does? How it can
> > have different effect upon various browser? Of simply, please tell me
> > how to correct those problems!~
> > Thank You Very Much!~
> >
> >
> > Best Regards,
> > Harry Yau
> >

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



[PHP] Working with PHP Class Within Javascript

2003-09-22 Thread Harry Yau
Hi all,
I am writing a HTML page to gather whole bunch of information
provided by user and pass it to the PHP script to generate a report base
on these information. Namely, user inputs data in textfields of a HTML
FORM. Since, there is a lot of fields in the field, when the form
submitted, the URL to the PHP script become very long.
I am wondering two way to solve this problem.
First, I create a PHP Class to store all Infomation and using
JavaScript function in the HTML page to "PUT" those value of fields into
my PHP Class Object. Then pass the PHP Class Object to the PHP script.
However, I wondering is it possible for the JaveScript function to
manipulate the PHP Class Object, and How? How could I Call the PHP Class
Constructor inside the JavaScript function?? Moreover, How could I pass
the PHP Class Object from the HTML page to the PHP Script?? Is it
possible to do so??

Second solution I've thought of was writing another PHP function
inside the  HTML page and doing the job as the JavaScript function.
However, I have no I idea how could the HTML page call the PHP function
when the user submitted the HTML FORM. Once again, How could I pass the
PHP Class Object from the HTML page to the PHP Script at the end??

Thank You Very Much!

Best Regards,
Harry yau

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