php-windows Digest 2 Sep 2003 08:52:44 -0000 Issue 1896

Topics (messages 21295 through 21301):

Re: download function
        21295 by: Ignatius Reilly

Re: problems with mysql connections not closing
        21296 by: Sek-Mun Wong
        21301 by: Chris Kranz

Re: problems with mysql connections not closing - update
        21297 by: Sek-Mun Wong

Installing the manual (Win XP Pro, Apache2)
        21298 by: Ingozi

Re: Help me!
        21299 by: Ingozi

SMTP - AOL problem
        21300 by: Trystano.aol.com

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 ---
I found the solution to my problem.

Sorry

Ignatius
_________________________
----- Original Message -----
From: "Ignatius Reilly" <[EMAIL PROTECTED]>
To: "Win32 list PHP" <[EMAIL PROTECTED]>
Sent: Saturday, August 30, 2003 1:19 PM
Subject: [PHP-WIN] download function


> Hello,
>
> I have the following problem:
>
> I want users to download content that is stored in a private directory, as
a
> downloadable file.
> So I do:
>
> <code>
> header( "Content-type: octet/stream" ) ;
> header( "Content-Length: ".filesize( $file_path ) ) ;
> header( "Content-Disposition: attachment; filename={$filename}" ) ;
> header( "Content-transfer-encoding: binary" ) ;
> echo "\n" ;
> readfile( $file_path ) ;
> </code>
>
> Everything works just fine, except that the main IE (5.5) windows
underneath
> the download box shows a "The page cannot be displayed" error, which I
would
> just as well replace by
> my own content.
>
> How can I do?
> Thanks
>
> Ignatius
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Chris, not sure if this is related to my question aka mysql_pconnect

are u using mysql_pconnect or plain mysql_connect to connect to the
database? This is the behaviour I'm getting, but with
apache1.3.27/php4.3.2/mysql4.013

going to do some research on this in the next few days and will post
something if I find anything.

btw, several thousand views a day is large at all - it should heandle this
without blinking

"Chris Kranz" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> OS: Win 2k
> Web Server: Apache 1.3.27
> PHP: 4.1.2
> MySQL: 3.23.39
>
> really can't tell if this is a coding issue, a software issue, or just a
> random bug somewhere...
>
> basically we have a fairly large intranet, serving up several thousand
> pages/hits everyday to mainly mac/pc users. somewhere, in all this, there
> are some connections to the database not being closed. there's no real way
> for us to tell where this is happening yet, although we're gonna put in
some
> extra log tables to try and trap when exactly it's happening.
>
> surely PHP should close every database connection once the page has been
> served up tho? and surely it should leave a lot more open than just 1 or 2
> if it were a coding issue?
>
> are there any known issues with this kinda configuration with this kinda
> randomness? we manage to fix it using some repair utilities, but this
isn't
> a solution really. it says that there is some connections left open with
> soem clients, so this then locks certain tables, and kinda shuts down
parts
> of the database.
>
> we will be upgrading the system soon, but we're putting it all onto a new
> box, so don't want the hassle of doing an upgrade now, and then again in a
> few weeks.

--- End Message ---
--- Begin Message ---
> Chris, not sure if this is related to my question aka mysql_pconnect
>
> are u using mysql_pconnect or plain mysql_connect to connect to the
> database? This is the behaviour I'm getting, but with
> apache1.3.27/php4.3.2/mysql4.013
>

that was my first question to the guy who originally developed the stuff,
but it seems we're using mysql_connect, and not pconnect, which is why it
seems very odd to me...

and again, i know that the combination should easily be able to handle those
kind of requests, but it's large to me :)

anyway, thanks for the advice, will check things out over the next few days
and see what else i can pick out.

is there any easy way to see where a connection is being left open and from
where? it's not ACTUALLY leaving a connection open, so running netstat won't
help. i'm just wondering, and trying to track this down as much as possible.


--- End Message ---
--- Begin Message ---
Ok, here's what I found so far.

1) wait_timeout doesn't work under windows
http://www.mysql.com/doc/en/News-4.0.15.html, 4.0.15 (dev) mysql is supposed
to fix this. In http://bugs.php.net/bug.php?id=13589 [EMAIL PROTECTED] advises
connecting like this:

mysql_pconnect($host, $user, $pass, MYSQL_CLIENT_INTERACTIVE);

(this uses the interactive_timeout setting in mysql)

I've tried this, but interactive_timeout still doesn't kill idle
connections.

2) http://jeremy.zawodny.com/blog/archives/000173.html

halfway down the page, John Lim says:

> Yes, yes, yes. And get rid of pconnect while your at it. It is somewhat
> slower when the number of connections is at a
> slower rate, but helps keep up availablity when the server is under
stress.
> Its a tradeoff.
> At any rate, creating connections to MySQL is very fast. Faster still if
> there are cached threads. When you get rid of pconnect you can see
> how many connections are attached simultaneiously at any one time. If
> you have more than one apache/PHP server connected to the MySQL
> server, the effects can be geometric. Once you get a general feeling
> for how many are usually connected at one time, set the thread cache
> to that number.

I might mail off to John to find out the full story on pconnect. AFAIK, I'm
considering it broken for now and going back to mysql_connect.

--- End Message ---
--- Begin Message --- I understand that people who install using the installer have clickable html error links next to their error messages. However since I'm using Apache 2.0.47 I have to install manually. I have installed both the single page html and the multiple page html files (yes I decompressed and yes at different attempts). I have these options set this way:
error_reporting = E_ALL
display_errors = On
log_errors = On
html_errors = On


now with docref_root, I have tried every concievable way to point to the html help files I have tried, as examples:

docref_root = "http://localhost/phpmanual/"; trying to point to my web server and the subdirectory I have the manual in.

docref_root = "/phpmanual/" hedging my bets I put a copy in both C:\php\phpmanual and C:\(web server root)\phpmanual

I have managed to generate a number of errors in my php, but I do not get a clickable link.

Would someone kindy walk me through getting this set up. I am brand new to PHP and could really use all the help I can get, and that includes the clickable error messages.
--- End Message ---
--- Begin Message --- This explains string conversion faily well.

http://www.developer.com/lang/article.php/927291


N ókó ˛ůúskć wrote:
Hello,

I am a 17 years old boy from Hungary, and I have problem with PHP. I hope that you can help. The problem: I ask the width and height of the screen with JavaScript, and when the JavaScript give the values to the PHP they become string, so I can't use the values as a number. I tried to change the type, but it's bad, too.
I want that if the screen is bigger, the image is bigger. I enclose a file, which show the problem.


I hope that you understand my problem, and sorry about the mistakes.

Leskó Dániel


--- End Message ---
--- Begin Message ---
Right then, i've just finished having a heated debate with an AOL technician 
and he says I am unable to send emails with PHP via the SMTP of my ISP (which 
is AOL). I dont think the technician fully understands what I am trying to do, 
but i'm also a little confused over the subject.

If AOL is my ISP then I must use the SMTP referring to AOL, true or false? If 
so, then how do I go about finding out what it is?

Tryst

--- End Message ---

Reply via email to