php-windows Digest 29 Nov 2002 17:25:19 -0000 Issue 1463

Topics (messages 17211 through 17217):

Re: Is stdout slow?
        17211 by: Miha Nedok
        17213 by: Luis Ferro
        17214 by: Svensson, B.A.T. (HKG)

COM programming and InDesign 2.0
        17212 by: Frode Mangseth

Re: Redirect browser to another URL?
        17215 by: Jack Kelly Dobson

archive_tar error "Invalid checksum"
        17216 by: Timo Hähne

test
        17217 by: Enrico

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 ---
It has to do with the browser. IE an others don't like *large* data
specially in tables it will hang, just look take a look with the Task
Manager and you'll see IE just going crazy.

-Mike


On Thu, 28 Nov 2002, Nicole wrote:

> Date: Thu, 28 Nov 2002 23:37:10 -0500
> From: Nicole <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Is stdout slow?
>
>
> I have a script that grabs some 250,000+ rows, 1 field. Then prints it to
> the screen.
> The problem is, it takes over 10 minutes just to print. The query itself
> takes under 30 seconds. So, is there a faster way to print out 5 million
> characters to the web page? This seems to be the slow part. Anyone
> experience this and find a solution?
>
> Thanks!
>
> Nicole
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message --- Web browsers have to "calculate" the image-output of the page. IE is specially bad at this as it will generate an in-memory BMP with the full data. That will mean that a page with some millions of characters will generate a memory footprint that surpasses all the memory of the computer and starts to goble disk memory...

Cheers...
Luis Ferro

P.S.- There is no solution for this problem because web browsers wheren't designed to handle data that way...




Miha Nedok wrote:

It has to do with the browser. IE an others don't like *large* data
specially in tables it will hang, just look take a look with the Task
Manager and you'll see IE just going crazy.

-Mike


On Thu, 28 Nov 2002, Nicole wrote:


Date: Thu, 28 Nov 2002 23:37:10 -0500
From: Nicole <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Is stdout slow?


I have a script that grabs some 250,000+ rows, 1 field. Then prints it to
the screen.
The problem is, it takes over 10 minutes just to print. The query itself
takes under 30 seconds. So, is there a faster way to print out 5 million
characters to the web page? This seems to be the slow part. Anyone
experience this and find a solution?

Thanks!

Nicole



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





---
[This E-mail scanned for viruses by Declude Virus]

--- End Message ---
--- Begin Message ---
> That will mean that a page with some millions of characters will 
> generate a memory footprint that surpasses all the memory of the 
> computer and starts to goble disk memory...

The technical term when a computer is more occupied with
swapping memory pages than actually execute the context
of a memory pages is know as trashing. Most Stupid Windeads
memory handler is also know to start to trash fairly easy
(just try to start up notepad with a huge file and you'll
see what I mean...)
--- End Message ---
--- Begin Message ---
I'm working on a script to control Adobe InDesign 2.0 through COM.
And I'm using som Visual Basic examples to teach myself.

What I'm stuck on is this VB-code:

For Each Story In myStories
    Set myParagraphs = Story.Paragraphs
Next Story


How can I write this in PHP?


BTW: I'd really appreciate if someone have some tips or webpages to give me.

Mvh
Frode Mangseth
[EMAIL PROTECTED]

Market Broker AS
www.market-broker.no
Telefon:  +47 33 48 64 65
Mobil  :  +47 91 63 61 80

--- End Message ---
--- Begin Message ---
Something like that...

The way my site is set up all the content is "wrapped" by the index.php
script. So no matter what page your looking at your browser is still pointed
to the same index.php. At times I have pages that have includes that are
five and six pages deep.

The form and validation that does the re-direct could easily be in a page
that's included from another page that's included in index.php and it would
be re-directing you back to index.php with other parameters.

Making it so that there was no output before the header() call wasn't
something I was planning for as I developed it so going back and making it
that way isn't a high priority for me when I have a simple JavaScript
solution.

Browsers with JavaScript turned off isn't a concern because the splash page
of the site requires it and all the people using the site require JavaScript
for other internal systems here.

Maybe at some point I'll rewrite it so the re-direction can be server side
but for now it's serving my purposes.

j-

Jack Kelly Dobson
Systems Administrator
Charlton
[EMAIL PROTECTED]

> -----Original Message-----
> From: Rich Gray [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 28, 2002 3:55 AM
> To: Jack Kelly Dobson; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] Redirect browser to another URL?
>
>
> Jack
>
> Sorry - I am a bit confused... Are you saying you could not get a header()
> re-direct to work in a script that posts form data to itself? As someone
> else has mentioned the header() call does not have to be at the top of the
> script it just has to be executed before any output has gone to the
> browser...it could be the last line of a script.
>
> BTW your javascript solution won't work if the user has switched off
> javascript...
>
> Rich
> -----Original Message-----
> From: Jack Kelly Dobson [mailto:[EMAIL PROTECTED]]
> Sent: 27 November 2002 16:20
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Redirect browser to another URL?
>
>
> Thanks for all the help guys.
>
> My problem, as most of you figured, is that my script has a form
> in it that
> re-runs itself when the form is submitted so there is only one script
> including the form and all the validation for the form. If the
> validation is
> successful it sends you to a different page depending on the information
> posted in the form. There was therefore no way I could get the header() to
> be at the top of the returned data.
>
> I ended up using:
>
> if ($condition) {
>    print("<SCRIPT LANGUAGE='JavaScript'>window.location='" . $url .
> "'</SCRIPT>");
> }
>
> A rather elegant solution I've decided.
>
> Oh, and FYI to all you IIS users out there... (At least I'm assuming it's
> IIS and not the Windows platform itself. I'd be interested to know what
> Windows users running Apache are experiencing).
>
> I didn't have this problem with my script until I migrated it to a
> Linux/Apache platform.
>
> I assume that means that when I was doing it the original way that I had
> multiple sets of header information and no telling what else
> being sent back
> to the browser and IIS wasn't producing any error. Anyone using
> IIS and the
> header(location: '') function might want to make sure they aren't exposing
> data they didn't mean to.
>
> j-
>
> "Cam Dunstan" <[EMAIL PROTECTED]> wrote in message
> 002801c29602$d3e50da0$7866a8c0@camhome">news:002801c29602$d3e50da0$7866a8c0@camhome...
> > Jack,
> > here is another quick and dirty function to stick in your library, yet
> > another way to redirect from anywhere in your script
> >
> > function redirect($url){
> > echo "<script>window.location.replace(\"".$url."\")</script>";
> > }
> >
> > usage:
> >
> > blah
> > blah
> > redirect("any_url");
> >
> > exit;
> >
> >
> >
> > >
> > > -----Original Message-----
> > > From: Jack Kelly Dobson [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, November 26, 2002 2:43 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP-WIN] Redirect browser to another URL?
> > >
> > >
> > > Hello,
> > >
> > > Anyone know how to have a script re-direct the browser to a
> URL cleanly?
> > >
> >
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>

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

fist of all I want to excuse me for my bad english. But I can't solve my
problem so I have to try it in english. I am working with PHP 4.2.3 and the
Apache-Webserver under Windows 2000. I am using the newest version of the
archive_tar-Class for the building of tar-Archives.

With the following script I get this error message: Invalid checksum : 2826
calculated, 19501 expected0


script archive_test.php

include("pear/archive/tar.php");
$tar_object = new Archive_Tar("tarname.tar", false);
$tar_object->setErrorHandling(PEAR_ERROR_PRINT);  // Optional error handling
$v_list[0]="edit.gif";
$v_list[1]="cms_img/";                              // Optional '/' at the
end
$tar_object->create($v_list);
$pics = $tar_object->listContent();
print_r($pics);


The result of the script is an tar-archive with a size of 32 KB. When I look
into this archive, there is just the gif-file edit.gif, and when I trie to
open it directly from the archive (with the picture-viewer acdsee) the
picture is totally warped.

The error appear since Imodified my Apache Configuration so that PHP is
running as an Apache Modul. And since this changeover the tar-Class doesn't
create any correct tar-Archive. When PHP ist running as CGI there is no
problem with the generation of tar_archives - with the same script!

So where I the error? Does the archive_tar-Class not work with php as on
apache-Modul on Windows 2000?

Please help me!

Yours sincerely

Timo


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


--- End Message ---

Reply via email to