php-general Digest 4 Jan 2009 10:37:40 -0000 Issue 5882

Topics (messages 285417 through 285428):

Re: How to count transfered kBytes in File-Download
        285417 by: Michelle Konzack
        285419 by: Eric Butera
        285424 by: Ashley Sheridan
        285425 by: Lars Torben Wilson
        285426 by: mike
        285427 by: Ashley Sheridan
        285428 by: mike

Re: Thank you everyone, What a wonderful world
        285418 by: Andrés Robinet

Re: IE Problem Detecting Post Variables
        285420 by: Micah Gersten

email app/script/needs...
        285421 by: bruce

If I make a mistake logging in, the error shows again even if I enter the right 
values
        285422 by: Fred Silsbee
        285423 by: Fred Silsbee

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Am 2009-01-03 10:16:43, schrieb Eric Butera:
> On Sat, Jan 3, 2009 at 9:23 AM, Ashley Sheridan
> > I don't think this is actually possible. I've never seen it happen
> > before. It would need some sort of dedicated client-side software to
> > recognise exactly how much has been downloaded and then request the rest
> > of it. A browser doesn't yet have this capability I believe.

"wget" and "curl" support resum broken download...

> $_SERVER['HTTP_RANGE']
> 
> ???

Hmmm, what is the value of this VAR?

The BYTE where to start?  If yes, how can I include this in my script?

I mean, if I fread() I must skip this ammount of BYTES  and  then  start
sending, but how to skip it?

Or I am wrong with fread()?

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
<http://www.tamay-dogan.net/>               <http://www.can4linux.org/>
Michelle Konzack   Apt. 917                  ICQ #328449886
+49/177/9351947    50, rue de Soultz         MSN LinuxMichi
+33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
On Sat, Jan 3, 2009 at 5:19 PM, Michelle Konzack
<linux4miche...@tamay-dogan.net> wrote:
> Am 2009-01-03 10:16:43, schrieb Eric Butera:
>> On Sat, Jan 3, 2009 at 9:23 AM, Ashley Sheridan
>> > I don't think this is actually possible. I've never seen it happen
>> > before. It would need some sort of dedicated client-side software to
>> > recognise exactly how much has been downloaded and then request the rest
>> > of it. A browser doesn't yet have this capability I believe.
>
> "wget" and "curl" support resum broken download...
>
>> $_SERVER['HTTP_RANGE']
>>
>> ???
>
> Hmmm, what is the value of this VAR?
>
> The BYTE where to start?  If yes, how can I include this in my script?
>
> I mean, if I fread() I must skip this ammount of BYTES  and  then  start
> sending, but how to skip it?
>
> Or I am wrong with fread()?
>
> Thanks, Greetings and nice Day/Evening
>    Michelle Konzack
>    Systemadministrator
>    24V Electronic Engineer
>    Tamay Dogan Network
>    Debian GNU/Linux Consultant
>
>
> --
> Linux-User #280138 with the Linux Counter, http://counter.li.org/
> ##################### Debian GNU/Linux Consultant #####################
> <http://www.tamay-dogan.net/>               <http://www.can4linux.org/>
> Michelle Konzack   Apt. 917                  ICQ #328449886
> +49/177/9351947    50, rue de Soultz         MSN LinuxMichi
> +33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)
>

I don't know how it works, just know of it.

Maybe I'm misunderstanding you, but are you looking for fseek?

http://us3.php.net/manual/en/function.fseek.php

--- End Message ---
--- Begin Message ---
On Sat, 2009-01-03 at 17:39 -0500, Eric Butera wrote:
> On Sat, Jan 3, 2009 at 5:19 PM, Michelle Konzack
> <linux4miche...@tamay-dogan.net> wrote:
> > Am 2009-01-03 10:16:43, schrieb Eric Butera:
> >> On Sat, Jan 3, 2009 at 9:23 AM, Ashley Sheridan
> >> > I don't think this is actually possible. I've never seen it happen
> >> > before. It would need some sort of dedicated client-side software to
> >> > recognise exactly how much has been downloaded and then request the rest
> >> > of it. A browser doesn't yet have this capability I believe.
> >
> > "wget" and "curl" support resum broken download...
> >
> >> $_SERVER['HTTP_RANGE']
> >>
> >> ???
> >
> > Hmmm, what is the value of this VAR?
> >
> > The BYTE where to start?  If yes, how can I include this in my script?
> >
> > I mean, if I fread() I must skip this ammount of BYTES  and  then  start
> > sending, but how to skip it?
> >
> > Or I am wrong with fread()?
> >
> > Thanks, Greetings and nice Day/Evening
> >    Michelle Konzack
> >    Systemadministrator
> >    24V Electronic Engineer
> >    Tamay Dogan Network
> >    Debian GNU/Linux Consultant
> >
> >
> > --
> > Linux-User #280138 with the Linux Counter, http://counter.li.org/
> > ##################### Debian GNU/Linux Consultant #####################
> > <http://www.tamay-dogan.net/>               <http://www.can4linux.org/>
> > Michelle Konzack   Apt. 917                  ICQ #328449886
> > +49/177/9351947    50, rue de Soultz         MSN LinuxMichi
> > +33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)
> >
> 
> I don't know how it works, just know of it.
> 
> Maybe I'm misunderstanding you, but are you looking for fseek?
> 
> http://us3.php.net/manual/en/function.fseek.php
> 
Where does $_SERVER['HTTP_RANGE'] come from then, as I can't find
anything about it online that actually says what it does, and when and
what sets it. I can find lots of script listings that use it, but
without knowing what it is, I don't know what to make of it.


Ash
www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
2009/1/3 Ashley Sheridan <a...@ashleysheridan.co.uk>:
> On Sat, 2009-01-03 at 17:39 -0500, Eric Butera wrote:
>> On Sat, Jan 3, 2009 at 5:19 PM, Michelle Konzack
>> <linux4miche...@tamay-dogan.net> wrote:
>> > Am 2009-01-03 10:16:43, schrieb Eric Butera:
>> >> On Sat, Jan 3, 2009 at 9:23 AM, Ashley Sheridan
>> >> > I don't think this is actually possible. I've never seen it happen
>> >> > before. It would need some sort of dedicated client-side software to
>> >> > recognise exactly how much has been downloaded and then request the rest
>> >> > of it. A browser doesn't yet have this capability I believe.
>> >
>> > "wget" and "curl" support resum broken download...
>> >
>> >> $_SERVER['HTTP_RANGE']
>> >>
>> >> ???
>> >
>> > Hmmm, what is the value of this VAR?
>> >
>> > The BYTE where to start?  If yes, how can I include this in my script?
>> >
>> > I mean, if I fread() I must skip this ammount of BYTES  and  then  start
>> > sending, but how to skip it?
>> >
>> > Or I am wrong with fread()?
>> >
>> > Thanks, Greetings and nice Day/Evening
>> >    Michelle Konzack
>> >    Systemadministrator
>> >    24V Electronic Engineer
>> >    Tamay Dogan Network
>> >    Debian GNU/Linux Consultant
>> >
>> >
>> > --
>> > Linux-User #280138 with the Linux Counter, http://counter.li.org/
>> > ##################### Debian GNU/Linux Consultant #####################
>> > <http://www.tamay-dogan.net/>               <http://www.can4linux.org/>
>> > Michelle Konzack   Apt. 917                  ICQ #328449886
>> > +49/177/9351947    50, rue de Soultz         MSN LinuxMichi
>> > +33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)
>> >
>>
>> I don't know how it works, just know of it.
>>
>> Maybe I'm misunderstanding you, but are you looking for fseek?
>>
>> http://us3.php.net/manual/en/function.fseek.php
>>
> Where does $_SERVER['HTTP_RANGE'] come from then, as I can't find
> anything about it online that actually says what it does, and when and
> what sets it. I can find lots of script listings that use it, but
> without knowing what it is, I don't know what to make of it.
>
>
> Ash
> www.ashleysheridan.co.uk

It's an HTTP header, sent in the HTTP request as Range: <byte-range>.
According to the CGI spec it's made available to CGI programs by the
server in the HTTP_RANGE environment variable, so PHP picks it up and
adds it to the $_SERVER array.


Torben

--- End Message ---
--- Begin Message ---
I actually use $_SERVER['HTTP_CONTENT_RANGE'] in my setup (nginx +
php-fpm) - I don't think I get an 'HTTP_RANGE' ...



On Sat, Jan 3, 2009 at 9:52 PM, Lars Torben Wilson <larstor...@gmail.com> wrote:
> 2009/1/3 Ashley Sheridan <a...@ashleysheridan.co.uk>:
>> On Sat, 2009-01-03 at 17:39 -0500, Eric Butera wrote:
>>> On Sat, Jan 3, 2009 at 5:19 PM, Michelle Konzack
>>> <linux4miche...@tamay-dogan.net> wrote:
>>> > Am 2009-01-03 10:16:43, schrieb Eric Butera:
>>> >> On Sat, Jan 3, 2009 at 9:23 AM, Ashley Sheridan
>>> >> > I don't think this is actually possible. I've never seen it happen
>>> >> > before. It would need some sort of dedicated client-side software to
>>> >> > recognise exactly how much has been downloaded and then request the 
>>> >> > rest
>>> >> > of it. A browser doesn't yet have this capability I believe.
>>> >
>>> > "wget" and "curl" support resum broken download...
>>> >
>>> >> $_SERVER['HTTP_RANGE']
>>> >>
>>> >> ???
>>> >
>>> > Hmmm, what is the value of this VAR?
>>> >
>>> > The BYTE where to start?  If yes, how can I include this in my script?
>>> >
>>> > I mean, if I fread() I must skip this ammount of BYTES  and  then  start
>>> > sending, but how to skip it?
>>> >
>>> > Or I am wrong with fread()?
>>> >
>>> > Thanks, Greetings and nice Day/Evening
>>> >    Michelle Konzack
>>> >    Systemadministrator
>>> >    24V Electronic Engineer
>>> >    Tamay Dogan Network
>>> >    Debian GNU/Linux Consultant
>>> >
>>> >
>>> > --
>>> > Linux-User #280138 with the Linux Counter, http://counter.li.org/
>>> > ##################### Debian GNU/Linux Consultant #####################
>>> > <http://www.tamay-dogan.net/>               <http://www.can4linux.org/>
>>> > Michelle Konzack   Apt. 917                  ICQ #328449886
>>> > +49/177/9351947    50, rue de Soultz         MSN LinuxMichi
>>> > +33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)
>>> >
>>>
>>> I don't know how it works, just know of it.
>>>
>>> Maybe I'm misunderstanding you, but are you looking for fseek?
>>>
>>> http://us3.php.net/manual/en/function.fseek.php
>>>
>> Where does $_SERVER['HTTP_RANGE'] come from then, as I can't find
>> anything about it online that actually says what it does, and when and
>> what sets it. I can find lots of script listings that use it, but
>> without knowing what it is, I don't know what to make of it.
>>
>>
>> Ash
>> www.ashleysheridan.co.uk
>
> It's an HTTP header, sent in the HTTP request as Range: <byte-range>.
> According to the CGI spec it's made available to CGI programs by the
> server in the HTTP_RANGE environment variable, so PHP picks it up and
> adds it to the $_SERVER array.
>
>
> Torben
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
On Sat, 2009-01-03 at 23:41 -0800, mike wrote:
> I actually use $_SERVER['HTTP_CONTENT_RANGE'] in my setup (nginx +
> php-fpm) - I don't think I get an 'HTTP_RANGE' ...
> 
> 
> 
> On Sat, Jan 3, 2009 at 9:52 PM, Lars Torben Wilson <larstor...@gmail.com> 
> wrote:
> > 2009/1/3 Ashley Sheridan <a...@ashleysheridan.co.uk>:
> >> On Sat, 2009-01-03 at 17:39 -0500, Eric Butera wrote:
> >>> On Sat, Jan 3, 2009 at 5:19 PM, Michelle Konzack
> >>> <linux4miche...@tamay-dogan.net> wrote:
> >>> > Am 2009-01-03 10:16:43, schrieb Eric Butera:
> >>> >> On Sat, Jan 3, 2009 at 9:23 AM, Ashley Sheridan
> >>> >> > I don't think this is actually possible. I've never seen it happen
> >>> >> > before. It would need some sort of dedicated client-side software to
> >>> >> > recognise exactly how much has been downloaded and then request the 
> >>> >> > rest
> >>> >> > of it. A browser doesn't yet have this capability I believe.
> >>> >
> >>> > "wget" and "curl" support resum broken download...
> >>> >
> >>> >> $_SERVER['HTTP_RANGE']
> >>> >>
> >>> >> ???
> >>> >
> >>> > Hmmm, what is the value of this VAR?
> >>> >
> >>> > The BYTE where to start?  If yes, how can I include this in my script?
> >>> >
> >>> > I mean, if I fread() I must skip this ammount of BYTES  and  then  start
> >>> > sending, but how to skip it?
> >>> >
> >>> > Or I am wrong with fread()?
> >>> >
> >>> > Thanks, Greetings and nice Day/Evening
> >>> >    Michelle Konzack
> >>> >    Systemadministrator
> >>> >    24V Electronic Engineer
> >>> >    Tamay Dogan Network
> >>> >    Debian GNU/Linux Consultant
> >>> >
> >>> >
> >>> > --
> >>> > Linux-User #280138 with the Linux Counter, http://counter.li.org/
> >>> > ##################### Debian GNU/Linux Consultant #####################
> >>> > <http://www.tamay-dogan.net/>               <http://www.can4linux.org/>
> >>> > Michelle Konzack   Apt. 917                  ICQ #328449886
> >>> > +49/177/9351947    50, rue de Soultz         MSN LinuxMichi
> >>> > +33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)
> >>> >
> >>>
> >>> I don't know how it works, just know of it.
> >>>
> >>> Maybe I'm misunderstanding you, but are you looking for fseek?
> >>>
> >>> http://us3.php.net/manual/en/function.fseek.php
> >>>
> >> Where does $_SERVER['HTTP_RANGE'] come from then, as I can't find
> >> anything about it online that actually says what it does, and when and
> >> what sets it. I can find lots of script listings that use it, but
> >> without knowing what it is, I don't know what to make of it.
> >>
> >>
> >> Ash
> >> www.ashleysheridan.co.uk
> >
> > It's an HTTP header, sent in the HTTP request as Range: <byte-range>.
> > According to the CGI spec it's made available to CGI programs by the
> > server in the HTTP_RANGE environment variable, so PHP picks it up and
> > adds it to the $_SERVER array.
> >
> >
> > Torben
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
I'm still a little confused on this though. How would a browser send
this to notify of a download that was only partially completed before?


Ash
www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
On Sun, Jan 4, 2009 at 1:23 AM, Ashley Sheridan
<a...@ashleysheridan.co.uk> wrote:

> I'm still a little confused on this though. How would a browser send
> this to notify of a download that was only partially completed before?

I use it to process information from a POST that a Google Gears based
uploader sends.

--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Behzad [mailto:behzad.esl...@gmail.com]
> Sent: Thursday, January 01, 2009 12:43 PM
> To: Zend Framework General; PHP General Mailing List; IxDA
> Subject: [PHP] Thank you everyone, What a wonderful world
> 
> Hi List,
> 
> I would like to appreciate from you all. I hope that you enjoy your
> holidays.
> Children (yes! children) are dying in Gaza, and we're safe! We're happy.
> Happy Christmas!!
> Thank you for supporting Israel, and for being so quite. The God is with
> you!
> 
> How Palestinians defend(!) themselves with stones, and how Zionist are
> performing
> a new holocaust using the American weapons in a prison, named Gaza strip.
> But you now what... this is really good. At least this could bring
> democracy, and freedom to
> middle east. PEACE! HUMAN RIGHTS! YEAH! a lot of bullshit !!.
> 
> We're all responsible for this event. What a shame for mankind in 21th
> century.
> 
> Forget this. This is SPAM and/or PROPAGANDA!
> 
> CHEERS!
> -behzad

First off, I don't think this is the place to get involved into a political 
discussion. No matter how much blood is spread, or who's the devil, this is all 
about politics, and power, and we are not politicians but programmers. This is 
a Zend Framework mailing list, not a human rights forum or an office of the UN. 
So, yes, what you are saying is SPAM and PROPAGANDA, since it was unsolicited 
and has arrived to the wrong place. If you want us to support your cause, it is 
not the place to ask for it. Nobody is going to add a banner to his website 
saying "Long live Hamas" just because you post a message in the Zend Framework 
list, on the contrary, you'll generate just the opposite feeling.

Second, if peace and human rights are bullshit for you, I don't know what you 
are asking for: WAR and HUMAN RIGHTS VIOLATION? Peace and human rights are not 
bullshit just because a bullshitter speaks about them. It is precisely that 
kind of speech ("Mr X is a bullshitter, Mr X speaks about peace, ergo, peace is 
bullshit") which leads to more war, more harm and more bullshitters talking 
about peace and human rights. About democracy and freedom, that is precisely 
why you can post a message like this without being tortured and killed (you are 
not even being sent off this list). Try that in Iran or Cuba (if you can get an 
internet connection there). You don't need to believe in democracy and freedom, 
go and praise dictators and build a prison in your country for the ones who 
don't agree with you, but don't come to me saying that it's democracy's fault 
or freedom's fault that children are being killed... it is a bit more complex 
than that, and without democracy and freedom, there would be hundreds of 
thousands instead of just hundreds dead.

Thanks to democracy and freedom I can say that "Bush is an idiot son of a 
bitch", write it on a billboard, make a t-shirt with that slogan and say it to 
his face if I ever see him nearby. That won't solve world hunger, but at least 
I can complain and do something without being killed. I can say the same about 
my president, I'm not an American citizen, I don't live in the US, but my 
country has a democracy, a very corrupt democracy, and I prefer that to the 
dictatorship we had twenty five years ago. Some principles, such as freedom, 
are not tradable.

Third, you are confusing Palestinians with Hamas, not every Palestinian is a 
Hamas member. And NO, we are NOT RESPONSIBLE for this event, Hamas and the 
Israel government are, NOT US. Hamas decided to end the truce and start 
launching rockets and the Israel government decided to bombard them, that's how 
history is written. And it has nothing to do with the average Palestinian or 
Israeli citizen. I didn't decide to invade Falkland in 1982, the dictatorship 
we had took that decision, and thousands of young Argentine soldiers died 
because of a wimp. And yes, I believe Falkland is Argentine, but I will never 
support a military invasion to the islands just because of that belief.

And fourth, I've not seen the same protests worldwide every time a terrorist 
attack kills hundreds of people... I didn't see the left wing parties of my 
country complaining on September 11th when 3000 people died, they were actually 
drinking to celebrate, the same happened when a car bomb destroyed Israeli 
embassy in my country (detonated by Iranian terrorists)... How come now they 
are protesting at the same Israeli embassy? What kind of coherence is that? Are 
they supporting peace or just violence when it occurs from one side alone? Now, 
THAT IS BULLSHIT and I'm tired of it.

Regards,

Rob


--- End Message ---
--- Begin Message ---
Ashley Sheridan wrote:
> On Fri, 2009-01-02 at 18:06 -0500, Andrew Ballard wrote:
>   
>> On Fri, Jan 2, 2009 at 1:15 PM, Micah Gersten <mi...@onshore.com> wrote:
>>     
>>> You might want to consider the button element which allows you to
>>> display images, but doesn't send back coordinates.  Instead it sends a
>>> preset value.
>>> http://www.w3.org/TR/html401/interact/forms.html#h-17.5
>>>
>>> Thank you,
>>> Micah Gersten
>>>       
>> If you mean an INPUT element with the type="button", then yes.
>> (Although it will no longer be a submit button, so you'll have to
>> capture the click and perform the submit using Javascript which leads
>> back to accessibility issues, etc.)
>>
>> If you mean a BUTTON element of the type="submit", then not exactly.
>> It *will* send a preset value for sure, but that preset value will
>> differ depending on the browser. I've found that while FF will send
>> the value you set in the value="..." attribute, IE will send the
>> actual text of the button. Thus,
>>
>> <button name="test" value="blue">My Button Text</button>
>>
>> will send 'test=blue' in FF, but 'test=My+Button+Text' in IE. I'm
>> assuming this is because for <INPUT type="submit"> buttons, the text
>> content of the button IS the value in the value="..." attribute.
>>
>> Whatever the reason, that was a fun lesson to track down the first
>> time I had people tell me a page I wrote didn't work in IE.
>>
>> Andrew
>>
>>     
> Lets all march forward and renounce IE as a useful piece of software!
>
>
> Ash
> www.ashleysheridan.co.uk
>   

Agreed.  According to the spec, the FF action is correct.  I just heard
IE's user share dropped below 70%.  One day we will hopefully be able to
say goodbye to it.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com





--- End Message ---
--- Begin Message ---
HI...

Playing around with an app and I need to implement some functionality
allowing a user to email some text.

Basically, I want to allow the user to select some text from a dropdown
list. I then want to allow the user to edit the text if needed, and to then
submit the text for email to a given user. In order to perform some basic
QA, I want to have an additional user be notified of the email/text to be
sent, and to then have to authorize the email/text in order for it to be
sent.

The QA process is required as this is going to be part of a kind of stripped
down call center process.

I'm asking the list to see if anyone has come across this kind of
functionality in an app that you can point me to. I've been searching the
'net with no luck, and I'd rather not reinvent the wheel on this one..

Pointers/Comments appreciated!

Thanks!!!




--- End Message ---
--- Begin Message ---
my PHP programs are working great to access Oracle 11g1 and MySQL 5.1

I entered a bad value for user name /passwordand got a message 
Could not connect: Access denied for user 'landon'@'localhost' (using password: 
YES)

I restarted the script under Firefox 3.0.5 and got the same error message 
without a chance to enter username/password 

If I clean the cache, it works OK

This problem only occurs with the MySQL script that is nearly identical to the 
Oracle script that doesn't show the problem.

This must be a familiar problem with you web programmers!


      


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


--- On Sun, 1/4/09, Fred Silsbee <fredsils...@yahoo.com> wrote:

> From: Fred Silsbee <fredsils...@yahoo.com>
> Subject: If I make a mistake logging in, the error shows again even if I 
> enter the right values
> To: php...@lists.php.net, php-gene...@lists.php.net
> Date: Sunday, January 4, 2009, 2:45 AM
> my PHP programs are working great to access Oracle 11g1 and
> MySQL 5.1
> 
> I entered a bad value for user name /passwordand got a
> message 
> Could not connect: Access denied for user
> 'landon'@'localhost' (using password: YES)
> 
> I restarted the script under Firefox 3.0.5 and got the same
> error message without a chance to enter username/password 
> 
> If I clean the cache, it works OK
> 
> This problem only occurs with the MySQL script that is
> nearly identical to the Oracle script that doesn't show
> the problem.
> 
> This must be a familiar problem with you web programmers!

The problem is correctable with ordinary programming logic.


      


--- End Message ---

Reply via email to