|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help
lists.php.net
Date: Wed Apr 09 2008 - 13:07:58 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 9 Apr 2008 18:07:58 -0000 Issue 5395
Topics (messages 272766 through 272800):
Setting php server
272766 by: hce
272767 by: Iñigo Medina García
Re: New Ajax search component
272768 by: Jeremy O'Connor
272777 by: Eric Butera
272778 by: Nathan Nobbe
272779 by: Nathan Nobbe
272780 by: Eric Butera
272782 by: Zoltán Németh
Re: require_once dying silently
272769 by: Zoltán Németh
272773 by: Aschwin Wesselius
272774 by: Zoltán Németh
272781 by: Greg Bowser
272784 by: Andrew Ballard
272789 by: Zoltán Németh
How to create combo-boxes/list boxes connected with MS SQL Server database in PHP scripts
272770 by: punhsr.hub2.nic.in
Re: limit mail() function
272771 by: Jordi Moles
Re: dynamic boxes problem... JS and PHP
272772 by: Peter Ford
272775 by: Ryan S
272776 by: Peter Ford
272790 by: Jim Lucas
272791 by: Jason Pruim
272792 by: Daniel Brown
272794 by: Bill Guion
272795 by: Jim Lucas
272797 by: Jason Pruim
272799 by: Andrew Ballard
Re: Check XMLReader enable
272783 by: Andrew Ballard
Problem with DOMElement/Node
272785 by: Christoph Boget
272786 by: Andrew Ballard
272787 by: Christoph Boget
272788 by: Andrew Ballard
Requested PHP apps / sites
272793 by: Shawn McKenzie
272796 by: Jay Blanchard
272798 by: Daniel Brown
Re: APC & FastCGI != upload progress ?
272800 by: steve
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Hi,
I am setting a lighty and php server in my local machine FC 6 for
testing my php source code. Both index.html and index.php have been
set in lighty. If I have an index.html on the server, the http
response was fine. But, if I set an index.php on the server, the
browser got a blank page, there were no errors on browser or lighty
access.log. What I could be missing?
$ php --version
PHP 5.1.6 (cli) (built: Sep 18 2007 09:07:04)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
Thank you.
attached mail follows:
hce wrote:
> Hi,
>
> I am setting a lighty and php server in my local machine FC 6 for
> testing my php source code. Both index.html and index.php have been
> set in lighty. If I have an index.html on the server, the http
> response was fine. But, if I set an index.php on the server, the
> browser got a blank page, there were no errors on browser or lighty
> access.log. What I could be missing?
Did you check lighty error.log?
Did you try with a simple <?php phpinfo(); ?> to check php configuration?
Iñigo
> $ php --version
> PHP 5.1.6 (cli) (built: Sep 18 2007 09:07:04)
> Copyright (c) 1997-2006 The PHP Group
> Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
>
> Thank you.
>
--
--------
Iñigo Medina García
Librería Díaz de Santos Madrid (Spain)
imedina
diazdesantos.es facilmejor
gmail.com
attached mail follows:
""Nathan Nobbe"" <quickshiftin
gmail.com> wrote in message
news:7dd2dc0b0804080937x720af40n8f6850e807e246bd
mail.gmail.com...
> On Tue, Apr 8, 2008 at 7:41 AM, Jeremy O'Connor <joconnor
netactive.co.za>
> wrote:
> they pretty much have that in the scriptacuous lib under
> Ajax.Autocompleter,
> atm
>
OK, but my control only does the Ajax call when the user clicks the Go
button, whereas the scriptaculous library does an Ajax call everytime the
user presses a key.
--
Jeremy O'Connor
attached mail follows:
On Wed, Apr 9, 2008 at 2:34 AM, Jeremy O'Connor
<joconnor
netactive.co.za> wrote:
> OK, but my control only does the Ajax call when the user clicks the Go
> button, whereas the scriptaculous library does an Ajax call everytime the
> user presses a key.
Any library should be flexible enough to register event listeners on
whatever trigger needed. The event itself isn't as important as how
things are handled.
I use YUI because it lets me focus on my work instead of browser
quirks. It is a little heavier but that is okay because they have a
team dedicated to testing all the A grade browsers so I don't have to.
attached mail follows:
On Wed, Apr 9, 2008 at 2:34 AM, Jeremy O'Connor <joconnor
netactive.co.za>
wrote:
>
> ""Nathan Nobbe"" <quickshiftin
gmail.com> wrote in message
> news:7dd2dc0b0804080937x720af40n8f6850e807e246bd
mail.gmail.com...
> > On Tue, Apr 8, 2008 at 7:41 AM, Jeremy O'Connor <
> joconnor
netactive.co.za>
> > wrote:
> > they pretty much have that in the scriptacuous lib under
> > Ajax.Autocompleter,
> > atm
> >
>
> OK, but my control only does the Ajax call when the user clicks the Go
> button, whereas the scriptaculous library does an Ajax call everytime the
> user presses a key.
not quite; it checks to see if anything has been entered in intervals that
are specified by the frequency parameter. this allows users to potentially
enter in several characters depending on the frequency interval. with the
stock setting, i was able to type about 5 or 6 characters before an ajax
request was issued. and its smart enough not to just incite an ajax request
at every interval, because during the intervals, it checks to see if
anything has been entered.
you can easily analyze this behavior w/ the demo links i posted and
firebugs' net tab. furthermore it has the tokens option. tokens enforce a
tighter requirement on whether or not an autocompletion request will be
invoked; in the case of Ajax.Autocompleter that means sending an ajax
request to the server. not only do characters have to have been entered
during the frequency interval, but one of the token characters has to have
been entered. pretty slick if u ask me.
you could easily add support for explicit autocompletion request (eg. by
clicking a button) by subclassing Autocompleter.Base or one of the current
subclasses (Ajax.Autocompleter or Autocompleter.Local) as long as those
actually made sense for what you were trying to do.
so scriptaculous has supplied performance conscience, convenient (for users
and developers) controls and the ability to extend upon their work (using
prototypes oo features).
-nathan
attached mail follows:
On Wed, Apr 9, 2008 at 7:50 AM, Eric Butera <eric.butera
gmail.com> wrote:
> On Wed, Apr 9, 2008 at 2:34 AM, Jeremy O'Connor
> <joconnor
netactive.co.za> wrote:
> > OK, but my control only does the Ajax call when the user clicks the Go
> > button, whereas the scriptaculous library does an Ajax call everytime
> the
> > user presses a key.
>
> Any library should be flexible enough to register event listeners on
> whatever trigger needed. The event itself isn't as important as how
> things are handled.
>
> I use YUI because it lets me focus on my work instead of browser
> quirks. It is a little heavier but that is okay because they have a
> team dedicated to testing all the A grade browsers so I don't have to.
any js lib worth mentioning these days fits that description and prototype /
scriptaculous is no exception. i wish it were modular, so i didnt have to
send the whole damn library out to the browser on every request, when i
might just need a few classes. whats more, although scriptaculous does
provide some ui components and controls out-of-the-box, they dont appear to
have nearly the gamut of extJs..
one of the things thats great about prototype is that they sort of map
javascripts oo model to something of the paradigm that php has; primarily
inheritance. i believe extJs errs more on the 'you need to understand js'
side of things.
-nathan
attached mail follows:
On Wed, Apr 9, 2008 at 8:07 AM, Nathan Nobbe <quickshiftin
gmail.com> wrote:
>
> On Wed, Apr 9, 2008 at 7:50 AM, Eric Butera <eric.butera
gmail.com> wrote:
>
>
> > On Wed, Apr 9, 2008 at 2:34 AM, Jeremy O'Connor
> >
> > <joconnor
netactive.co.za> wrote:
> >
> > > OK, but my control only does the Ajax call when the user clicks the Go
> > > button, whereas the scriptaculous library does an Ajax call everytime
> the
> > > user presses a key.
> >
> > Any library should be flexible enough to register event listeners on
> > whatever trigger needed. The event itself isn't as important as how
> > things are handled.
> >
> > I use YUI because it lets me focus on my work instead of browser
> > quirks. It is a little heavier but that is okay because they have a
> > team dedicated to testing all the A grade browsers so I don't have to.
>
> any js lib worth mentioning these days fits that description and prototype /
> scriptaculous is no exception. i wish it were modular, so i didnt have to
> send the whole damn library out to the browser on every request, when i
> might just need a few classes. whats more, although scriptaculous does
> provide some ui components and controls out-of-the-box, they dont appear to
> have nearly the gamut of extJs..
> one of the things thats great about prototype is that they sort of map
> javascripts oo model to something of the paradigm that php has; primarily
> inheritance. i believe extJs errs more on the 'you need to understand js'
> side of things.
>
> -nathan
>
>
I figured as much.
The YUI stuff is all very split up into defined modules such as DOM,
Event, Connection, etc. Of course they all seem to depend on each
other, so I end up sending like 8 files over the wire. I create a
single file to stitch them together though, gzip it, and send it with
a far future expire header. So in the end it really isn't the worst
thing.
I used prototype before but I was upset with my requests getting out
of order when I was doing stuff. Then there is lots of talk about how
it doesn't play nice with other scripts. The YUI stuff is all
namespaced out. I also had compatibility issues with prototype using
opera. But that was years ago and I'm sure everything is fine now,
but I've already left. ;)
attached mail follows:
Eric Butera Ãrta:
> On Wed, Apr 9, 2008 at 8:07 AM, Nathan Nobbe <quickshiftin
gmail.com> wrote:
>> On Wed, Apr 9, 2008 at 7:50 AM, Eric Butera <eric.butera
gmail.com> wrote:
>>
>>
>>> On Wed, Apr 9, 2008 at 2:34 AM, Jeremy O'Connor
>>>
>>> <joconnor
netactive.co.za> wrote:
>>>
>>>> OK, but my control only does the Ajax call when the user clicks the Go
>>>> button, whereas the scriptaculous library does an Ajax call everytime
>> the
>>>> user presses a key.
>>> Any library should be flexible enough to register event listeners on
>>> whatever trigger needed. The event itself isn't as important as how
>>> things are handled.
>>>
>>> I use YUI because it lets me focus on my work instead of browser
>>> quirks. It is a little heavier but that is okay because they have a
>>> team dedicated to testing all the A grade browsers so I don't have to.
>> any js lib worth mentioning these days fits that description and prototype /
>> scriptaculous is no exception. i wish it were modular, so i didnt have to
>> send the whole damn library out to the browser on every request, when i
>> might just need a few classes. whats more, although scriptaculous does
>> provide some ui components and controls out-of-the-box, they dont appear to
>> have nearly the gamut of extJs..
>> one of the things thats great about prototype is that they sort of map
>> javascripts oo model to something of the paradigm that php has; primarily
>> inheritance. i believe extJs errs more on the 'you need to understand js'
>> side of things.
>>
>> -nathan
>>
>>
>
> I figured as much.
>
> The YUI stuff is all very split up into defined modules such as DOM,
> Event, Connection, etc. Of course they all seem to depend on each
> other, so I end up sending like 8 files over the wire. I create a
> single file to stitch them together though, gzip it, and send it with
> a far future expire header. So in the end it really isn't the worst
> thing.
>
> I used prototype before but I was upset with my requests getting out
> of order when I was doing stuff. Then there is lots of talk about how
> it doesn't play nice with other scripts. The YUI stuff is all
> namespaced out. I also had compatibility issues with prototype using
> opera. But that was years ago and I'm sure everything is fine now,
> but I've already left. ;)
>
I use prototype together with some parts of YUI, some parts of ExtJS,
TinyMCE, and a bunch of my own scripts, and there is no interference
between them. And it all seems to work on the latest opera.
greets,
Zoltán Németh
attached mail follows:
Richard S. Crawford Ãrta:
> Hi, everyone.
>
> This one's been driving me bonkers for an hour now. Anyone have any idea
> why require_once would be dying silently in the script below?
>
> ------------------------------------
>
> $CFG->dirroot = "/home/rcrawford/public_html/tanktrunk/tanktrunk";
> $CFG->dataroot = $CFG->dirroot.'/moodledata';
>
> require_once("$CFG->dirroot/lib/setup.php");
the above won't work, as the parser will try to interpret $CFG and put
it in the string first, then go ahead.
try this:
require_once($CFG->dirroot."/lib/setup.php");
or this:
require_once("{$CFG->dirroot}/lib/setup.php");
greets,
Zoltán Németh
> ------------------------------------
>
> I've confirmed that the file setup.php exists and is readable. I've got
> error_reporting in php.ini set to E_ALL. I'm running Apache 2 and PHP5 on
> Kubuntu 7.10. Nothing shows up in my apache error log, and PHP itself
> produces absolutely no output, even though it will produce output galore
> when I put in a deliberate syntax error.
>
> I've also tried:
>
> ------------------------------------
> require_once($CFG->dirroot."/lib/setup.php");
> ------------------------------------
>
> but this didn't help.
>
> Any assistance at all would be greatly appreciated.
>
attached mail follows:
Richard S. Crawford wrote:
> Hi, everyone.
>
> This one's been driving me bonkers for an hour now. Anyone have any idea
> why require_once would be dying silently in the script below?
>
> ------------------------------------
>
> $CFG->dirroot = "/home/rcrawford/public_html/tanktrunk/tanktrunk";
> $CFG->dataroot = $CFG->dirroot.'/moodledata';
>
> require_once("$CFG->dirroot/lib/setup.php");
>
Hi,
It reads as if $CFG is an object and ->dirroot is not a public property
of that object. So, I don't know what $CFG is, but I think the problem
lays there.
Also, OOP is nice and all (not to start a thread about OOP again), but
putting your config into an object seems a bit overdo to me.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other....'/
attached mail follows:
Aschwin Wesselius Ãrta:
> Richard S. Crawford wrote:
>> Hi, everyone.
>>
>> This one's been driving me bonkers for an hour now. Anyone have any idea
>> why require_once would be dying silently in the script below?
>>
>> ------------------------------------
>>
>> $CFG->dirroot = "/home/rcrawford/public_html/tanktrunk/tanktrunk";
>> $CFG->dataroot = $CFG->dirroot.'/moodledata';
>>
>> require_once("$CFG->dirroot/lib/setup.php");
>>
>
> Hi,
>
> It reads as if $CFG is an object and ->dirroot is not a public property
> of that object. So, I don't know what $CFG is, but I think the problem
> lays there.
if that property is not public but protected or private it would throw a
fatal error.
>
> Also, OOP is nice and all (not to start a thread about OOP again), but
> putting your config into an object seems a bit overdo to me.
>
I think you know I don't agree with that, but I too don't want to start
this over ;)
greets,
Zoltán Németh
attached mail follows:
>the above won't work, as the parser will try to interpret $CFG and
put it in the string first,
In that case, $CFG is either null, or it is indeed an object. If it is
a standard object, which I it appears to be, then a fatal error will
be thrown because there is no __tostring() function. If it's null,
then require_once is referencing a directory beginning with '->',
again, there *should* be an error. Anyway..
I've seen $obj->property used many times in double quotes, and never
had a problem with that working. Personally though, I always use the
curly braces though because it highlights better in VIM :p
>Also, OOP is nice and all (not to start a thread about OOP again),
but putting your config into an object seems a bit overdo to me.
Me too!! (not to continue the unstarted OOP discussion) It's a
practice I've seen used more than once. I think people find that
syntax attractive.
attached mail follows:
On Wed, Apr 9, 2008 at 2:40 AM, Zoltán Németh <znemeth
alterationx.hu> wrote:
> Richard S. Crawford Ãrta:
>
> > Hi, everyone.
> >
> > This one's been driving me bonkers for an hour now. Anyone have any idea
> > why require_once would be dying silently in the script below?
> >
> > ------------------------------------
> >
> > $CFG->dirroot = "/home/rcrawford/public_html/tanktrunk/tanktrunk";
> > $CFG->dataroot = $CFG->dirroot.'/moodledata';
> >
> > require_once("$CFG->dirroot/lib/setup.php");
> >
>
> the above won't work, as the parser will try to interpret $CFG and put it
> in the string first, then go ahead.
> try this:
> require_once($CFG->dirroot."/lib/setup.php");
> or this:
> require_once("{$CFG->dirroot}/lib/setup.php");
>
> greets,
> Zoltán Németh
>
>
> > ------------------------------------
> >
> > I've confirmed that the file setup.php exists and is readable. I've got
> > error_reporting in php.ini set to E_ALL. I'm running Apache 2 and PHP5 on
> > Kubuntu 7.10. Nothing shows up in my apache error log, and PHP itself
> > produces absolutely no output, even though it will produce output galore
> > when I put in a deliberate syntax error.
> >
> > I've also tried:
> >
> > ------------------------------------
> > require_once($CFG->dirroot."/lib/setup.php");
> > ------------------------------------
> >
> > but this didn't help.
> >
> > Any assistance at all would be greatly appreciated.
> >
> >
<?php
header('Content-type: text/plain; charset=utf-8');
echo 'Zoltán, you forgot the PHP tags to get credit for your answer. :-)';
exit;
?>
Andrew
attached mail follows:
Greg Bowser Ãrta:
>> the above won't work, as the parser will try to interpret $CFG and
> put it in the string first,
>
> In that case, $CFG is either null, or it is indeed an object. If it is
> a standard object, which I it appears to be, then a fatal error will
> be thrown because there is no __tostring() function. If it's null,
> then require_once is referencing a directory beginning with '->',
> again, there *should* be an error. Anyway..
>
> I've seen $obj->property used many times in double quotes, and never
> had a problem with that working. Personally though, I always use the
> curly braces though because it highlights better in VIM :p
I stand corrected, I just tried putting an object property into double
quotes and it works
greets,
Zoltán Németh
>
>> Also, OOP is nice and all (not to start a thread about OOP again),
> but putting your config into an object seems a bit overdo to me.
>
> Me too!! (not to continue the unstarted OOP discussion) It's a
> practice I've seen used more than once. I think people find that
> syntax attractive.
>
attached mail follows:
Sir
I want to create combo-boxes/list-boxes from a table which is available in MS-Sql server database. I have established connectivity with ms-sql server database using odbc.
how can i create combo-boxes in my php scripts?
waiting for an early reply.
With regards
Pardeep Singh
Scientist-C
NIC Hoshiarpur
attached mail follows:
hi,
thanks for all your opinions and suggestions, i'll have a look at all of
them to see if i can implement a restricted system for mail() functions.
I'll report back in a few days to let you know if i've come up with
something that really works.
Thanks for all.
En/na Andrew Ballard ha escrit:
> On Tue, Apr 8, 2008 at 3:51 PM, Greg Bowser <topnotcher
gmail.com> wrote:
>
>> >postfix has rate-limitation facilities you can use for this
>>
>> I'm aware of several configuration directives that limit rate, none of
>> which directly limit the send rate local users. Perhaps some kludgly
>> or elusive trick involving multiple options would do the trick; I
>> don't claim to be a postfix expert. Perhaps, instead of making empty
>> statements, you might choose to enlighten me as per the exact
>> configuration that will accomplish this.
>>
>> Of course, I spent some time googling, but it appears that not too
>> many people know (or at least write about) how to implement such
>> functionality.
>>
>
> Not being a sysadmin I can't tell you HOW to do it, but I can tell you
> that nearly every shared-hosting service I have worked with implements
> some level of throttling such that an account on that machine cannot
> send more than some set number of messages per hour whether directly
> through local SMTP or through sendmail, mail(), etc., so I know it CAN
> be done, and it appears that more than a few people know how to do it.
>
> Andrew
>
>
attached mail follows:
Peter Ford wrote:
> Mark Weaver wrote:
>> Ryan S wrote:
>>> Hey everyone,
>>>
>>> A bit of a puzzle here, dont know if this is a JS problem or PHP or
>>> FF or .... just me.
>>>
>>> (My money is on the last one :p )
>>>
>>>
>>> Here's what I am trying to do:
>>> In a form I have a listbox with the values 1-5, and under the
>>> listbox i have a <TD> with the id of "recips" (like so: <TD id='recips">
>>>
>>> I have a onChange event linked to the list box and depending on what
>>> number the client picks it should dynamically put the number of text
>>> boxes there, here is the JS code:
>>>
>>> ///// ############### Start JS code ############
>>> function change_no_of_recipients()
>>> {
>>> var
>>> nr=document.mainform.no_of_friends.options[document.mainform.no_of_friends.selectedIndex].value;
>>>
>>> if(nr>5){nr=5;} // max number of recipients
>>> var msg = "";
>>>
>>> for (var x = 1; x <= nr; x++)
>>> {
>>> msg += '<table width="50%" border="0" cellspacing="2"
>>> cellpadding="2">' +
>>> '<tr>' +
>>> '<td nowrap="nowrap">'+ x +'. Recipient\'s name:</td>' +
>>> '<td><input type="text" name="rec_name[]" id="rec_name[]" /></td>' +
>>> '<td nowrap="nowrap">Recipient\'s email:</td>' +
>>> '<td><input type="text" name="rec_email[]" id="rec_email[]"
>>> /></td>' +
>>> '</tr>' +
>>> '<tr>' +
>>> '</table>';
>>> }
>>> document.getElementById('recips').innerHTML=msg;
>>> }
>>>
>>> ///// ##################### End JS code ################
>>>
>>> So far on the page everything is working, but when I click the submit
>>> button this is my PHP processing script:
>>>
>>> <?php
>>> print_r($_REQUEST);
>>> ?>
>>>
>>>
>>> It shows me everything that has been submitted but NOT any of the
>>> above dynamically made boxes values... but get this, it DOES show me
>>> all values... in IE7 _not_ in FF (am using 2.0.0.13)
>>>
>>> Anybody else face anything like this?
>>> Is this a bug in FF? Is $_REQUEST wrong to catch this? Dont know what
>>> the
#$
to do... ANY help even a link to a site which can shed a
>>> little light would be appreciated.
>>>
>>> Thanks in advance.
>>>
>>> /Ryan
>>>
>>
>> Hi Ryan,
>>
>> Since I'm relatively new to PHP I could be off on this, but I'd say
>> yes, $_REQUEST is wrong. I would think you'd want to use $_POST to
>> receive the incoming values from a form.
>>
>
> That would depend on the method that the form is using: GET or POST.
>
> I don't think that's the answer.
>
> Two things I would suggest:
>
> 1. Check that the Javascript is doing what you expect: you *are* using
> Firebug on Firefox, aren't you? Also the WebDeveloper toolbar plugin is
> useful - it has a View Generated Source tool which will show you what
> Firefox thinks your page actually looks like after the JS has run...
>
> 2. Check that the TD you are loading with content is actually inside the
> <FORM> tags - otherwise the inputs won't be included in the request/post
> variables...
>
> Cheers
> Pete
>
Ryan,
First, you should reply to the list - that way more people could see the links
you posted and help out.
Right,
It looks like there may be a problem with the form tags - when I look at this
code I see
<form action="process_ecard1.php" method="post" name="mainform"></form>
That looks like you've closed your "mainform" before defining the inputs
Don't know why IE works, but it's probably trying to be helpful... :)
--
Peter Ford phone: 01580 893333
Developer fax: 01580 893399
Justcroft International Ltd., Staplehurst, Kent
attached mail follows:
Hey Pete,
**
First, you should reply to the list - that way more people could see the links
you posted and help out.
**
Oops, my mistake, I thought I did that. Will add a snip at the bottom of this email.
**
It looks like there may be a problem with the form tags - when I look at this
code I see
<form action="process_ecard1.php" method="post" name="mainform"></form>
That looks like you've closed your "mainform" before defining the inputs
**
can you tell me which line you see this? I did a search using that string on top and I couldnt find it... I even did a "form" search and still didnt find both of the form tags side by side..
Thanks again,
R
/// Snip of other mail with links ///
....but looks like posting links is the best option so will do:
http://www.coinpass.com/test/step2.php (to run the script)
http://www.coinpass.com/test/step2.phps (View the source, its just a html file really)
All Javascript and CSS is in the "http://www.coinpass.com/test/scripts/" directory
The processing script just has
print_r($_REQUEST);
so its useless pointing you to the actual file source.
///// End snip///
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
attached mail follows:
Ryan S wrote:
> Hey Pete,
>
>
> **
> First, you should reply to the list - that way more people could see the links
> you posted and help out.
> **
> Oops, my mistake, I thought I did that. Will add a snip at the bottom of this email.
>
> **
> It looks like there may be a problem with the form tags - when I look at this
> code I see
> <form action="process_ecard1.php" method="post" name="mainform"></form>
>
> That looks like you've closed your "mainform" before defining the inputs
> **
>
> can you tell me which line you see this? I did a search using that string on top and I couldnt find it... I even did a "form" search and still didnt find both of the form tags side by side..
>
> Thanks again,
> R
>
> /// Snip of other mail with links ///
> ....but looks like posting links is the best option so will do:
>
> http://www.coinpass.com/test/step2.php (to run the script)
> http://www.coinpass.com/test/step2.phps (View the source, its just a html file really)
> All Javascript and CSS is in the "http://www.coinpass.com/test/scripts/" directory
>
> The processing script just has
> print_r($_REQUEST);
> so its useless pointing you to the actual file source.
>
> ///// End snip///
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
Ryan,
You did reply to the list - it appeared in a separate thread in my viewer, so my
bad.
OK, the version with <form ...></form> appeared when I used WebDeveloper toolbar
to view the *generated* source.
When I look at the source code as received by Firefox (which is what the regular
"View source" option does), the closing form-tag is where you expect.
i think I spotted a problem, however. Your original source code looks like it
has a spurious <tr> after the first recipient block.
I think you need to really check the nesting of your tags - try indenting stuff
to make the opening and closing tags line up and see if it gets out of line
somewhere.
Anyway, I suspect what is happening is that Firefox is treating the </form> as a
closing tag for the spurious </tr> and then implicitly closing the original
<form> tag with an empty form.
Your Javascript code also adds a spurious <tr> tag (line 17 of
dynamic_no_of_recipients2.js)
This is not really anything to do with PHP, of course... :)
--
Peter Ford, Developer phone: 01580 893333 fax: 01580 893399
Justcroft International Ltd. www.justcroft.com
Justcroft House, High Street, Staplehurst, Kent TN12 0AH United Kingdom
Registered in England and Wales: 2297906
Registered office: Stag Gates House, 63/64 The Avenue, Southampton SO17 1XS
attached mail follows:
Ryan S wrote:
> Hey Pete,
>
>
> **
> First, you should reply to the list - that way more people could see the links
> you posted and help out.
> **
> Oops, my mistake, I thought I did that. Will add a snip at the bottom of this email.
>
> **
> It looks like there may be a problem with the form tags - when I look at this
> code I see
> <form action="process_ecard1.php" method="post" name="mainform"></form>
>
> That looks like you've closed your "mainform" before defining the inputs
> **
>
> can you tell me which line you see this? I did a search using that string on top and I couldnt find it... I even did a "form" search and still didnt find both of the form tags side by side..
>
> Thanks again,
> R
While we are on the topic of the <form...>...</form> tags, just a side note. It
is invalid HTML syntax to have any tag between your
<table><ILLEGAL><tr><ILLEGAL><td> ok here </td><ILLEGAL></tr><ILLEGAL></table>
As a note: the only legal tag that I know of that can be placed in between the
above tags is the <caption> tag. oh and the <thead>, <tbody>, and <tfoot> tags.
>
> /// Snip of other mail with links ///
> ....but looks like posting links is the best option so will do:
>
> http://www.coinpass.com/test/step2.php (to run the script)
> http://www.coinpass.com/test/step2.phps (View the source, its just a html file really)
> All Javascript and CSS is in the "http://www.coinpass.com/test/scripts/" directory
>
> The processing script just has
> print_r($_REQUEST);
> so its useless pointing you to the actual file source.
>
> ///// End snip///
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
attached mail follows:
On Apr 9, 2008, at 11:09 AM, Jim Lucas wrote:
> Ryan S wrote:
>> Hey Pete,
>> **
>> First, you should reply to the list - that way more people could
>> see the links you posted and help out.
>> **
>> Oops, my mistake, I thought I did that. Will add a snip at the
>> bottom of this email.
>> **
>> It looks like there may be a problem with the form tags - when I
>> look at this code I see
>> <form action="process_ecard1.php" method="post" name="mainform"></
>> form>
>> That looks like you've closed your "mainform" before defining the
>> inputs
>> **
>> can you tell me which line you see this? I did a search using that
>> string on top and I couldnt find it... I even did a "form" search
>> and still didnt find both of the form tags side by side..
>> Thanks again,
>> R
>
> While we are on the topic of the <form...>...</form> tags, just a
> side note. It is invalid HTML syntax to have any tag between your
>
> <table><ILLEGAL><tr><ILLEGAL><td> ok here </td><ILLEGAL></
> tr><ILLEGAL></table>
But something like:
<table><TR><TD>stuff here</TD></TR></table> is okay right? Just wanted
to double check since that's how all my stuff is and it works... but
just because it works doesn't mean it's right :)
--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
japruim
raoset.com
attached mail follows:
On Wed, Apr 9, 2008 at 11:18 AM, Jason Pruim <japruim
raoset.com> wrote:
> On Apr 9, 2008, at 11:09 AM, Jim Lucas wrote:
> >
> > While we are on the topic of the <form...>...</form> tags, just a side
> note. It is invalid HTML syntax to have any tag between your
> >
> > <table><ILLEGAL><tr><ILLEGAL><td> ok here
> </td><ILLEGAL></tr><ILLEGAL></table>
> >
>
> But something like:
> <table><TR><TD>stuff here</TD></TR></table> is okay right? Just wanted to
> double check since that's how all my stuff is and it works... but just
> because it works doesn't mean it's right :)
First day with the new eyes, Pruim, or decided to try to forget
and then re-learn English and HTML simultaneously? ;-P
Jim points out the correct XHTML layout, which shows "ok here"
(or, as you have it, "stuff here") between the td/TD tags. Case
doesn't matter, but does make it look sloppy. In addition, case
/should/ matter when matching closing to opening tags. For example,
try to avoid <td></TD> and mix-and-match versions thereof.
Keep in mind, no matter what, even the following will still Just
Work[tm]. It just won't validate when run through a nose-in-the-air
checker. Note the obvious messes, as well as some other issues. It's
ugly, but it works.
<Table>
<FORM method="post">
<!-- An example of an UGLY form! -->
<TR>
<input type="Hidden" name="field1" value="value1">
<td />
<textarea NAME="userfield1"><?=print_r($_SERVER);?></TextArea>
</tD>
</tr>
</table>
<input type="SUBMIT" value="GO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" />
</form>
--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting
$59.99/mo., VPS starting
$19.99/mo.,
and shared hosting starting
$2.50/mo.
Unmanaged, managed, and fully-managed!
attached mail follows:
At 3:20 PM -0700 4/8/08, Ryan S wrote:
>Hey!
>Thanks Andrew, will look into those points that you sent me.
>
>First thing to change will be the DOCTYPE I think, as i didht type
>that but must have copied code into a pre-made page...
>
>Cheers!
>R
>
Ryan,
Four observations:
1. Don't try to solve your problem by changing the DOCTYPE. Bad HTML is
bad HTML. Changing the DOCTYPE may reduce the severity of the problem,
but it won't solve it.
2. You have interpreted the fact that IE gave you what you expected while
FF did not as a problem with FF, but the opposite is true. A problem
with IE allowed it to accept HTML that it should not have accepted. FF
treated it properly.
3. Firebug is a free download from Mozilla. I have it and it has solved
more problems for me than I can remember. (Or, maybe I just don't have
a very good memory.) Get it. You will see your <form...> tags inside
the <table> </table> tags, but not inside any <td>...</td> tags.
4. Learn to use the W3C Markup Validation service -
http://validator.w3.org/. It will point out many problems that you can
solve quickly.
-----===== Bill =====-----
--
Murphy's Law Cardinal Conundrum -
The optimist believes we live in the best of all possible worlds.
The pessimist fears this is true.
attached mail follows:
Daniel Brown wrote:
> On Wed, Apr 9, 2008 at 11:18 AM, Jason Pruim <japruim
raoset.com> wrote:
>> On Apr 9, 2008, at 11:09 AM, Jim Lucas wrote:
>>> While we are on the topic of the <form...>...</form> tags, just a side
>> note. It is invalid HTML syntax to have any tag between your
>>> <table><ILLEGAL><tr><ILLEGAL><td> ok here
>> </td><ILLEGAL></tr><ILLEGAL></table>
>> But something like:
>> <table><TR><TD>stuff here</TD></TR></table> is okay right? Just wanted to
>> double check since that's how all my stuff is and it works... but just
>> because it works doesn't mean it's right :)
>
> First day with the new eyes, Pruim, or decided to try to forget
> and then re-learn English and HTML simultaneously? ;-P
>
> Jim points out the correct XHTML layout, which shows "ok here"
> (or, as you have it, "stuff here") between the td/TD tags. Case
> doesn't matter, but does make it look sloppy. In addition, case
> /should/ matter when matching closing to opening tags. For example,
> try to avoid <td></TD> and mix-and-match versions thereof.
>
> Keep in mind, no matter what, even the following will still Just
> Work[tm]. It just won't validate when run through a nose-in-the-air
> checker. Note the obvious messes, as well as some other issues. It's
> ugly, but it works.
>
> <Table>
> <FORM method="post">
> <!-- An example of an UGLY form! -->
> <TR>
> <input type="Hidden" name="field1" value="value1">
> <td />
> <textarea NAME="userfield1"><?=print_r($_SERVER);?></TextArea>
> </tD>
> </tr>
> </table>
> <input type="SUBMIT" value="GO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" />
> </form>
>
Yeah, if you used code like that IRL I would slap your hand!
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
attached mail follows:
On Apr 9, 2008, at 11:29 AM, Daniel Brown wrote:
> On Wed, Apr 9, 2008 at 11:18 AM, Jason Pruim <japruim
raoset.com>
> wrote:
>> On Apr 9, 2008, at 11:09 AM, Jim Lucas wrote:
>>>
>>> While we are on the topic of the <form...>...</form> tags, just a
>>> side
>> note. It is invalid HTML syntax to have any tag between your
>>>
>>> <table><ILLEGAL><tr><ILLEGAL><td> ok here
>> </td><ILLEGAL></tr><ILLEGAL></table>
>>>
>>
>> But something like:
>> <table><TR><TD>stuff here</TD></TR></table> is okay right? Just
>> wanted to
>> double check since that's how all my stuff is and it works... but
>> just
>> because it works doesn't mean it's right :)
>
> First day with the new eyes, Pruim, or decided to try to forget
> and then re-learn English and HTML simultaneously? ;-P
Both of little actually :)
>
>
> Jim points out the correct XHTML layout, which shows "ok here"
> (or, as you have it, "stuff here") between the td/TD tags. Case
> doesn't matter, but does make it look sloppy. In addition, case
> /should/ matter when matching closing to opening tags. For example,
> try to avoid <td></TD> and mix-and-match versions thereof.
I always used to type my HTML is lower case, but I've been trying to
get switched over to UPPERCASE to help separate code from content.
>
--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
japruim
raoset.com
attached mail follows:
On Wed, Apr 9, 2008 at 12:21 PM, Jason Pruim <japruim
raoset.com> wrote:
> > Jim points out the correct XHTML layout, which shows "ok here"
> > (or, as you have it, "stuff here") between the td/TD tags. Case
> > doesn't matter, but does make it look sloppy. In addition, case
> > /should/ matter when matching closing to opening tags. For example,
> > try to avoid <td></TD> and mix-and-match versions thereof.
> >
>
> I always used to type my HTML is lower case, but I've been trying to get
> switched over to UPPERCASE to help separate code from content.
You might as well switch back to lowercase, since that's part of the
XHTML 1.0 specs. Even if you don't use XHTML, consistent lowercase
will still work with the previous HTML standards and it prevents you
from having to fix a bunch of stuff if you someday find yourself
having to "upgrade" everything to XHTML for some reason in the future.
http://www.w3.org/TR/xhtml1/#h-4.2
Andrew
attached mail follows:
On Wed, Apr 9, 2008 at 1:27 AM, hce <webmail.hce
gmail.com> wrote:
> Hi,
>
> How can I check if the XMLReader is enabled or not in php? Also, how
> to config the php to support SOAP and WSDL?
>
> Thank you.
>
> Jim
This should answer your first question.
http://www.php.net/manual/en/function.extension-loaded.php
Andrew
attached mail follows:
Could someone explain to me what I'm doing wrong?
I'm trying to get an element from one DOMDocument and append it to a
different DOMDocument. The (simplified) output of saveXML() from the
first DOMDocument is as follows:
<?xml version="1.0" encoding="UTF-8"?> <BranchRoot
id="root"><option>1</option><option>2</option></BranchRoot>
Here is a snippet of code:
<?php
$oXmlDocument = new DOMDocument( '1.0', 'UTF-8' );
$oRootNode = $oXmlDocument->createElement( 'menu' );
$oRootNode->setAttribute( 'id', 'root' );
$oRootNode->setIdAttribute( 'id', TRUE );
$oRootNode->setAttribute( 'style', $sStyle );
$oRootNode->setAttribute( 'width', $iWidth );
$oRootNode->setAttribute( 'target', $sTarget );
$oRootNode->setAttribute( 'indent', $iIndent );
$oXmlDocument->appendChild( $oRootNode );
$oNewChildEl = $oFirstDoc->getElementById( 'root' );
$oRootNode->appendChild( $oNewChildEl );
?>
I'm printing out what $oNewChildEl is to see if it's not returning the
proper element, using
echo '[' . $oNewChildEl->tagName . ']' . var_dump( $oNewChildEl );
and I'm seeing:
object(DOMElement)#1055 (0) { } [BranchRoot]
so it does look like it's returning the proper DOMElement. But even
so, I'm getting a fatal error when $oRootNode is trying to
appendChild(). Specifically, the error I'm getting is
Fatal error: Uncaught exception 'DOMException' with message 'Wrong
Document Error'
What's going on? It doesn't seem like I'm doing anything wrong but
something is causing the problem and I apparently do not understand
exactly what.
Could anyone lend any insight as to what's going on? And what I might
do to get what I need done?
thnx,
Chris
attached mail follows:
On Wed, Apr 9, 2008 at 9:35 AM, Christoph Boget
<christoph.boget
gmail.com> wrote:
> Could someone explain to me what I'm doing wrong?
>
> I'm trying to get an element from one DOMDocument and append it to a
> different DOMDocument. The (simplified) output of saveXML() from the
> first DOMDocument is as follows:
>
> <?xml version="1.0" encoding="UTF-8"?> <BranchRoot
> id="root"><option>1</option><option>2</option></BranchRoot>
>
> Here is a snippet of code:
>
> <?php
>
> $oXmlDocument = new DOMDocument( '1.0', 'UTF-8' );
> $oRootNode = $oXmlDocument->createElement( 'menu' );
> $oRootNode->setAttribute( 'id', 'root' );
> $oRootNode->setIdAttribute( 'id', TRUE );
>
> $oRootNode->setAttribute( 'style', $sStyle );
> $oRootNode->setAttribute( 'width', $iWidth );
> $oRootNode->setAttribute( 'target', $sTarget );
> $oRootNode->setAttribute( 'indent', $iIndent );
>
> $oXmlDocument->appendChild( $oRootNode );
>
> $oNewChildEl = $oFirstDoc->getElementById( 'root' );
> $oRootNode->appendChild( $oNewChildEl );
> ?>
>
> I'm printing out what $oNewChildEl is to see if it's not returning the
> proper element, using
>
> echo '[' . $oNewChildEl->tagName . ']' . var_dump( $oNewChildEl );
>
> and I'm seeing:
>
> object(DOMElement)#1055 (0) { } [BranchRoot]
>
> so it does look like it's returning the proper DOMElement. But even
> so, I'm getting a fatal error when $oRootNode is trying to
> appendChild(). Specifically, the error I'm getting is
>
> Fatal error: Uncaught exception 'DOMException' with message 'Wrong
> Document Error'
>
> What's going on? It doesn't seem like I'm doing anything wrong but
> something is causing the problem and I apparently do not understand
> exactly what.
>
> Could anyone lend any insight as to what's going on? And what I might
> do to get what I need done?
>
> thnx,
> Chris
DOM Nodes are specific to the document in which they were created, so
you can't just append a node from one document into another document.
The importNode function does what you want.
http://us2.php.net/manual/en/function.dom-domdocument-importnode.php
Andrew
attached mail follows:
> DOM Nodes are specific to the document in which they were created, so
> you can't just append a node from one document into another document.
> The importNode function does what you want.
> http://us2.php.net/manual/en/function.dom-domdocument-importnode.php
Interesting. Why is that, out of curiosity?
Thanks for the pointer! That's exactly what I needed. :)
thnx,
Chris
attached mail follows:
On Wed, Apr 9, 2008 at 10:17 AM, Christoph Boget
<christoph.boget
gmail.com> wrote:
> > DOM Nodes are specific to the document in which they were created, so
> > you can't just append a node from one document into another document.
> > The importNode function does what you want.
> > http://us2.php.net/manual/en/function.dom-domdocument-importnode.php
>
> Interesting. Why is that, out of curiosity?
>
> Thanks for the pointer! That's exactly what I needed. :)
>
> thnx,
> Chris
>
Well, it's part of the DOM specification. I'm not totally sure why
(and don't have the inclination to read all about it), but DOM nodes
are specific to the document and contain pointers and other
information related to that document.
If you really want to know moe details, you can check out the W3C site (or STW).
http://www.w3.org/DOM/faq.html#moveNode
Andrew
attached mail follows:
Maybe slightly off, but this is a general PHP question :-)
I'm not a professional developer, just hobbyist at PHP. As now, when I
want to learn something new such as a new framework, it's beneficial to
build a PHP application in my free time as a learning exercise.
Sometimes the learning is not always motivation enough (especially after
the beer starts flowing). As extra motivation (above and beyond
learning) I would like to either freely distribute my app or build a
public site using my app. My problem is that I never can think of what
to build and what I can think of has or most likely has been done and is
available.
So to my question: does anyone know of a site or forum where people
request apps or sites to be built and then it can be voted on to track
the people that are interested? I'm not talking about sites where
people post paid development requests. Something open and
non-contractual in the spirit of open source.
The two open source projects that I have developed came from being part
of a community and answering the same support requests in the forums day
after day. It occurred to me that I could create something to do what
the users kept asking. So this would be the same idea, just more broad.
If no one knows of good site(s) like this, does anyone think it would be
beneficial? Would you use it?
Thanks!
-Shawn
attached mail follows:
[snip]
So to my question: does anyone know of a site or forum where people
request apps or sites to be built and then it can be voted on to track
the people that are interested? I'm not talking about sites where
people post paid development requests. Something open and
non-contractual in the spirit of open source.
The two open source projects that I have developed came from being part
of a community and answering the same support requests in the forums day
after day. It occurred to me that I could create something to do what
the users kept asking. So this would be the same idea, just more broad.
If no one knows of good site(s) like this, does anyone think it would be
beneficial? Would you use it?
[/snip]
http://sourceforge.net/index.php
attached mail follows:
On Wed, Apr 9, 2008 at 11:36 AM, Shawn McKenzie <nospam
mckenzies.net> wrote:
> Maybe slightly off, but this is a general PHP question :-)
[snip!]
>
> So to my question: does anyone know of a site or forum where people request
> apps or sites to be built and then it can be voted on to track the people
> that are interested? I'm not talking about sites where people post paid
> development requests. Something open and non-contractual in the spirit of
> open source.
That depends, Shawn. Are you looking to be a part of an
established project, or to start your own? If you wanted to work with
a well-known team, I'd recommend starting with something like the
phpBB group. You can start off by writing modules and such, and if
you want, get into developing the core application itself.
To develop full applications in open source technology to someone
else's spec would make me very leery.... because there's almost a
guarantee stamped right there that says, "you're doing my work for
free, you're making me rich." And while, to you, it is in the spirit
of open source, overall it defeats the purpose of open source.
The best way to come up with an idea and build a project is to
follow these simple steps:
1.) Stop giving a damn if something similar exists. You may
build a better mousetrap. If developers always said, "no, that's
already been done," there would be just one of everything - from
open-source content management systems to full-blown operating
systems.
2.) Stop thinking about how others will use your work for now.
Be selfish and focus on yourself for a bit. This *does not* mean to
ignore security and good coding practices, or even to ignore
scalability.... only to not think about how others may accept your
work when it's complete. Think of it as doing coding only for
yourself, to make your life easier.
3.) Identify a problem that you experience yourself. For
example, say you work part-time mowing lawns in the neighborhood.
Each property pays you $5 per 100'x100' square per job, with a minimum
of $5 required. You have 29 properties of various sizes that you mow
each summer, and have always done one each day, taking the last day to
scramble and try to be sure all accounts are paid.
4.) Outline how you want your application to work for you. In
the example shown above, you might decide to have an administrative
panel for you to enter the dimensions of each property under a
different profile, with the ability to add users, and then view and
invoice those with outstanding balances. You can then either merge an
existing user-management framework (allowed by license) or write your
own (it's one of the most fundamental, simple things to do). Then you
may want to incorporate payment processing for PayPal and
Authorize.net into that so that you won't have to knock on doors or
drive to the bank.
5.) Use the application yourself for a while and work out the
initial bugs.
6.) Place the code in a package on your own server with an
explanation of what it does. Tell people who may be interested in
using your work what it is, where it is, how to get it, and how to use
it.
7.) You may even want to submit an entry to directories such
as HotScripts (http://www.hotscripts.com/) or my old favorite,
Resource Index (http://php.resourceindex.com/).
Whatever you do, though, before you step into #6 above, be sure
that you've clearly stated under which license you are distributing
your code. Most commonly, of course, will be GPL, LGPL, and BSD, but
you can use any existing license (such as Apache, PHP, MIT, etc.), or
write your own. You may even choose to license your code for
"anything, anywhere" as I do with some of mine (including all
pseudocode) by using Copyleft- or Copycenter-style licensure.
--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting
$59.99/mo., VPS starting
$19.99/mo.,
and shared hosting starting
$2.50/mo.
Unmanaged, managed, and fully-managed!
attached mail follows:
On Sat, Apr 5, 2008 at 7:44 PM, Manuel Lemos <mlemos
acm.org> wrote:
> on 04/04/2008 03:16 AM steve said the following:
> > FastCGI is *the* way to run PHP, but I think Apache is not the
> > platform for it anymore.
>
> If need more than one server, Apache pre-forked model may limited.
> Otherwise it is just fine. Other than that, I think there are some
> features that only work with Apache SAPI.
Apache SAPI is the easiest. But it falls apart when you have a higher
load. FastCGI can stall those who are thinking of getting their second
webserver. When you have a whole farm of them the differences are
grossly obvious.
> > Is the COMMET implementation on the client side long polling
> > (reconnect) or does it stream using script tags? What goes on in the
> > server? Does it push the buffer of blank data that WebKit requires? Is
> > it a PHP daemon process running as a simple HTTP server?
>
> Actually it is just an hidden iframe that loads an HTML page with small
> Javascript chunks that flush each COMET AJAX server response. This is a
> regular HTTP request performed to the same script that serves that form.
> The form AJAX plug-in can detect the AJAX request and respond
> adequately. So it works equally well in all browsers including Webkit.
So you keep a whole Apache/PHP process open for each user? That is
nice for a small site, but doesn't work with tens of thousands of
simultaneous connections. :(
Webkit has a bug/feature that it would buffer the incoming data until
it reached 1024 bytes. You can see how the django server deals with it
in their comet implementation:
http://code.google.com/p/django-evserver/source/browse/trunk/comet.py
Orbited also uses 100 "<span></span>" as padding.
So does meteor I believe. Here is what they say:
"Safari and IE have a buffer which must fill up before any response is
parsed. Data received before the buffer is full will not be rendered
or interpreted and will not fire the Interactive state of an XHR until
the buffer is full or the connection is closed. The obvious solution
to this is to send a blob of 'noise' at the start of any response that
needs to be parsed incrementally. The size of the buffer that needs to
be filled is 512 bytes in Internet Explorer, and between 256 bytes and
1K in Safari depending on the Content-type of the response (a
non-standard content-type equals a 256b buffer, while a text/html
content type may be as much as 1K) " from
http://meteorserver.org/browser-techniques/xssinfo
It is also mentioned a bit in http://en.wikipedia.org/wiki/Comet_(programming)
-s
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]