FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » calling a value into another php script...
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
calling a value into another php script... [message #182689] Thu, 29 August 2013 01:35 Go to next message
Nagaraju Kachapuram is currently offline  Nagaraju Kachapuram
Messages: 14
Registered: February 2013
Karma: 0
Junior Member
Hi all,

I am using an index.html to execute a php prog. First I am choosing a an option from a dropdown list, which will connect to a mail server. If the password is correct then it will open second html page. I want to call the code part into the
second html page. How can it be done?

<form action=xyz.php method=POST>
<option selected>Select from list</option>
<option value="x23(at)xyz(dot)com">name1,code1</option>
<option value="y13(at)xyz(dot)com">name2,code2</option>
<option value="z33(at)xyz(dot)com">name3,code3</option>


thank you.
Re: calling a value into another php script... [message #182690 is a reply to message #182689] Thu, 29 August 2013 02:56 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 8/28/2013 9:35 PM, nag wrote:
> Hi all,
>
> I am using an index.html to execute a php prog. First I am choosing a an option from a dropdown list, which will connect to a mail server. If the password is correct then it will open second html page. I want to call the code part into the
> second html page. How can it be done?
>
> <form action=xyz.php method=POST>
> <option selected>Select from list</option>
> <option value="x23(at)xyz(dot)com">name1,code1</option>
> <option value="y13(at)xyz(dot)com">name2,code2</option>
> <option value="z33(at)xyz(dot)com">name3,code3</option>
>
>
> thank you.
>

Not enough information for an intelligent response.

Where is the password entered? If it's in the same form, you need to
validate the password in your script before calling the mail server.

And what mail server are you using? Most do not have a web interface,
but you have to look at the mail server interface to see how it works.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: calling a value into another php script... [message #182691 is a reply to message #182689] Thu, 29 August 2013 09:40 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
nag wrote:

> I am using an index.html to execute a php prog. First I am choosing a an
> option from a dropdown list, which will connect to a mail server. If the
> password is correct then it will open second html page. I want to call the
> code part into the second html page. How can it be done?

RTFM.

> <form action=xyz.php method=POST>
> <option selected>Select from list</option>
> <option value="x23(at)xyz(dot)com">name1,code1</option>
> <option value="y13(at)xyz(dot)com">name2,code2</option>
> <option value="z33(at)xyz(dot)com">name3,code3</option>

You do not want to do that.


PointedEars
--
When all you know is jQuery, every problem looks $(olvable).
Re: calling a value into another php script... [message #182692 is a reply to message #182690] Thu, 29 August 2013 13:06 Go to previous messageGo to next message
Nagaraju Kachapuram is currently offline  Nagaraju Kachapuram
Messages: 14
Registered: February 2013
Karma: 0
Junior Member
On Thursday, 29 August 2013 08:26:50 UTC+5:30, Jerry Stuckle wrote:
> On 8/28/2013 9:35 PM, nag wrote:
>
>> Hi all,
>
>>
>
>> I am using an index.html to execute a php prog. First I am choosing a an option from a dropdown list, which will connect to a mail server. If the password is correct then it will open second html page. I want to call the code part into the
>
>> second html page. How can it be done?
>
>>
>
>> <form action=xyz.php method=POST>
>
>> <option selected>Select from list</option>
>
>> <option value="x23(at)xyz(dot)com">name1,code1</option>
>
>> <option value="y13(at)xyz(dot)com">name2,code2</option>
>
>> <option value="z33(at)xyz(dot)com">name3,code3</option>
>
>>
>
>>
>
>> thank you.
>
>>
>
>
>
> Not enough information for an intelligent response.
>
>
>
> Where is the password entered? If it's in the same form, you need to
>
> validate the password in your script before calling the mail server.
>
>
>
> And what mail server are you using? Most do not have a web interface,
>
> but you have to look at the mail server interface to see how it works.
>
>
>
> --
>
> ==================
>
> Remove the "x" from my email address
>
> Jerry Stuckle
>
> JDS Computer Training Corp.
>
> jstucklex(at)attglobal(dot)net
>
> ==================

We are using intranet. Its pop3 mail server.
calling as

<form action=passwd.php method=POST>


> Where is the password entered? If it's in the same form, you need to
>
> validate the password in your script before calling the mail server.


<tr>
<td width="131" height="22" bordercolor="#999999" align="left">
<font face="Verdana" color="white" size="2"><B>Password</font></td>
<td width="148" height="22" bordercolor="ffffe0"><font face="Verdana">
<input type="password" size="20" value name="passwd" style="background-color: ffe6c1; font-family:Verdana; font-size:8pt; color:#111111; font-weight:bold"></font></td>
</tr>
</table>
<p><br>
<input name="mailserver" type=hidden value="xx.xx.x.xx"> </p>
<input type=submit value=Login name=submit> </p>
</center>
</div>

Actually the username part in email id is itself the code part which I have to print on the second html page. Presently I am asking the user to enter the value. It is leading to do mistake by the user.

Thank you.
Re: calling a value into another php script... [message #182693 is a reply to message #182692] Thu, 29 August 2013 13:31 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 8/29/2013 9:06 AM, nag wrote:
> On Thursday, 29 August 2013 08:26:50 UTC+5:30, Jerry Stuckle wrote:
>> On 8/28/2013 9:35 PM, nag wrote:
>>
>>> Hi all,
>>
>>>
>>
>>> I am using an index.html to execute a php prog. First I am choosing a an option from a dropdown list, which will connect to a mail server. If the password is correct then it will open second html page. I want to call the code part into the
>>
>>> second html page. How can it be done?
>>
>>>
>>
>>> <form action=xyz.php method=POST>
>>
>>> <option selected>Select from list</option>
>>
>>> <option value="x23(at)xyz(dot)com">name1,code1</option>
>>
>>> <option value="y13(at)xyz(dot)com">name2,code2</option>
>>
>>> <option value="z33(at)xyz(dot)com">name3,code3</option>
>>
>>>
>>
>>>
>>
>>> thank you.
>>
>>>
>>
>>
>>
>> Not enough information for an intelligent response.
>>
>>
>>
>> Where is the password entered? If it's in the same form, you need to
>>
>> validate the password in your script before calling the mail server.
>>
>>
>>
>> And what mail server are you using? Most do not have a web interface,
>>
>> but you have to look at the mail server interface to see how it works.
>>
>>
>
> We are using intranet. Its pop3 mail server.
> calling as
>
> <form action=passwd.php method=POST>
>

This does not call the pop3 mail server. Or am I misunderstanding what
you mean?

>
>> Where is the password entered? If it's in the same form, you need to
>>
>> validate the password in your script before calling the mail server.
>
>
> <tr>
> <td width="131" height="22" bordercolor="#999999" align="left">
> <font face="Verdana" color="white" size="2"><B>Password</font></td>
> <td width="148" height="22" bordercolor="ffffe0"><font face="Verdana">
> <input type="password" size="20" value name="passwd" style="background-color: ffe6c1; font-family:Verdana; font-size:8pt; color:#111111; font-weight:bold"></font></td>
> </tr>
> </table>
> <p><br>
> <input name="mailserver" type=hidden value="xx.xx.x.xx"> </p>
> <input type=submit value=Login name=submit> </p>
> </center>
> </div>
>
> Actually the username part in email id is itself the code part which I have to print on the second html page. Presently I am asking the user to enter the value. It is leading to do mistake by the user.
>
> Thank you.
>

NEVER trust ANYTHING from the user - even hidden fields. They can too
easily be hacked (nothing says the information came from YOUR page - it
can easily be faked). This is especially true for things like email ids
and email addresses.

And the fact this is an intranet is immaterial.

If you want to pass something from one page to another, then use the
$_SESSION superglobal.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: calling a value into another php script... [message #182694 is a reply to message #182692] Thu, 29 August 2013 15:35 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
nag wrote:

> On Thursday, 29 August 2013 08:26:50 UTC+5:30, Jerry Stuckle wrote:
>> […]

Please trim your quotes to the *relevant* *minimum*.

> We are using intranet. Its pop3 mail server.
> calling as
>
> <form action=passwd.php method=POST>

POP3 is used to receive e-mails; SMTP is used to send e-mails.

>> Where is the password entered? If it's in the same form, you need to
>> validate the password in your script before calling the mail server.
>
>
> <tr>
> <td width="131" height="22" bordercolor="#999999" align="left">
> <font face="Verdana" color="white" size="2"><B>Password</font></td>
> <td width="148" height="22" bordercolor="ffffe0"><font
> face="Verdana"> <input type="password" size="20" value name="passwd"
> style="background-color: ffe6c1; font-family:Verdana; font-size:8pt;
> color:#111111; font-weight:bold"></font></td>
> </tr>
> </table>
> <p><br>
> <input name="mailserver" type=hidden value="xx.xx.x.xx"> </p>
> <input type=submit value=Login name=submit> </p>
> </center>
> </div>
>
> Actually the username part in email id is itself the code part which I
> have to print on the second html page. Presently I am asking the user to
> enter the value. It is leading to do mistake by the user.

Still zero lines of PHP code posted, but HTML code that, if read, poses a
severe risk for gtting eye cancer. Perhaps you want to get the basics
first?

<http://validator.w3.org/>
<http://php.net/manual/>

> Thank you.

You're welcome.


PointedEars
--
> If you get a bunch of authors […] that state the same "best practices"
> in any programming language, then you can bet who is wrong or right...
Not with javascript. Nonsense propagates like wildfire in this field.
-- Richard Cornford, comp.lang.javascript, 2011-11-14
Re: calling a value into another php script... [message #182695 is a reply to message #182689] Fri, 30 August 2013 00:18 Go to previous messageGo to next message
bill is currently offline  bill
Messages: 310
Registered: October 2010
Karma: 0
Senior Member
On 2013-08-28 9:35 PM, nag wrote:
> Hi all,
>
> I am using an index.html to execute a php prog. First I am choosing a an option from a

>dropdown list, which will connect to a mail server. If the password
is correct then it will open

> ?second html page. I want to call the code part into the

> second html page. How can it be done?
>
> <form action=xyz.php method=POST>
> <option selected>Select from list</option>
> <option value="x23(at)xyz(dot)com">name1,code1</option>
> <option value="y13(at)xyz(dot)com">name2,code2</option>
> <option value="z33(at)xyz(dot)com">name3,code3</option>
>
>
> thank you.
>

I'm not sure, but you might want to use an href for the file you want to
open. As already mentioned, your info is a little lacking in detail;
actual code would be better to look at.

Also you should set your line lengths in your nntp client to be 80
characters or less in length. Over-length lines often won't all a
response until they're broken up as I did above.

And while I'm at it, you can pretty much ignore Stuckle; he's more of a
troll than anything else and very, very seldom parts with any useful
information, if he actually has any.
Re: calling a value into another php script... [message #182696 is a reply to message #182695] Fri, 30 August 2013 00:57 Go to previous messageGo to next message
Christoph Michael Bec is currently offline  Christoph Michael Bec
Messages: 207
Registered: June 2013
Karma: 0
Senior Member
Twayne wrote:

> I'm not sure, but you might want to use an href for the file you want to
> open. As already mentioned, your info is a little lacking in detail;
> actual code would be better to look at.

ACK.

> Also you should set your line lengths in your nntp client to be 80
> characters or less in length. Over-length lines often won't all a
> response until they're broken up as I did above.

ACK. However, that might not be easily accomplished by posting via
Google groups.

> And while I'm at it, you can pretty much ignore Stuckle; he's more of a
> troll than anything else and very, very seldom parts with any useful
> information, if he actually has any.

One may consider Jerry opinionated--but one should better not fall to
the fallacy to consider him clueless. On the contrary, he can give
valuable hints if one asks the "right" questions. And even if one asks
"wrong" questions here, Jerry might give valuable hints; for instance,
to look for a more suitable newsgroup/forum.

--
Christoph M. Becker
Re: calling a value into another php script... [message #182697 is a reply to message #182695] Fri, 30 August 2013 01:50 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
On 30/08/13 01:18, Twayne wrote:
>
> And while I'm at it, you can pretty much ignore Stuckle; he's more of
> a troll than anything else and very, very seldom parts with any useful
> information, if he actually has any.
>
>
Wrong. You can and should completely ignore stuckle because he IS a
troll and never ever parts with anything useful because he never had it
in the first place.


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
Re: calling a value into another php script... [message #182698 is a reply to message #182695] Fri, 30 August 2013 01:50 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 8/29/2013 8:18 PM, Twayne wrote:
> On 2013-08-28 9:35 PM, nag wrote:
>> Hi all,
>>
>> I am using an index.html to execute a php prog. First I am choosing a
>> an option from a
>
>> dropdown list, which will connect to a mail server. If the password
> is correct then it will open
>
>> ?second html page. I want to call the code part into the
>
>> second html page. How can it be done?
>>
>> <form action=xyz.php method=POST>
>> <option selected>Select from list</option>
>> <option value="x23(at)xyz(dot)com">name1,code1</option>
>> <option value="y13(at)xyz(dot)com">name2,code2</option>
>> <option value="z33(at)xyz(dot)com">name3,code3</option>
>>
>>
>> thank you.
>>
>
> I'm not sure, but you might want to use an href for the file you want to
> open. As already mentioned, your info is a little lacking in detail;
> actual code would be better to look at.
>
> Also you should set your line lengths in your nntp client to be 80
> characters or less in length. Over-length lines often won't all a
> response until they're broken up as I did above.
>
> And while I'm at it, you can pretty much ignore Stuckle; he's more of a
> troll than anything else and very, very seldom parts with any useful
> information, if he actually has any.
>
>

ROFL. The troll is trying to redirect. You're as bad as TNP.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: calling a value into another php script... [message #182699 is a reply to message #182696] Fri, 30 August 2013 01:54 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
On 30/08/13 01:57, Christoph Michael Becker wrote:
> Twayne wrote:
>
>> I'm not sure, but you might want to use an href for the file you want to
>> open. As already mentioned, your info is a little lacking in detail;
>> actual code would be better to look at.
> ACK.
>
>> Also you should set your line lengths in your nntp client to be 80
>> characters or less in length. Over-length lines often won't all a
>> response until they're broken up as I did above.
> ACK. However, that might not be easily accomplished by posting via
> Google groups.
>
>> And while I'm at it, you can pretty much ignore Stuckle; he's more of a
>> troll than anything else and very, very seldom parts with any useful
>> information, if he actually has any.
> One may consider Jerry opinionated--but one should better not fall to
> the fallacy to consider him clueless. On the contrary, he can give
> valuable hints if one asks the "right" questions. And even if one asks
> "wrong" questions here, Jerry might give valuable hints; for instance,
> to look for a more suitable newsgroup/forum.
>
If you think that's valuable, you have a funny idea of value.

I hope the next time yoursatnav is broken and you stop to ask someone
the way the conversation goes like this

'Excuse me, can you tell me the way to San Jose?'
'No, I am a postman and my name is Stuckle.Try the post office'.
'So how do I get to the post office?'
'I am only a postman. Its not ,my job to tell you how to find the post
office'



--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
Re: calling a value into another php script... [message #182700 is a reply to message #182697] Fri, 30 August 2013 02:18 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 8/29/2013 9:50 PM, The Natural Philosopher wrote:
> On 30/08/13 01:18, Twayne wrote:
>>
>> And while I'm at it, you can pretty much ignore Stuckle; he's more of
>> a troll than anything else and very, very seldom parts with any useful
>> information, if he actually has any.
>>
>>
> Wrong. You can and should completely ignore stuckle because he IS a
> troll and never ever parts with anything useful because he never had it
> in the first place.
>
>

So sayeth the anonymous troll who's afraid for people to find out his
real name or email address because in real life he's neither the EE nor
the programmer he claims to be. Just an out-of-work ditch digger who
got fired because he didn't know which end of the shovel to use.

A troll to the end.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: calling a value into another php script... [message #182702 is a reply to message #182696] Fri, 30 August 2013 09:57 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Christoph Michael Becker wrote:

> Twayne wrote:
>> And while I'm at it, you can pretty much ignore Stuckle; he's more of a
>> troll than anything else and very, very seldom parts with any useful
>> information, if he actually has any.
>
> One may consider Jerry opinionated--but one should better not fall to
> the fallacy to consider him clueless. On the contrary, he can give
> valuable hints if one asks the "right" questions.

(This concerns all, so no reply via e-mail this time.)

Like actually recommending to *disable* output buffering on a production
site, when having output buffering *enabled* is *the* *proven*, simple
measure to make a PHP-powered site faster, thus more user-friendly.

<news:ku1e26$5a9$3(at)dont-email(dot)me>

vs.

,-[default php.ini]
|
| ; output_buffering
| ; Default Value: Off
| ; Development Value: 4096
| ; Production Value: 4096

And that is just one of many examples where he is – probably out of lack of
*real* *PHP* *development* experience – dead wrong, while the majority of
his postings are nothing more than calling someone else troll.

(Q: If he realized it was a troll, why would he not just *stop* *feeding*
them? A: It takes one to know one.)

So thanks, but no, thanks. This newsgroup is much more readable for me
without his postings. Should he post anything valuable, which I consider
highly unlikely at this point, I will be reading it in quotations.


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Re: calling a value into another php script... [message #182703 is a reply to message #182702] Fri, 30 August 2013 12:49 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 8/30/2013 5:57 AM, Thomas 'PointedEars' Lahn wrote:
> Christoph Michael Becker wrote:
>
>> Twayne wrote:
>>> And while I'm at it, you can pretty much ignore Stuckle; he's more of a
>>> troll than anything else and very, very seldom parts with any useful
>>> information, if he actually has any.
>>
>> One may consider Jerry opinionated--but one should better not fall to
>> the fallacy to consider him clueless. On the contrary, he can give
>> valuable hints if one asks the "right" questions.
>
> (This concerns all, so no reply via e-mail this time.)
>
> Like actually recommending to *disable* output buffering on a production
> site, when having output buffering *enabled* is *the* *proven*, simple
> measure to make a PHP-powered site faster, thus more user-friendly.
>
> <news:ku1e26$5a9$3(at)dont-email(dot)me>
>
> vs.
>
> ,-[default php.ini]
> |
> | ; output_buffering
> | ; Default Value: Off
> | ; Development Value: 4096
> | ; Production Value: 4096
>
> And that is just one of many examples where he is – probably out of lack of
> *real* *PHP* *development* experience – dead wrong, while the majority of
> his postings are nothing more than calling someone else troll.
>

Proven by whom? You? ROFLMAO!

The actual proof is that it adds additional overhead to the server,
requiring additional memory and cpu to perform the buffering.

The system already does some of its own buffering - where buffering
makes sense. PHP buffers output before it is sent to the server, and
the server buffers output before it is sent to the user. But these are
at measured points, not just buffering everything.

> (Q: If he realized it was a troll, why would he not just *stop* *feeding*
> them? A: It takes one to know one.)
>

So sayeth the guy who is known as a troll by thousands of usenet users
in multiple newsgroups!

> So thanks, but no, thanks. This newsgroup is much more readable for me
> without his postings. Should he post anything valuable, which I consider
> highly unlikely at this point, I will be reading it in quotations.
>
>
> PointedEars
>

How about this: You, Twayne and TNP leave and let people who actually
understand PHP answer questions in this newsgroup. Then it would be
better for EVERYONE.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: calling a value into another php script... [message #182704 is a reply to message #182703] Fri, 30 August 2013 14:30 Go to previous messageGo to next message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
On Fri, 30 Aug 2013 08:49:14 -0400, Jerry Stuckle wrote:

> On 8/30/2013 5:57 AM, Thomas 'The PointedEars Twat' Lahn wrote:

>> Like actually recommending to *disable* output buffering on a
>> production site, when having output buffering *enabled* is *the*
>> *proven*, simple measure to make a PHP-powered site faster, thus more
>> user-friendly.

The only benefit I've ever seen from PHP output buffering is it allows
you to output a page and then change the headers at the end if for some
reason you have a need to ... as long as the buffer was big enough to
hold the whole page, otherwise you're fucked anyway, which is probably
why sensible coders always make sure they send all the headers *before*
sending the output.

Anyway, as you say, the browser is probably buffering the page,
especially if it's using compression, so all that buffering in php will
do is increase the memory footprint of the process.

This may in some cases mean that the output is "buffered" in the script,
by which I mean you build the output as a variable, or possibly a
collection of variables and an:

echo <<< EOT

.......

EOT;

where you insert those variables into the output, but IME it is better to
make sure that you get the whole headers before data thing right, rather
than rely on buffering and the "I wonder if tweaking this parameter will
reduce my memory footprint" whims of a future site administrator to do it
for you.

Especially as the future site admin is probably going to be a new hire
they recruited in a panic when the old unix admin retired, is probably
fresh out of college, and has no idea about real world IT.

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
Re: calling a value into another php script... [message #182705 is a reply to message #182704] Fri, 30 August 2013 15:42 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 8/30/2013 10:30 AM, Denis McMahon wrote:
> On Fri, 30 Aug 2013 08:49:14 -0400, Jerry Stuckle wrote:
>
>> On 8/30/2013 5:57 AM, Thomas 'The PointedEars Twat' Lahn wrote:
>
>>> Like actually recommending to *disable* output buffering on a
>>> production site, when having output buffering *enabled* is *the*
>>> *proven*, simple measure to make a PHP-powered site faster, thus more
>>> user-friendly.
>
> The only benefit I've ever seen from PHP output buffering is it allows
> you to output a page and then change the headers at the end if for some
> reason you have a need to ... as long as the buffer was big enough to
> hold the whole page, otherwise you're fucked anyway, which is probably
> why sensible coders always make sure they send all the headers *before*
> sending the output.
>

I've also used it when calling code which outputs directly, so I can
parse that output. For instance, if you want to know the current
configuration, you can buffer the output of phpinfo(INFO_CONFIGURATION),
then parse it. It's easier to do than to figure out all of the
configuration parameters yourself. Of course, if you only want one or
two, then just using ini_get() would be easier.

But you're right - it's always best to just send the correct headers
first, then output your data.

> Anyway, as you say, the browser is probably buffering the page,
> especially if it's using compression, so all that buffering in php will
> do is increase the memory footprint of the process.
>

Yes, the browser buffers the output - but PHP also buffers the output
before sending it to the web server for efficiency. Buffering it
yourself has no gain. And the web server will buffer the output so it
can break it into the appropriate sized packets. Buffering it yourself
just adds an extra layer of overhead - the PHP buffer size doesn't
change, so you will end up with the same number of buffer fills and
sends to the server, and the packet size doesn't change so the same
number of packets will be sent.

> This may in some cases mean that the output is "buffered" in the script,
> by which I mean you build the output as a variable, or possibly a
> collection of variables and an:
>
> echo <<< EOT
>
> ......
>
> EOT;
>
> where you insert those variables into the output, but IME it is better to
> make sure that you get the whole headers before data thing right, rather
> than rely on buffering and the "I wonder if tweaking this parameter will
> reduce my memory footprint" whims of a future site administrator to do it
> for you.
>
> Especially as the future site admin is probably going to be a new hire
> they recruited in a panic when the old unix admin retired, is probably
> fresh out of college, and has no idea about real world IT.
>

Exactly.

Buffering it yourself is OK when you get 100 hits/day. But try a site
that peaks at > 1K hits/second and you'll definitely see a difference
(and not for the better!).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: calling a value into another php script... [message #182707 is a reply to message #182699] Fri, 30 August 2013 21:15 Go to previous messageGo to next message
bill is currently offline  bill
Messages: 310
Registered: October 2010
Karma: 0
Senior Member
...

And even if one asks
>> "wrong" questions here, Jerry might give valuable hints; for instance,
>> to look for a more suitable newsgroup/forum.

Sounds like good self-advice.
>>
> If you think that's valuable, you have a funny idea of value.
>
> I hope the next time yoursatnav is broken and you stop to ask someone
> the way the conversation goes like this
>
> 'Excuse me, can you tell me the way to San Jose?'
> 'No, I am a postman and my name is Stuckle.Try the post office'.
> 'So how do I get to the post office?'
> 'I am only a postman. Its not ,my job to tell you how to find the post
> office'

LOL!! That's got to be the best analogy I've see in a LONG time! I
don't dislike him; he's easy enough to avoid/ignore; I just think he's
more a troll than anything else.

>
>
>
Re: calling a value into another php script... [message #182708 is a reply to message #182697] Fri, 30 August 2013 21:24 Go to previous messageGo to next message
bill is currently offline  bill
Messages: 310
Registered: October 2010
Karma: 0
Senior Member
On 2013-08-29 9:50 PM, The Natural Philosopher wrote:
> On 30/08/13 01:18, Twayne wrote:
>>
>> And while I'm at it, you can pretty much ignore Stuckle; he's more of
>> a troll than anything else and very, very seldom parts with any useful
>> information, if he actually has any.
>>
>>
> Wrong. You can and should completely ignore stuckle because he IS a
> troll and never ever parts with anything useful because he never had it
> in the first place.
>
>

He may have had something useful to say at one time but not via any post
I've seen here or on others sites he frequents. I do believe, actually
know, he's a troll, and probably an old, non-current coder nowadays.

I just simply seldom read any of this posts. He can be funny, too. He
once told me he'd never again respond to anything I said, and then
responded to several posts of mine, and the last time I poked at him, he
said I promised never to talk to him again, which was a lie. Luckily
he's easy to ignore; but I digress ...

I've been around here long enough now to appreciate those who are truly
helpful, even if it doesn't answer my query; I always appreciate the
attempts.

Cheers,

Twayne`
Re: calling a value into another php script... [message #182709 is a reply to message #182702] Fri, 30 August 2013 22:10 Go to previous messageGo to next message
Christoph Michael Bec is currently offline  Christoph Michael Bec
Messages: 207
Registered: June 2013
Karma: 0
Senior Member
Thomas 'PointedEars' Lahn wrote:

> Christoph Michael Becker wrote:
>
>> Twayne wrote:
>>> And while I'm at it, you can pretty much ignore Stuckle; he's more of a
>>> troll than anything else and very, very seldom parts with any useful
>>> information, if he actually has any.
>>
>> One may consider Jerry opinionated--but one should better not fall to
>> the fallacy to consider him clueless. On the contrary, he can give
>> valuable hints if one asks the "right" questions.
>
> (This concerns all, so no reply via e-mail this time.)
>
> Like actually recommending to *disable* output buffering on a production
> site, when having output buffering *enabled* is *the* *proven*, simple
> measure to make a PHP-powered site faster, thus more user-friendly.
>
> <news:ku1e26$5a9$3(at)dont-email(dot)me>
>
> vs.
>
> ,-[default php.ini]
> |
> | ; output_buffering
> | ; Default Value: Off
> | ; Development Value: 4096
> | ; Production Value: 4096

If one posts wrong information in this newsgroup--wouldn't it be useful
to reply by pointing out that it is wrong? Of course one can simply
ignore such posts; other readers may not, and draw the conclusion that
the newsgroup is not worth reading, let alone asking a question or
starting a discussion here.

BTW: I consider a production value of output_buffering=4096 a reasonable
setting. However, I wouldn't accept the mere mention in a comment in
php.ini a proof that it increases performance.

> And that is just one of many examples where he is – probably out of lack of
> *real* *PHP* *development* experience – dead wrong, while the majority of
> his postings are nothing more than calling someone else troll.
>
> (Q: If he realized it was a troll, why would he not just *stop* *feeding*
> them? A: It takes one to know one.)

On the other hand, leaving trolls trolling around, might easily result
in these trolls taking over a discussion group...

Besides, calling someone a troll means to pigeon-hole them. IMO that
seldom fits exactly--there are more colors than just black and white.

> So thanks, but no, thanks. This newsgroup is much more readable for me
> without his postings. Should he post anything valuable, which I consider
> highly unlikely at this point, I will be reading it in quotations.

You may have read
<news:5213b351$0$6566$9b4e6d93(at)newsspool4(dot)arcor-online(dot)net>. Jerry was
the only one who was willing to help there--and he was able to do so.

--
Christoph M. Becker
Re: calling a value into another php script... [message #182710 is a reply to message #182705] Fri, 30 August 2013 22:19 Go to previous messageGo to next message
Christoph Michael Bec is currently offline  Christoph Michael Bec
Messages: 207
Registered: June 2013
Karma: 0
Senior Member
Jerry Stuckle wrote:

> On 8/30/2013 10:30 AM, Denis McMahon wrote:
>> On Fri, 30 Aug 2013 08:49:14 -0400, Jerry Stuckle wrote:
>>
>>> On 8/30/2013 5:57 AM, Thomas 'The PointedEars Twat' Lahn wrote:
^^^^ IMO that's
neither helpful nor funny.

>>>> Like actually recommending to *disable* output buffering on a
>>>> production site, when having output buffering *enabled* is *the*
>>>> *proven*, simple measure to make a PHP-powered site faster, thus more
>>>> user-friendly.
>>
>> The only benefit I've ever seen from PHP output buffering is it allows
>> you to output a page and then change the headers at the end if for some
>> reason you have a need to ... as long as the buffer was big enough to
>> hold the whole page, otherwise you're fucked anyway, which is probably
>> why sensible coders always make sure they send all the headers *before*
>> sending the output.
>>
>
> I've also used it when calling code which outputs directly, so I can
> parse that output. For instance, if you want to know the current
> configuration, you can buffer the output of phpinfo(INFO_CONFIGURATION),
> then parse it. It's easier to do than to figure out all of the
> configuration parameters yourself. Of course, if you only want one or
> two, then just using ini_get() would be easier.
>
> But you're right - it's always best to just send the correct headers
> first, then output your data.
>
>> Anyway, as you say, the browser is probably buffering the page,
>> especially if it's using compression, so all that buffering in php will
>> do is increase the memory footprint of the process.

What the browser does is completely unrelated to the issue at
hand--we're talking about the server side.

Setting output_buffering=4096 will indeed increase the memory footprint
of the process--by 4 KByte! That seems to be an awful lot these days. ;)

> Yes, the browser buffers the output - but PHP also buffers the output
> before sending it to the web server for efficiency.

That depends on the ini setting of output_buffering--exactly what's the
issue at hand.

> Buffering it
> yourself has no gain. And the web server will buffer the output so it
> can break it into the appropriate sized packets. Buffering it yourself
> just adds an extra layer of overhead - the PHP buffer size doesn't
> change, so you will end up with the same number of buffer fills and
> sends to the server, and the packet size doesn't change so the same
> number of packets will be sent.

What you're talking about here seems to be the usage of the ob_*() set
of functions. Indeed, using these might not be the best idea, *generally*.

--
Christoph M. Becker
Re: calling a value into another php script... [message #182711 is a reply to message #182709] Fri, 30 August 2013 23:06 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Christoph Michael Becker wrote:

> Thomas 'PointedEars' Lahn wrote:
>> Christoph Michael Becker wrote:
>>> Twayne wrote:
>>>> And while I'm at it, you can pretty much ignore Stuckle; he's more of
>>>> a troll than anything else and very, very seldom parts with any useful
>>>> information, if he actually has any.
>>>
>>> One may consider Jerry opinionated--but one should better not fall to
>>> the fallacy to consider him clueless. On the contrary, he can give
>>> valuable hints if one asks the "right" questions.
>>
>> (This concerns all, so no reply via e-mail this time.)
>>
>> Like actually recommending to *disable* output buffering on a production
>> site, when having output buffering *enabled* is *the* *proven*, simple
>> measure to make a PHP-powered site faster, thus more user-friendly.
>>
>> <news:ku1e26$5a9$3(at)dont-email(dot)me>
>>
>> vs.
>>
>> ,-[default php.ini]
>> |
>> | ; output_buffering
>> | ; Default Value: Off
>> | ; Development Value: 4096
>> | ; Production Value: 4096
>
> If one posts wrong information in this newsgroup--wouldn't it be useful
> to reply by pointing out that it is wrong?

Not if the result of that would be to be called names, regardless of how and
what the reply is. You see, *that* is the problem. With some people it
does not matter what you post and how correct you are, you are always a
troll, and always called names. There are other prominent examples for that
attitude in the Big 8, and I have them killfiled as well. It is just not
worth it.

> Of course one can simply ignore such posts; other readers may not, and
> draw the conclusion that the newsgroup is not worth reading, let alone
> asking a question or starting a discussion here.

Arguing with the silent majority already?

> BTW: I consider a production value of output_buffering=4096 a reasonable
> setting.

AOL.

> However, I wouldn't accept the mere mention in a comment in php.ini a
> proof that it increases performance.

And well you should not. However, you should accept it as a recommendation
for the mentioned environment, whatever the reasons. Because those comments
are there by default for a reason.

And as for assessing performance, you could just use your mind: What does
output buffering do? And UTSL, I have gotten the impression that you can do
that.

>> And that is just one of many examples where he is – probably out of lack
>> of *real* *PHP* *development* experience – dead wrong, while the majority
>> of his postings are nothing more than calling someone else troll.
>>
>> (Q: If he realized it was a troll, why would he not just *stop* *feeding*
>> them? A: It takes one to know one.)
>
> On the other hand, leaving trolls trolling around, might easily result
> in these trolls taking over a discussion group...

Utter nonsense. *Feeding* the troll is the way to destroy the newsgroup,
because then it will be filled with off-topic flamewars instead of on-topic
discussions, and participants will leave because even their killfile will
not help them to see the good threads (they would have to killfile the
feeders as well, and then nobody would be left). You must not have been on
Usenet for very long, for simply the record clearly proves me correct.

> Besides, calling someone a troll means to pigeon-hole them. IMO that
> seldom fits exactly--there are more colors than just black and white.

IIRC, *I* have not called anyone a troll or other names in this newsgroup,
ever. As for “IMO”, you should insert an “H” in the right place, and read
above.

>> So thanks, but no, thanks. This newsgroup is much more readable for me
>> without his postings. Should he post anything valuable, which I consider
>> highly unlikely at this point, I will be reading it in quotations.
>
> You may have read
> <news:5213b351$0$6566$9b4e6d93(at)newsspool4(dot)arcor-online(dot)net>. Jerry was
> the only one who was willing to help there--and he was able to do so.

So he knows a bit of *C* and *guessed* correctly. I suspected as much.

Anyhow, I was not going to start a discussion about Jerry. I just did not
want to let your statement go without correction.


PointedEars
--
Sometimes, what you learn is wrong. If those wrong ideas are close to the
root of the knowledge tree you build on a particular subject, pruning the
bad branches can sometimes cause the whole tree to collapse.
-- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom(at)94(dot)75(dot)214(dot)39>
Re: calling a value into another php script... [message #182713 is a reply to message #182710] Sat, 31 August 2013 00:33 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 8/30/2013 6:19 PM, Christoph Michael Becker wrote:
> Jerry Stuckle wrote:
>
>> On 8/30/2013 10:30 AM, Denis McMahon wrote:
>>> On Fri, 30 Aug 2013 08:49:14 -0400, Jerry Stuckle wrote:
>>>
>>>> On 8/30/2013 5:57 AM, Thomas 'The PointedEars Twat' Lahn wrote:
> ^^^^ IMO that's
> neither helpful nor funny.
>

Not my posting. Please learn to reply to the appropriate person when
commenting posts.

BTW - I don't think it was meant to be either helpful or funny - but it
is accurate.

>>>> > Like actually recommending to *disable* output buffering on a
>>>> > production site, when having output buffering *enabled* is *the*
>>>> > *proven*, simple measure to make a PHP-powered site faster, thus more
>>>> > user-friendly.
>>>
>>> The only benefit I've ever seen from PHP output buffering is it allows
>>> you to output a page and then change the headers at the end if for some
>>> reason you have a need to ... as long as the buffer was big enough to
>>> hold the whole page, otherwise you're fucked anyway, which is probably
>>> why sensible coders always make sure they send all the headers *before*
>>> sending the output.
>>>
>>
>> I've also used it when calling code which outputs directly, so I can
>> parse that output. For instance, if you want to know the current
>> configuration, you can buffer the output of phpinfo(INFO_CONFIGURATION),
>> then parse it. It's easier to do than to figure out all of the
>> configuration parameters yourself. Of course, if you only want one or
>> two, then just using ini_get() would be easier.
>>
>> But you're right - it's always best to just send the correct headers
>> first, then output your data.
>>
>>> Anyway, as you say, the browser is probably buffering the page,
>>> especially if it's using compression, so all that buffering in php will
>>> do is increase the memory footprint of the process.
>
> What the browser does is completely unrelated to the issue at
> hand--we're talking about the server side.
>
> Setting output_buffering=4096 will indeed increase the memory footprint
> of the process--by 4 KByte! That seems to be an awful lot these days. ;)
>

Which is completely immaterial because that's not the buffering we are
discussing.

>> Yes, the browser buffers the output - but PHP also buffers the output
>> before sending it to the web server for efficiency.
>
> That depends on the ini setting of output_buffering--exactly what's the
> issue at hand.
>

No, please read again - and understand what Pointed Head claimed. It
has absolutely nothing to do with the ini setting of output_buffering.

>> Buffering it
>> yourself has no gain. And the web server will buffer the output so it
>> can break it into the appropriate sized packets. Buffering it yourself
>> just adds an extra layer of overhead - the PHP buffer size doesn't
>> change, so you will end up with the same number of buffer fills and
>> sends to the server, and the packet size doesn't change so the same
>> number of packets will be sent.
>
> What you're talking about here seems to be the usage of the ob_*() set
> of functions. Indeed, using these might not be the best idea, *generally*.
>

Exactly - which is what Pointed Head was proposing.

Please try to understand what is being said before contradicting it.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: calling a value into another php script... [message #182714 is a reply to message #182709] Sat, 31 August 2013 00:37 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 8/30/2013 6:10 PM, Christoph Michael Becker wrote:
> Thomas 'PointedEars' Lahn wrote:
>
>> Christoph Michael Becker wrote:
>>
>>> Twayne wrote:
>>>> And while I'm at it, you can pretty much ignore Stuckle; he's more of a
>>>> troll than anything else and very, very seldom parts with any useful
>>>> information, if he actually has any.
>>>
>>> One may consider Jerry opinionated--but one should better not fall to
>>> the fallacy to consider him clueless. On the contrary, he can give
>>> valuable hints if one asks the "right" questions.
>>
>> (This concerns all, so no reply via e-mail this time.)
>>
>> Like actually recommending to *disable* output buffering on a production
>> site, when having output buffering *enabled* is *the* *proven*, simple
>> measure to make a PHP-powered site faster, thus more user-friendly.
>>
>> <news:ku1e26$5a9$3(at)dont-email(dot)me>
>>
>> vs.
>>
>> ,-[default php.ini]
>> |
>> | ; output_buffering
>> | ; Default Value: Off
>> | ; Development Value: 4096
>> | ; Production Value: 4096
>
> If one posts wrong information in this newsgroup--wouldn't it be useful
> to reply by pointing out that it is wrong? Of course one can simply
> ignore such posts; other readers may not, and draw the conclusion that
> the newsgroup is not worth reading, let alone asking a question or
> starting a discussion here.
>
> BTW: I consider a production value of output_buffering=4096 a reasonable
> setting. However, I wouldn't accept the mere mention in a comment in
> php.ini a proof that it increases performance.
>

Which has nothing to do with Pointed Head's comments.

>> And that is just one of many examples where he is – probably out of lack of
>> *real* *PHP* *development* experience – dead wrong, while the majority of
>> his postings are nothing more than calling someone else troll.
>>
>> (Q: If he realized it was a troll, why would he not just *stop* *feeding*
>> them? A: It takes one to know one.)
>
> On the other hand, leaving trolls trolling around, might easily result
> in these trolls taking over a discussion group...
>
> Besides, calling someone a troll means to pigeon-hole them. IMO that
> seldom fits exactly--there are more colors than just black and white.
>

Not in the case of a couple of trolls here. For instance, Pointed
Head's greatest contribution to this newsgroup is repeating "There is no
java script.". And TNP's only contribution is to cut down other people
or post wrong code.

>> So thanks, but no, thanks. This newsgroup is much more readable for me
>> without his postings. Should he post anything valuable, which I consider
>> highly unlikely at this point, I will be reading it in quotations.
>
> You may have read
> <news:5213b351$0$6566$9b4e6d93(at)newsspool4(dot)arcor-online(dot)net>. Jerry was
> the only one who was willing to help there--and he was able to do so.
>

That's TNP for you. He ignores me because I have caught him in too many
lies about his "professional" experience - as an Electrical Engineer and
a programmer. He has repeatedly shown no aptitude in either case. So
his only choice is to try to discredit me.

That's why he uses an alias - so people can't see his true nature. But
then trolls generally hide behind aliases.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: calling a value into another php script... [message #182715 is a reply to message #182711] Sat, 31 August 2013 00:39 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 8/30/2013 7:06 PM, Thomas 'PointedEars' Lahn wrote:
> Christoph Michael Becker wrote:
>
>>
>> If one posts wrong information in this newsgroup--wouldn't it be useful
>> to reply by pointing out that it is wrong?
>
> Not if the result of that would be to be called names, regardless of how and
> what the reply is. You see, *that* is the problem. With some people it
> does not matter what you post and how correct you are, you are always a
> troll, and always called names. There are other prominent examples for that
> attitude in the Big 8, and I have them killfiled as well. It is just not
> worth it.
>

Is that why hundreds of people in multiple Big 8 newsgroups have
killfiled you?


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: calling a value into another php script... [message #182716 is a reply to message #182708] Sat, 31 August 2013 00:41 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 8/30/2013 5:24 PM, Twayne wrote:
> On 2013-08-29 9:50 PM, The Natural Philosopher wrote:
>> On 30/08/13 01:18, Twayne wrote:
>>>
>>> And while I'm at it, you can pretty much ignore Stuckle; he's more of
>>> a troll than anything else and very, very seldom parts with any useful
>>> information, if he actually has any.
>>>
>>>
>> Wrong. You can and should completely ignore stuckle because he IS a
>> troll and never ever parts with anything useful because he never had it
>> in the first place.
>>
>>
>
> He may have had something useful to say at one time but not via any post
> I've seen here or on others sites he frequents. I do believe, actually
> know, he's a troll, and probably an old, non-current coder nowadays.
>
> I just simply seldom read any of this posts. He can be funny, too. He
> once told me he'd never again respond to anything I said, and then
> responded to several posts of mine, and the last time I poked at him, he
> said I promised never to talk to him again, which was a lie. Luckily
> he's easy to ignore; but I digress ...
>
> I've been around here long enough now to appreciate those who are truly
> helpful, even if it doesn't answer my query; I always appreciate the
> attempts.
>
> Cheers,
>
> Twayne`

One correction - I said I would never try to HELP you again. It isn't
worth the pain.

And yes, you said you were going to killfile me. But I guess your
memory is so short.

And BTW - I probably write more code in one day than you accomplish in a
week. I am very current, in multiple languages.

That's more than I can say for you.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: calling a value into another php script... [message #182717 is a reply to message #182713] Sat, 31 August 2013 00:57 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 8/30/2013 8:33 PM, Jerry Stuckle wrote:
> On 8/30/2013 6:19 PM, Christoph Michael Becker wrote:
>> Jerry Stuckle wrote:
>>
>>> On 8/30/2013 10:30 AM, Denis McMahon wrote:
>>>> On Fri, 30 Aug 2013 08:49:14 -0400, Jerry Stuckle wrote:
>>>>
>>>> > On 8/30/2013 5:57 AM, Thomas 'The PointedEars Twat' Lahn wrote:
>> ^^^^ IMO that's
>> neither helpful nor funny.
>>
>
> Not my posting. Please learn to reply to the appropriate person when
> commenting posts.
>
> BTW - I don't think it was meant to be either helpful or funny - but it
> is accurate.
>
>>>> >> Like actually recommending to *disable* output buffering on a
>>>> >> production site, when having output buffering *enabled* is *the*
>>>> >> *proven*, simple measure to make a PHP-powered site faster, thus more
>>>> >> user-friendly.
>>>>
>>>> The only benefit I've ever seen from PHP output buffering is it allows
>>>> you to output a page and then change the headers at the end if for some
>>>> reason you have a need to ... as long as the buffer was big enough to
>>>> hold the whole page, otherwise you're fucked anyway, which is probably
>>>> why sensible coders always make sure they send all the headers *before*
>>>> sending the output.
>>>>
>>>
>>> I've also used it when calling code which outputs directly, so I can
>>> parse that output. For instance, if you want to know the current
>>> configuration, you can buffer the output of phpinfo(INFO_CONFIGURATION),
>>> then parse it. It's easier to do than to figure out all of the
>>> configuration parameters yourself. Of course, if you only want one or
>>> two, then just using ini_get() would be easier.
>>>
>>> But you're right - it's always best to just send the correct headers
>>> first, then output your data.
>>>
>>>> Anyway, as you say, the browser is probably buffering the page,
>>>> especially if it's using compression, so all that buffering in php will
>>>> do is increase the memory footprint of the process.
>>
>> What the browser does is completely unrelated to the issue at
>> hand--we're talking about the server side.
>>
>> Setting output_buffering=4096 will indeed increase the memory footprint
>> of the process--by 4 KByte! That seems to be an awful lot these days. ;)
>>
>
> Which is completely immaterial because that's not the buffering we are
> discussing.
>
>>> Yes, the browser buffers the output - but PHP also buffers the output
>>> before sending it to the web server for efficiency.
>>
>> That depends on the ini setting of output_buffering--exactly what's the
>> issue at hand.
>>
>
> No, please read again - and understand what Pointed Head claimed. It
> has absolutely nothing to do with the ini setting of output_buffering.
>
>>> Buffering it
>>> yourself has no gain. And the web server will buffer the output so it
>>> can break it into the appropriate sized packets. Buffering it yourself
>>> just adds an extra layer of overhead - the PHP buffer size doesn't
>>> change, so you will end up with the same number of buffer fills and
>>> sends to the server, and the packet size doesn't change so the same
>>> number of packets will be sent.
>>
>> What you're talking about here seems to be the usage of the ob_*() set
>> of functions. Indeed, using these might not be the best idea,
>> *generally*.
>>
>
> Exactly - which is what Pointed Head was proposing.
>
> Please try to understand what is being said before contradicting it.
>

My apologies - I read back through this thread and realized you don't
have the background of the previous discussions Pointed Head is talking
about.

He has propounded that buffering in the script (generally using the
ob_xxx() calls) is more efficient than outputting the data directly.

It has nothing to do with the PHP buffering, which I agree is handled
well (like I said in my first response to him).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: calling a value into another php script... [message #182718 is a reply to message #182710] Sat, 31 August 2013 01:28 Go to previous messageGo to next message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
On Sat, 31 Aug 2013 00:19:48 +0200, Christoph Michael Becker wrote:

>>> Anyway, as you say, the browser is probably buffering the page,
>>> especially if it's using compression, so all that buffering in php
>>> will do is increase the memory footprint of the process.
>
> What the browser does is completely unrelated to the issue at
> hand--we're talking about the server side.

Yes, freudian slip, typed browser when I meant web server process, so sue
me.

And TPEL is the most anally retentive twat I have ever come across on
usenet, even if you don't find my saying so helpful. I have never seen
him make a constructive comment, I have only ever seen him criticise the
input of others.

In that respect he's worse than TNP, Twayne, Richard the stoopid and the
bigoted idiot that uses broken html on the basis it renders ok and then
whines when his overlong broken pages overflow the ability of browsers to
cope with his element nesting errors.

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
Re: calling a value into another php script... [message #182719 is a reply to message #182718] Sat, 31 August 2013 02:55 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
On 31/08/13 02:28, Denis McMahon wrote:
> On Sat, 31 Aug 2013 00:19:48 +0200, Christoph Michael Becker wrote:
>
>>>> Anyway, as you say, the browser is probably buffering the page,
>>>> especially if it's using compression, so all that buffering in php
>>>> will do is increase the memory footprint of the process.
>> What the browser does is completely unrelated to the issue at
>> hand--we're talking about the server side.
> Yes, freudian slip, typed browser when I meant web server process, so sue
> me.
>
> And TPEL is the most anally retentive twat I have ever come across on
> usenet, even if you don't find my saying so helpful. I have never seen
> him make a constructive comment, I have only ever seen him criticise the
> input of others.
>
> In that respect he's worse than TNP, Twayne, Richard the stoopid and the
> bigoted idiot that uses broken html on the basis it renders ok and then
> whines when his overlong broken pages overflow the ability of browsers to
> cope with his element nesting errors.
>
Another constructive comment....not?

--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
Re: calling a value into another php script... [message #182720 is a reply to message #182719] Sat, 31 August 2013 03:02 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 8/30/2013 10:55 PM, The Natural Philosopher wrote:
> On 31/08/13 02:28, Denis McMahon wrote:
>> On Sat, 31 Aug 2013 00:19:48 +0200, Christoph Michael Becker wrote:
>>
>>>> > Anyway, as you say, the browser is probably buffering the page,
>>>> > especially if it's using compression, so all that buffering in php
>>>> > will do is increase the memory footprint of the process.
>>> What the browser does is completely unrelated to the issue at
>>> hand--we're talking about the server side.
>> Yes, freudian slip, typed browser when I meant web server process, so sue
>> me.
>>
>> And TPEL is the most anally retentive twat I have ever come across on
>> usenet, even if you don't find my saying so helpful. I have never seen
>> him make a constructive comment, I have only ever seen him criticise the
>> input of others.
>>
>> In that respect he's worse than TNP, Twayne, Richard the stoopid and the
>> bigoted idiot that uses broken html on the basis it renders ok and then
>> whines when his overlong broken pages overflow the ability of browsers to
>> cope with his element nesting errors.
>>
> Another constructive comment....not?
>

More constructive than any you ever make.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: calling a value into another php script... [message #182722 is a reply to message #182689] Sat, 31 August 2013 11:00 Go to previous messageGo to next message
Norman Peelman is currently offline  Norman Peelman
Messages: 126
Registered: September 2010
Karma: 0
Senior Member
On 08/28/2013 09:35 PM, nag wrote:
> Hi all,
>
> I am using an index.html to execute a php prog. First I am choosing a an option from a dropdown list,
> which will connect to a mail server. If the password is correct then
it will open second html page.
> I want to call the code part into the second html page. How can it be
done?
>
> <form action=xyz.php method=POST>
> <option selected>Select from list</option>
> <option value="x23(at)xyz(dot)com">name1,code1</option>
> <option value="y13(at)xyz(dot)com">name2,code2</option>
> <option value="z33(at)xyz(dot)com">name3,code3</option>
>
>
> thank you.
>

nag,

This is a basic SESSION issue. You need to start a SESSION when the
visitor enters the index page and then use the SESSION to transfer data
to your xyz/mail server page. For this basic setup to work you need to
run everything through PHP to maintain the SESSION.

Please see: http://us3.php.net/manual/en/book.session.php

--
Norman
Registered Linux user #461062
-Have you been to www.php.net yet?-
Re: calling a value into another php script... [message #182741 is a reply to message #182711] Sun, 01 September 2013 18:10 Go to previous messageGo to next message
Christoph Michael Bec is currently offline  Christoph Michael Bec
Messages: 207
Registered: June 2013
Karma: 0
Senior Member
Thomas 'PointedEars' Lahn wrote:

> Christoph Michael Becker wrote:
>
>> If one posts wrong information in this newsgroup--wouldn't it be useful
>> to reply by pointing out that it is wrong?
>
> Not if the result of that would be to be called names, regardless of how and
> what the reply is. You see, *that* is the problem. With some people it
> does not matter what you post and how correct you are, you are always a
> troll, and always called names. There are other prominent examples for that
> attitude in the Big 8, and I have them killfiled as well. It is just not
> worth it.

Well, I see your point.

>> However, I wouldn't accept the mere mention in a comment in php.ini a
>> proof that it increases performance.
>
> And well you should not. However, you should accept it as a recommendation
> for the mentioned environment, whatever the reasons. Because those comments
> are there by default for a reason.
>
> And as for assessing performance, you could just use your mind: What does
> output buffering do? And UTSL, I have gotten the impression that you can do
> that.

Of course, buffering output in a well-sized buffer will usually increase
performance. Looking at the source, however, might take a long time, as
I *assume* that one would have to inspect the different SAPIs (and maybe
code of the respective webserver, too).

>>> And that is just one of many examples where he is – probably out of lack
>>> of *real* *PHP* *development* experience – dead wrong, while the majority
>>> of his postings are nothing more than calling someone else troll.
>>>
>>> (Q: If he realized it was a troll, why would he not just *stop* *feeding*
>>> them? A: It takes one to know one.)
>>
>> On the other hand, leaving trolls trolling around, might easily result
>> in these trolls taking over a discussion group...
>
> Utter nonsense. *Feeding* the troll is the way to destroy the newsgroup,
> because then it will be filled with off-topic flamewars instead of on-topic
> discussions, and participants will leave because even their killfile will
> not help them to see the good threads (they would have to killfile the
> feeders as well, and then nobody would be left). You must not have been on
> Usenet for very long, for simply the record clearly proves me correct.

I have to admit that I'm quite new to usenet. And of course, you're
right, that it is the usual recommendation not to feed trolls.

>> Besides, calling someone a troll means to pigeon-hole them. IMO that
>> seldom fits exactly--there are more colors than just black and white.
>
> IIRC, *I* have not called anyone a troll or other names in this newsgroup,
> ever. As for “IMO”, you should insert an “H” in the right place, and read
> above.

I didn't mean to say that you have called anyone a troll or other names;
I just made a general statement, that's true, IMHO.

BTW: In <news:4414431(dot)ocNU36q1Oe(at)PointedEars(dot)de> Thomas 'PointedEars'
Lahn wrote:

| Of course, that one person also had the intelligence not to fall
| for the resident name-calling troll that started all this nonsense.

:)

--
Christoph M. Becker
Re: calling a value into another php script... [message #182742 is a reply to message #182717] Sun, 01 September 2013 18:23 Go to previous messageGo to next message
Christoph Michael Bec is currently offline  Christoph Michael Bec
Messages: 207
Registered: June 2013
Karma: 0
Senior Member
Jerry Stuckle wrote:

> On 8/30/2013 8:33 PM, Jerry Stuckle wrote:
>>
>> Not my posting. Please learn to reply to the appropriate person when
>> commenting posts.

Indeed, you didn't post this attribution line, but it was quoted this
way in the post I was replying to.

>> BTW - I don't think it was meant to be either helpful or funny - but it
>> is accurate.

> My apologies - I read back through this thread and realized you don't
> have the background of the previous discussions Pointed Head is talking
> about.

If you're referring to older discussions (say about a year back, or
longer), indeed, I don't have the background.

> He has propounded that buffering in the script (generally using the
> ob_xxx() calls) is more efficient than outputting the data directly.
>
> It has nothing to do with the PHP buffering, which I agree is handled
> well (like I said in my first response to him).

There still seems to be a misunderstanding. In *this* thread Thomas was
referring to PHP's output_buffering, not to the ob_*() functions.

--
Christoph M. Becker
Re: calling a value into another php script... [message #182743 is a reply to message #182742] Sun, 01 September 2013 19:09 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 9/1/2013 2:23 PM, Christoph Michael Becker wrote:
> Jerry Stuckle wrote:
>
>> On 8/30/2013 8:33 PM, Jerry Stuckle wrote:
>>>
>>> Not my posting. Please learn to reply to the appropriate person when
>>> commenting posts.
>
> Indeed, you didn't post this attribution line, but it was quoted this
> way in the post I was replying to.
>
>>> BTW - I don't think it was meant to be either helpful or funny - but it
>>> is accurate.
>
>> My apologies - I read back through this thread and realized you don't
>> have the background of the previous discussions Pointed Head is talking
>> about.
>
> If you're referring to older discussions (say about a year back, or
> longer), indeed, I don't have the background.
>
>> He has propounded that buffering in the script (generally using the
>> ob_xxx() calls) is more efficient than outputting the data directly.
>>
>> It has nothing to do with the PHP buffering, which I agree is handled
>> well (like I said in my first response to him).
>
> There still seems to be a misunderstanding. In *this* thread Thomas was
> referring to PHP's output_buffering, not to the ob_*() functions.
>

No, if you were familiar with Pointed Head's previous postings, he was
referring to buffering in the script - not PHP buffering - using
ob_xxx() functions or even putting everything into a string.

He doesn't even know about PHP buffering - although he will claim to the
end of the world he wrote code that does it.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: calling a value into another php script... [message #182744 is a reply to message #182741] Sun, 01 September 2013 19:19 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 9/1/2013 2:10 PM, Christoph Michael Becker wrote:
> Thomas 'PointedEars' Lahn wrote:
>
>> Christoph Michael Becker wrote:
>>
>>> If one posts wrong information in this newsgroup--wouldn't it be useful
>>> to reply by pointing out that it is wrong?
>>
>> Not if the result of that would be to be called names, regardless of how and
>> what the reply is. You see, *that* is the problem. With some people it
>> does not matter what you post and how correct you are, you are always a
>> troll, and always called names. There are other prominent examples for that
>> attitude in the Big 8, and I have them killfiled as well. It is just not
>> worth it.
>
> Well, I see your point.
>
>>> However, I wouldn't accept the mere mention in a comment in php.ini a
>>> proof that it increases performance.
>>
>> And well you should not. However, you should accept it as a recommendation
>> for the mentioned environment, whatever the reasons. Because those comments
>> are there by default for a reason.
>>
>> And as for assessing performance, you could just use your mind: What does
>> output buffering do? And UTSL, I have gotten the impression that you can do
>> that.
>
> Of course, buffering output in a well-sized buffer will usually increase
> performance. Looking at the source, however, might take a long time, as
> I *assume* that one would have to inspect the different SAPIs (and maybe
> code of the respective webserver, too).
>

Not necessarily. If buffering is already efficient, adding another
level will generally DECREASE performance.

PHP and Apache do a good job of buffering already; adding another layer
in the script adds additional, unnecessary overhead.

>>>> And that is just one of many examples where he is – probably out of lack
>>>> of *real* *PHP* *development* experience – dead wrong, while the majority
>>>> of his postings are nothing more than calling someone else troll.
>>>>
>>>> (Q: If he realized it was a troll, why would he not just *stop* *feeding*
>>>> them? A: It takes one to know one.)
>>>
>>> On the other hand, leaving trolls trolling around, might easily result
>>> in these trolls taking over a discussion group...
>>
>> Utter nonsense. *Feeding* the troll is the way to destroy the newsgroup,
>> because then it will be filled with off-topic flamewars instead of on-topic
>> discussions, and participants will leave because even their killfile will
>> not help them to see the good threads (they would have to killfile the
>> feeders as well, and then nobody would be left). You must not have been on
>> Usenet for very long, for simply the record clearly proves me correct.
>
> I have to admit that I'm quite new to usenet. And of course, you're
> right, that it is the usual recommendation not to feed trolls.
>

I've been on it for over 30 years - in fact, before there was a usenet
and the main form of mass communications was mail lists. I still
remember when usenet started with a couple of servers. We didn't have
problems with trolls then, but about the only ones on were
government/military, universities and corporations doing business with
the military. It has changed a lot now, and the trolls generally hide
in sheeps clothing. The only way to find out is to see who actually
helps out by going through the archives.

>>> Besides, calling someone a troll means to pigeon-hole them. IMO that
>>> seldom fits exactly--there are more colors than just black and white.
>>
>> IIRC, *I* have not called anyone a troll or other names in this newsgroup,
>> ever. As for “IMO”, you should insert an “H” in the right place, and read
>> above.
>
> I didn't mean to say that you have called anyone a troll or other names;
> I just made a general statement, that's true, IMHO.
>

And then there are those who are intent on correcting other people's
language, acronyms, spelling and capitalization to whatever THAT person
deems appropriate.

> BTW: In <news:4414431(dot)ocNU36q1Oe(at)PointedEars(dot)de> Thomas 'PointedEars'
> Lahn wrote:
>
> | Of course, that one person also had the intelligence not to fall
> | for the resident name-calling troll that started all this nonsense.
>
> :)
>

And of course, the trolls always claim they are innocent and it is
someone else.

Look through the archives. See who actually helped others, and who just
complained. Make your own decisions.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: calling a value into another php script... [message #182746 is a reply to message #182711] Mon, 02 September 2013 19:13 Go to previous message
bill is currently offline  bill
Messages: 310
Registered: October 2010
Karma: 0
Senior Member
On 2013-08-30 7:06 PM, Thomas 'PointedEars' Lahn wrote:
> Christoph Michael Becker wrote:
>
>> Thomas 'PointedEars' Lahn wrote:
>>> Christoph Michael Becker wrote:
>>>> Twayne wrote:
>>>> > And while I'm at it, you can pretty much ignore Stuckle; he's more of
>>>> > a troll than anything else and very, very seldom parts with any useful
>>>> > information, if he actually has any.
....

>>
>> If one posts wrong information in this newsgroup--wouldn't it be useful
>> to reply by pointing out that it is wrong?
>
> Not if the result of that would be to be called names, regardless of how and
> what the reply is. You see, *that* is the problem. With some people it
> does not matter what you post and how correct you are, you are always a
> troll, and always called names. There are other prominent examples for that
> attitude in the Big 8, and I have them killfiled as well. It is just not
> worth it.

Absolutely; It's not very hard to simply ignore posters who goad on and
on to get a troll-type response and point it out. Most with such a loss
of respect and reputation would just move on if they weren't
appreciated. But when one begins the same types of post over and over,
well, they're bound to be labelled.
>
>> Of course one can simply ignore such posts; other readers may not, and
>> draw the conclusion that the newsgroup is not worth reading, let alone
>> asking a question or starting a discussion here.

Mmm, I don't know; most thinking people realize who the "good" and "bad"
posters are and find it easy enough to ignore them IFF there are ALSO
those who post with the right intent, respect and consideration of the
source of the questions.

....

>>>
>>> (Q: If he realized it was a troll, why would he not just *stop* *feeding*
>>> them? A: It takes one to know one.)
>>
>> On the other hand, leaving trolls trolling around, might easily result
>> in these trolls taking over a discussion group...

Which brings me to the WHY of my taking a minute or two to post. Those
who respond to any troll (or just plain miscreant) types are nearly as
bad as the perpetrator and it dissppoints me to see them lowering
themselves to that level of activity.

>
> Utter nonsense. *Feeding* the troll is the way to destroy the newsgroup,
> because then it will be filled with off-topic flamewars instead of on-topic
> discussions, and participants will leave because even their killfile will
> not help them to see the good threads (they would have to killfile the
> feeders as well, and then nobody would be left). You must not have been on
> Usenet for very long, for simply the record clearly proves me correct.

Right on. The best tool at hand, other than reporting the perp, is to
simply completely ignore him. Any response to a "troll" is "food" to
them as it encourages them to become even worse. Starve them of that
food and they not only get more hungry for it, but also to feel the lack
of any control they may have over their victims, since they end up with
no victims left. That's when they'll get distraught, so to speak, and
look elsewhere for their daily meals, regardless of the reason they do
the trolling at all.

>
>> Besides, calling someone a troll means to pigeon-hole them. IMO that
>> seldom fits exactly--there are more colors than just black and white.

Definitely agreed; Innocent people, especially newbies to Usenet or even
forums though not so much, can easily be caught up in the troll-fests.
You need to develop a tougher skin on Usenet than most other places and
learn that a useless post has no meaning and if a pattern develops, well
.... .

>
> IIRC, *I* have not called anyone a troll or other names in this newsgroup,
> ever. As for “IMO”, you should insert an “H” in the right place, and read
> above.

I don't recall you ever calling anyone a troll and even if you did, as
long as it wasn't misdirected, I wouldn't care about a passing reference
anyway.

Have you noticed; some people see the H as "honest", not "humble", and
other words too. When I offer an opinion, it's a way to separate it from
being interpreted as any kind of fact I'm trying to push on anyone -
thus, "IMO". IMHO is an acronym people just don't bother to know what it
actually means, or don't remember it accurately.

....

> Anyhow, I was not going to start a discussion about Jerry. I just did not
> want to let your statement go without correction.

More accurately, excepting actual PHP comments, you mean in your
opinion, right? :)
>
>
> PointedEars
>

Oh, if Jerry were the only one. I do a lot of work on the proffesional
newsgroups that are left, and he's not unique by any measure. It's just
the way the world works.

IMO: Let's just give him a 100% pass and be done with it.

Regards,

Twayne`
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: PHP wirdwrap()
Next Topic: str_replace & assign to a var?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Jun 05 01:56:31 GMT 2024

Total time taken to generate the page: 0.02233 seconds