php-general Digest 7 Feb 2009 10:53:34 -0000 Issue 5945

Topics (messages 287862 through 287890):

Re: Clarity needed OT
        287862 by: Frank Stanovcak
        287863 by: Daniel Brown
        287871 by: Ashley Sheridan
        287873 by: Shawn McKenzie
        287878 by: Daniel Brown
        287883 by: Phpster

Re: long echo statement performance question
        287864 by: Sancar Saran
        287865 by: Stephen

Re: Clarity needed (Really OT)
        287866 by: Nathan Rixham
        287867 by: Shawn McKenzie
        287868 by: Shawn McKenzie

Re: DB Comparisons
        287869 by: Ashley Sheridan
        287877 by: Andrew Ballard

Re: Email configuration
        287870 by: Ashley Sheridan
        287872 by: Shawn McKenzie
        287874 by: Nathan Rixham
        287875 by: Nathan Rixham
        287876 by: Nathan Rixham
        287880 by: Shawn McKenzie
        287881 by: Nathan Rixham
        287882 by: Ashley M. Kirchner

Re: PHP pop-up windows
        287879 by: Clancy

Re: Using DLL with PHP
        287884 by: Phpster

Session variables
        287885 by: Paul M Foster
        287886 by: Phpster
        287887 by: German Geek
        287888 by: Stuart
        287889 by: German Geek

move_uploaded_file() problem
        287890 by: Dušan Novaković

Administrivia:

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

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

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


----------------------------------------------------------------------
--- Begin Message ---
"Daniel Brown" <danbr...@php.net> wrote in message 
news:ab5568160902061416u10e761dal224ec7177d83e...@mail.gmail.com...
> On Fri, Feb 6, 2009 at 13:46, Frank Stanovcak <blindspot...@comcast.net> 
> wrote:
>>
>> Ok...I'm sure that somewhere in here has to be reference to the original
>> topic, and php...right?
>>
>> Frank...there is isn't there? *sigh*
>
>    Stick around.... you'll see this happens frequently.  It's
> considered a Good Thing[tm].  It maintains a level of sanity among the
> community.
>
> -- 
> </Daniel P. Brown>
> daniel.br...@parasane.net || danbr...@php.net
> http://www.parasane.net/ || http://www.pilotpig.net/
> Unadvertised dedicated server deals, too low to print - email me to find 
> out!

since when have the words 'sanity', and 'programmer' ever been used together 
outside of the setup for a joke?

Frank...still faithfully taking his pills. 



--- End Message ---
--- Begin Message ---
On Fri, Feb 6, 2009 at 17:26, Frank Stanovcak <blindspot...@comcast.net> wrote:
>
> since when have the words 'sanity', and 'programmer' ever been used together
> outside of the setup for a joke?
>
> Frank...still faithfully taking his pills.

    This guy fits in well 'round there here parts.  ;-P

-- 
</Daniel P. Brown>
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!

--- End Message ---
--- Begin Message ---
On Fri, 2009-02-06 at 13:13 -0500, tedd wrote:
> At 1:55 AM +0100 2/6/09, Jochem Maas wrote:
> >that tedd's unlimited educational resources (tutors/courses) might
> >go someway to undoing all the harm Fox News inflicts on the masses.
> 
> Or to provide clarity to those who think that Fox News is doing harm.
> 
> Alter all, the main-stream news doesn't like reporting unfavorable 
> things about their favorites celebrities, do they? Keep in mind that 
> "not paying taxes by elected officials" has not met the same 
> threshold of reporting "not knowing how to speak publicly" has made.
> 
> I would rather have all politicians stammer in their speeches and pay 
> their taxes than the other way around.
> 
> In fact, it would be nice if the politicians would get their 
> facts/words straight. For example, the "Speaker of the House" just 
> announced that "Last month over 500 million people lost their jobs" 
> in her support for the importance of rushing the approval of the 
> "Stimulus package" (whatever that is).
> 
> In any event, it's interesting to realize that accordingly to her, 
> EVERYONE in the USA lost their job last month and two thirds of the 
> population lost it twice!
> 
> It would be nice if the "Speaker of the House" at least realized how 
> many people actually live in the country she represents. BUT -- you 
> didn't hear that on the main-stream news -- or -- if you did, they 
> didn't make much of it, right? However, if Bush had said it, that 
> would have been something different -- it would be headline news and 
> on Saturday Night Live.
> 
> Clearly, there is a difference in news reporting today. There are no 
> impartial sources -- everything has biases and spin. The days of 
> Walter Cronkite reporting are over.
> 
> Viva opposing opinions.
> 
> Cheers,
> 
> tedd
> 
> -- 
> -------
> http://sperling.com  http://ancientstones.com  http://earthstones.com
> 
Come off it. Look around you, there are government conspiracies
everywhere. I shouldn't even be saying this, their silent black
helicopters are already after me... I can hear them now...


Ash
www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
Ashley Sheridan wrote:
> On Fri, 2009-02-06 at 13:13 -0500, tedd wrote:
>> At 1:55 AM +0100 2/6/09, Jochem Maas wrote:
>>> that tedd's unlimited educational resources (tutors/courses) might
>>> go someway to undoing all the harm Fox News inflicts on the masses.
>> Or to provide clarity to those who think that Fox News is doing harm.
>>
>> Alter all, the main-stream news doesn't like reporting unfavorable 
>> things about their favorites celebrities, do they? Keep in mind that 
>> "not paying taxes by elected officials" has not met the same 
>> threshold of reporting "not knowing how to speak publicly" has made.
>>
>> I would rather have all politicians stammer in their speeches and pay 
>> their taxes than the other way around.
>>
>> In fact, it would be nice if the politicians would get their 
>> facts/words straight. For example, the "Speaker of the House" just 
>> announced that "Last month over 500 million people lost their jobs" 
>> in her support for the importance of rushing the approval of the 
>> "Stimulus package" (whatever that is).
>>
>> In any event, it's interesting to realize that accordingly to her, 
>> EVERYONE in the USA lost their job last month and two thirds of the 
>> population lost it twice!
>>
>> It would be nice if the "Speaker of the House" at least realized how 
>> many people actually live in the country she represents. BUT -- you 
>> didn't hear that on the main-stream news -- or -- if you did, they 
>> didn't make much of it, right? However, if Bush had said it, that 
>> would have been something different -- it would be headline news and 
>> on Saturday Night Live.
>>
>> Clearly, there is a difference in news reporting today. There are no 
>> impartial sources -- everything has biases and spin. The days of 
>> Walter Cronkite reporting are over.
>>
>> Viva opposing opinions.
>>
>> Cheers,
>>
>> tedd
>>
>> -- 
>> -------
>> http://sperling.com  http://ancientstones.com  http://earthstones.com
>>
> Come off it. Look around you, there are government conspiracies
> everywhere. I shouldn't even be saying this, their silent black
> helicopters are already after me... I can hear them now...
> 
> 
> Ash
> www.ashleysheridan.co.uk
> 
What happened to your tin foil hat?

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
On Fri, Feb 6, 2009 at 19:36, Shawn McKenzie <nos...@mckenzies.net> wrote:
>>
> What happened to your tin foil hat?

    Who needs that when your fillings pick up the live and encrypted
radio broadcast of the CIA cafeteria lunch schedule?

-- 
</Daniel P. Brown>
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!

--- End Message ---
--- Begin Message --- And the pentagon was not hit by a jumbo jet. check the photos and ask yourself 'where are the wings'?

Sorry couldn't resist after the conspiracy comment

:-P

Bastien

Sent from my iPod

On Feb 6, 2009, at 19:37, Ashley Sheridan <a...@ashleysheridan.co.uk> wrote:

On Fri, 2009-02-06 at 13:13 -0500, tedd wrote:
At 1:55 AM +0100 2/6/09, Jochem Maas wrote:
that tedd's unlimited educational resources (tutors/courses) might
go someway to undoing all the harm Fox News inflicts on the masses.

Or to provide clarity to those who think that Fox News is doing harm.

Alter all, the main-stream news doesn't like reporting unfavorable
things about their favorites celebrities, do they? Keep in mind that
"not paying taxes by elected officials" has not met the same
threshold of reporting "not knowing how to speak publicly" has made.

I would rather have all politicians stammer in their speeches and pay
their taxes than the other way around.

In fact, it would be nice if the politicians would get their
facts/words straight. For example, the "Speaker of the House" just
announced that "Last month over 500 million people lost their jobs"
in her support for the importance of rushing the approval of the
"Stimulus package" (whatever that is).

In any event, it's interesting to realize that accordingly to her,
EVERYONE in the USA lost their job last month and two thirds of the
population lost it twice!

It would be nice if the "Speaker of the House" at least realized how
many people actually live in the country she represents. BUT -- you
didn't hear that on the main-stream news -- or -- if you did, they
didn't make much of it, right? However, if Bush had said it, that
would have been something different -- it would be headline news and
on Saturday Night Live.

Clearly, there is a difference in news reporting today. There are no
impartial sources -- everything has biases and spin. The days of
Walter Cronkite reporting are over.

Viva opposing opinions.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

Come off it. Look around you, there are government conspiracies
everywhere. I shouldn't even be saying this, their silent black
helicopters are already after me... I can hear them now...


Ash
www.ashleysheridan.co.uk


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


--- End Message ---
--- Begin Message ---
On Friday 06 February 2009 19:12:08 Frank Stanovcak wrote:
> I'm in the process of seperating logic from display in a section of code,
> and wanted to make sure I wasn't treading on a performance landmine here,
> so I ask you wizened masters of the dark arts this...
>
> is there a serious performance hit, or reason not to use long, ie more than
> 30 - 40 lines, comma conjoined echo statments...
>
> echo 'blah', $var, 'blah', $var2,...ad nauseum
>
> ... to output mixed html and php var values?  If so could you refer me to a
> work around, or better way?
>
> Frank

Seperate logic.

Not the template.

<?=$variable?> was good for templating. With opcode cache all your template 
was cached.

And of course you should not use write functions in templates.

and if you really want to do this with

echo  yada yada I suggest this one.

$output = '';


do someting remove echo  and put $output.

and end of the script

do echo $output.

This was the best way. Of course you can use output buffering. 



--- End Message ---
--- Begin Message ---
I have been reading this thread with interest ... and amusement.

FWII for my web sites I have

1) Most PHP code in files outside of the document root
2) Site specific variables (constants, really) in an include.php file
3) All HTML is also in this include file and is the content a variable.
4) Nested in the HTML code are variables for the content, like the menu and body text
5) All presentation is done using CSS
6) Each page just has PHP code (mostly function calls) where the content variables are built
7) Finally the content variable is echoed.

Stephen

--- End Message ---
--- Begin Message ---
tedd wrote:
At 7:35 PM +0100 2/6/09, Jochem Maas wrote:

Socialist Doctrine?

"the community orm"?


Here's a group of people under treat of "loss of life" tell their government that everyone is created equal and you say that what they said is a Socialist Doctrine? A doctrine that came into being some 140 years later?


and required a tonne of xml to set-up?

Look, you are a gifted programmer and I learn a lot from you, but this goes to prove that often we are gifted in only a limited number of subjects.


he is ! and his surname sounds like a technology
"Wanted Senior MAAS Developer, London £35k"

As Will Rogers once said, "We're all ignorant, only in different subjects." I say "We're all gifted, but not in everything."


"we'll never be gifted at everything but it won't stop us trying and pretending we are to clients"
- the developers motto

Cheers,

Regards,

tedd


nath

--- End Message ---
--- Begin Message ---
Nathan Rixham wrote:
> tedd wrote:
>> At 7:35 PM +0100 2/6/09, Jochem Maas wrote:
>>
>> Socialist Doctrine?
> 
> "the community orm"?
> 
>>
>> Here's a group of people under treat of "loss of life" tell their
>> government that everyone is created equal and you say that what they
>> said is a Socialist Doctrine? A doctrine that came into being some 140
>> years later?
>>
> 
> and required a tonne of xml to set-up?
> 
>> Look, you are a gifted programmer and I learn a lot from you, but this
>> goes to prove that often we are gifted in only a limited number of
>> subjects.
>>
> 
> he is ! and his surname sounds like a technology
> "Wanted Senior MAAS Developer, London £35k"
> 
>> As Will Rogers once said, "We're all ignorant, only in different
>> subjects." I say "We're all gifted, but not in everything."
>>
> 
> "we'll never be gifted at everything but it won't stop us trying and
> pretending we are to clients"
> - the developers motto
> 
>> Cheers,
>>
> Regards,
> 
>> tedd
>>
> 
> nath

+5 Funny

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
Nathan Rixham wrote:
> tedd wrote:
>> At 7:35 PM +0100 2/6/09, Jochem Maas wrote:
>>
>> Socialist Doctrine?
> 
> "the community orm"?
> 
>>
>> Here's a group of people under treat of "loss of life" tell their
>> government that everyone is created equal and you say that what they
>> said is a Socialist Doctrine? A doctrine that came into being some 140
>> years later?
>>
> 
> and required a tonne of xml to set-up?
> 
>> Look, you are a gifted programmer and I learn a lot from you, but this
>> goes to prove that often we are gifted in only a limited number of
>> subjects.
>>
> 
> he is ! and his surname sounds like a technology
> "Wanted Senior MAAS Developer, London £35k"
> 
>> As Will Rogers once said, "We're all ignorant, only in different
>> subjects." I say "We're all gifted, but not in everything."
>>
> 
> "we'll never be gifted at everything but it won't stop us trying and
> pretending we are to clients"
> - the developers motto
> 
>> Cheers,
>>
> Regards,
> 
>> tedd
>>
> 
> nath

+5 Funny

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
On Fri, 2009-02-06 at 21:56 +1000, Murray wrote:
> In fact, ASP.NET happily connects with other DBMSes. I have several C#
> ASP.NET web apps happily working with MySQL.
> 
> M is for Murray
> 
> 
> On Fri, Feb 6, 2009 at 7:39 AM, Ashley Sheridan 
> <a...@ashleysheridan.co.uk>wrote:
> 
> > although I think ASP can only connect to MSSQL and
> > ASP.Net connects only to MSSQL and Oracle (but I'm not 100% certain on
> > this)
> >
C# is bad, and will get you sent to hell... I asked M$, and they
adamantly refused to answer... so draw your own conclusions...


Ash
www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
On Fri, Feb 6, 2009 at 7:27 PM, Ashley Sheridan
<a...@ashleysheridan.co.uk> wrote:
> On Fri, 2009-02-06 at 21:56 +1000, Murray wrote:
>> In fact, ASP.NET happily connects with other DBMSes. I have several C#
>> ASP.NET web apps happily working with MySQL.
>>
>> M is for Murray
>>
>>
>> On Fri, Feb 6, 2009 at 7:39 AM, Ashley Sheridan 
>> <a...@ashleysheridan.co.uk>wrote:
>>
>> > although I think ASP can only connect to MSSQL and
>> > ASP.Net connects only to MSSQL and Oracle (but I'm not 100% certain on
>> > this)
>> >
> C# is bad, and will get you sent to hell... I asked M$, and they
> adamantly refused to answer... so draw your own conclusions...
>
>
> Ash
> www.ashleysheridan.co.uk

I suspect either would be able to connect to MySQL as long as you had
the MySQL ODBC driver installed. I don't know if there are other
drivers or not. I never needed to connect to MySQL when I was using
anything other than PHP.

Andrew

--- End Message ---
--- Begin Message ---
On Fri, 2009-02-06 at 16:30 +0200, Thodoris wrote:
> > 2009/2/6 Thodoris <t...@kinetix.gr>:
> >   
> >> 2009/2/5 Thodoris <t...@kinetix.gr>:
> >>
> >>
> >> I think that the OP mentioned the word fedora somewhere above...
> >>
> >>
> >>
> >> Oh sorry, I'm so stupid... Anyways, if you want to send mail to large
> >> providers you'll need to use a relay. I found a nice tutorial about
> >> how to set it up with google apps.
> >> It was for Ubuntu but you just have to install msmtp and follow the other
> >> steps.
> >> Here it is: http://nanotux.com/blog/the-ultimate-server/4/#l-mail
> >> I did it on my little gentoo server here at home and it works great.
> >>
> >>
> >>
> >>
> >>
> >> Well if I am not getting what you say in the wrong way I should say that 
> >> you
> >> don't need to use a relay because you don't need a 
> mail server at all.
> >> The point is that PHP can send mail with the mail() function using a local
> >> mail client like sendmail's client part or something coded in pure PHP.
> >>
> >> Keep in mind that you don't need to have a mail server in your PC in order
> >> to send mail. Similarly PHP doesn't need to have a local mail server in
> >> order to send mail.
> >>
> >> So you don't need extra mail configuration assuming of course that you 
> >> don't
> >> need to do something extreme. You just use mail() and the mail gets sent.
> >>
> >> --
> >> Thodoris
> >>     
> >
> >
> > Of course he can send mails this way, but they won't be accepted by
> > many mail providers because of their anti-spam measurments.
> > They bounce mails that come from dynamic ip ranges like his home
> > server. I just wanted to help him avoid this because you won't see the
> > reason until you look at the syslog.
> >
> >
> >
> >   
>  
> I am sorry didn't get right what you meant after all.
> 
> In that case a simple mail() won't do.
> 
I've never had an email bounced because of where it came from based on
IP. I have had emails bounced based on the email headers that were sent.
Always check the headers first. Even MessageLabs won't block an email
based on the IP.


Ash
www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
Ashley Sheridan wrote:
> On Fri, 2009-02-06 at 16:30 +0200, Thodoris wrote:
>>> 2009/2/6 Thodoris <t...@kinetix.gr>:
>>>   
>>>> 2009/2/5 Thodoris <t...@kinetix.gr>:
>>>>
>>>>
>>>> I think that the OP mentioned the word fedora somewhere above...
>>>>
>>>>
>>>>
>>>> Oh sorry, I'm so stupid... Anyways, if you want to send mail to large
>>>> providers you'll need to use a relay. I found a nice tutorial about
>>>> how to set it up with google apps.
>>>> It was for Ubuntu but you just have to install msmtp and follow the other
>>>> steps.
>>>> Here it is: http://nanotux.com/blog/the-ultimate-server/4/#l-mail
>>>> I did it on my little gentoo server here at home and it works great.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Well if I am not getting what you say in the wrong way I should say that 
>>>> you
>>>> don't need to use a relay because you don't need a 
>> mail server at all.
>>>> The point is that PHP can send mail with the mail() function using a local
>>>> mail client like sendmail's client part or something coded in pure PHP.
>>>>
>>>> Keep in mind that you don't need to have a mail server in your PC in order
>>>> to send mail. Similarly PHP doesn't need to have a local mail server in
>>>> order to send mail.
>>>>
>>>> So you don't need extra mail configuration assuming of course that you 
>>>> don't
>>>> need to do something extreme. You just use mail() and the mail gets sent.
>>>>
>>>> --
>>>> Thodoris
>>>>     
>>>
>>> Of course he can send mails this way, but they won't be accepted by
>>> many mail providers because of their anti-spam measurments.
>>> They bounce mails that come from dynamic ip ranges like his home
>>> server. I just wanted to help him avoid this because you won't see the
>>> reason until you look at the syslog.
>>>
>>>
>>>
>>>   
>>  
>> I am sorry didn't get right what you meant after all.
>>
>> In that case a simple mail() won't do.
>>
> I've never had an email bounced because of where it came from based on
> IP. I have had emails bounced based on the email headers that were sent.
> Always check the headers first. Even MessageLabs won't block an email
> based on the IP.
> 
> 
> Ash
> www.ashleysheridan.co.uk
> 
> 
Ever heard of RBL or DNSBL?  I use it on my email server and so do many
others.  It checks the IP of the sending host against a list or set of
lists that contain addresses such as, known spammers, known open relays,
 blocks of IPs that are dynamic (used by ISPs for home customers), etc.
 If the sender is found in the list, the receiver terminates the
connection and doesn't even accept the email.

It's actually very slick.  I use the list at spamhaus.org.

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
Ashley Sheridan wrote:
I've never had an email bounced because of where it came from based on
IP. I have had emails bounced based on the email headers that were sent.
Always check the headers first. Even MessageLabs won't block an email
based on the IP.


ash:
http://en.wikipedia.org/wiki/DNSBL
that's what RBL is, stopping email because of the IP it was sent from

if you've never had it then you can't be a spammer :D *hoorah*

--- End Message ---
--- Begin Message ---
Ashley Sheridan wrote:
I've never had an email bounced because of where it came from based on
IP. I have had emails bounced based on the email headers that were sent.
Always check the headers first. Even MessageLabs won't block an email
based on the IP.


ash:
http://en.wikipedia.org/wiki/DNSBL
that's what RBL is, stopping email because of the IP it was sent from

if you've never had it then you can't be a spammer :D *hoorah*

--- End Message ---
--- Begin Message ---
Shawn McKenzie wrote:
Ever heard of RBL or DNSBL?  I use it on my email server and so do many

lol snap, just sent same message at same time - tis so easy to jump on ash's back cos he's always so sure he's right lolol
--- End Message ---
--- Begin Message ---
Nathan Rixham wrote:
> Shawn McKenzie wrote:
>> Ever heard of RBL or DNSBL?  I use it on my email server and so do many
> 
> lol snap, just sent same message at same time - tis so easy to jump on
> ash's back cos he's always so sure he's right lolol

Hmmm...  So Ashley is a "him"?

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
Shawn McKenzie wrote:
Nathan Rixham wrote:
Shawn McKenzie wrote:
Ever heard of RBL or DNSBL?  I use it on my email server and so do many
lol snap, just sent same message at same time - tis so easy to jump on
ash's back cos he's always so sure he's right lolol

Hmmm...  So Ashley is a "him"?


yeah quot:
"Actually I'm a guy, but we can't all be perfect ;)"
http://www.mail-archive.com/php-gene...@lists.php.net/msg235765.html

dunno why I insist on winding him up either, he's pretty sound lol

--- End Message ---
--- Begin Message ---
Nathan Rixham wrote:
Hmmm...  So Ashley is a "him"?


yeah quot:
"Actually I'm a guy, but we can't all be perfect ;)"
http://www.mail-archive.com/php-gene...@lists.php.net/msg235765.html
Wouldn't be the first Ashley who's a guy. I happen to be one of those too ...
--- End Message ---
--- Begin Message ---
On Thu, 05 Feb 2009 01:47:28 +0000, nrix...@gmail.com (Nathan Rixham) wrote:

>Clancy wrote:
>> I'm working on a website editor, primarily for my own use. Normally it will 
>> be used on my
>> own computer, and much of what I wish to achieve could arguably be better 
>> done in either C
>> or JavaScript, but both of these have a similar programming syntax to PHP, 
>> but with subtle
>> differences, and I don't think my brain could cope with trying to work in 
>> two similar but
>> different languages simultaneously.
...........

>> Is this a feasible mode of operation, and if so would anyone like to suggest 
>> ways to
>> implement it, and/or traps to be avoided?
>
>if ever somebody needed flex, it's you

Thanks. But what is flex?

1. Flex electrical cable: I've got plenty of that out in the shed, but it 
doesn't seem to
be relevant here (unless I decide that it is all too much, and decide to hang 
myself with
it!)

2. Single tasking operating system for the Motorola 6800: I once programmed in 
6800
assembler, but I rather doubt if you can buy it, or them, these days.

3. Bodybuilding magazine: too late for that!

4. Adobe application builder - widely criticised for being inflexible: not what 
I'm
looking for.

Perhaps I ought to just give up, and get somebody else to do the job for me, 
but then I
would get the solution to somebody else's problem.  

Also, although my mental agility is less than it used to be, so that I can't 
really handle
working in multiple environments, I still enjoy programming, and it does keep 
my brain
from going rusty!

I have had what seems to me to be a bright idea, and I wondered if anybody had 
tried
anything similar, and could cast any light either on how to go about it, or on 
problems
that I might encounter. 

Just telling me to use something else, without explaining what it is or why it 
is better,
is not really being helpful.

--- End Message ---
--- Begin Message ---
Check out the com [www.php.net/com] functionality

Bastien

Sent from my iPod

On Feb 6, 2009, at 15:58, Dan Shirah <mrsqua...@gmail.com> wrote:

Howdy,

I'm looking for a little guidance here.

I'm trying to re-write a VB function in PHP.

This is the function I'm working with:


Private Declare Function DTM_CONVDMSToMultiTIFF Lib "D32_CONV.DLL" _

(ByVal FullPathFrom As String, ByVal FullPathTo As String) As
Integer

Naturally I would start off with function() from PHP as well and I will
also already have my two variables that I need to pass to the DLL:

$FullPathFrom = "this\is\my\path";
$FullPathTo = "this\is\my\path";

function DTM_CONVDMSToMultiTIFF ( )

But I am unsure of how I would call and pass the variables to the DLL. I've
looked into W32api, but not sure if that's even what I need.

Any ideas?

Thanks,
Dan

--- End Message ---
--- Begin Message ---
I'm not too clear on HTTP headers, cookies, and such. So here are
questions related to that. Let's say I generate a random number that I
want the user to enter in a form. When I generate the number, I store it
in a session variable ($_SESSION). When the user submits the form, I
check the number they enter with what I've stored in the session
variable.

Since this session variable survives across page loads (assuming
session_start() is appropriately called), how is it stored and recalled?

Is it automatically stored as a cookie on the user's system? 

Or is it stored on the server? 

And how does a server "get" a cookie? 

Is it a separate request made by the server to the client? 

If the value I've asked the user for is *not* stored as a cookie, then
is it passed as part of the HTTP submission or what?

Thanks for any enlightenment on this.

Paul
-- 
Paul M. Foster

--- End Message ---
--- Begin Message --- A Session is stored on the user browser in a session ( in memory cookie) and on the server as a file. The session mgmt tools will read the file as needed.

Bastien

Sent from my iPod

On Feb 7, 2009, at 1:58, Paul M Foster <pa...@quillandmouse.com> wrote:

I'm not too clear on HTTP headers, cookies, and such. So here are
questions related to that. Let's say I generate a random number that I
want the user to enter in a form. When I generate the number, I store it
in a session variable ($_SESSION). When the user submits the form, I
check the number they enter with what I've stored in the session
variable.

Since this session variable survives across page loads (assuming
session_start() is appropriately called), how is it stored and recalled?

Is it automatically stored as a cookie on the user's system?

Or is it stored on the server?

And how does a server "get" a cookie?

Is it a separate request made by the server to the client?

If the value I've asked the user for is *not* stored as a cookie, then
is it passed as part of the HTTP submission or what?

Thanks for any enlightenment on this.

Paul
--
Paul M. Foster

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


--- End Message ---
--- Begin Message ---
The session data is stored on the server. In the user's browser, only a
session cookie is stored, usually a random session id string. I could never
retrieve the session variables with any browser tools, always only with PHP
by echoing them out or something. Also, a cookie is simply a text file with
a maximum of 4096 characters on the user's browser, not enough to store big
session variables with big objects. So, the user's browser just stores a
cookie with the session id, so that the server knows which user to map to
which session variables. The session variables (in PHP) are stored in the
temporary directory on the server in a text file (flattened or serialized),
where the server can retrieve them across requests. This is important for
security reasons. You might not want the user to be able to view certain
variables in their browser otherwise they could change them and cause some
damage, e.g. imagine a user has a permission level between 1 and 10 and 1 is
the super user. You can store this level in a session variable, and the user
cannot change it. If they could, it would be a disaster! Also, if one could
store more than 4096 characters, it would be relatively easy to write out
some session variables in order to flood the browser memory and make it
crash or even worse.

Oh, and the Cookies, as far as i know, are always sent in the http headers.
They are stored on both client and server and can be set on both sides, with
javascript or server side code (php). So they can only be checked in every
request by the server side code, and while javascript is being executed on
the client.

Please correct me if I'm wrong because I would need to review a lot of code
in which it is assumed that session variables are NOT stored on the user's
machine.


Makes sense?

Regards,
Tim

Tim-Hinnerk Heuer

http://www.ihostnz.com


On Sat, Feb 7, 2009 at 8:11 PM, Phpster <phps...@gmail.com> wrote:

> A Session is stored on the user browser in a session ( in memory cookie)
> and on the server as a file. The session mgmt tools will read the file as
> needed.
>
> Bastien
>
> Sent from my iPod
>
>
> On Feb 7, 2009, at 1:58, Paul M Foster <pa...@quillandmouse.com> wrote:
>
>  I'm not too clear on HTTP headers, cookies, and such. So here are
>> questions related to that. Let's say I generate a random number that I
>> want the user to enter in a form. When I generate the number, I store it
>> in a session variable ($_SESSION). When the user submits the form, I
>> check the number they enter with what I've stored in the session
>> variable.
>>
>> Since this session variable survives across page loads (assuming
>> session_start() is appropriately called), how is it stored and recalled?
>>
>> Is it automatically stored as a cookie on the user's system?
>>
>> Or is it stored on the server?
>>
>> And how does a server "get" a cookie?
>>
>> Is it a separate request made by the server to the client?
>>
>> If the value I've asked the user for is *not* stored as a cookie, then
>> is it passed as part of the HTTP submission or what?
>>
>> Thanks for any enlightenment on this.
>>
>> Paul
>> --
>> Paul M. Foster
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
2009/2/7 Paul M Foster <pa...@quillandmouse.com>:
> I'm not too clear on HTTP headers, cookies, and such. So here are
> questions related to that. Let's say I generate a random number that I
> want the user to enter in a form. When I generate the number, I store it
> in a session variable ($_SESSION). When the user submits the form, I
> check the number they enter with what I've stored in the session
> variable.
>
> Since this session variable survives across page loads (assuming
> session_start() is appropriately called), how is it stored and recalled?
>
> Is it automatically stored as a cookie on the user's system?
>
> Or is it stored on the server?
>
> And how does a server "get" a cookie?
>
> Is it a separate request made by the server to the client?
>
> If the value I've asked the user for is *not* stored as a cookie, then
> is it passed as part of the HTTP submission or what?
>
> Thanks for any enlightenment on this.

Session data is stored on the server and tied to a browser using a
cookie. The cookie contains a random string which uniquely identifies
a session on the server. The session_start() function handles all the
details of setting and maintaining that cookie and managing the
server-side data.

Cookies are transferred between client and server with every request
in the headers. If you don't have Firefox getfirefox.com. The google
for the livehttpheaders addon and install that. Turn it on and browse
your site. You will see the cookies in the headers of both requests
and responses. Cookies are not stored on the server side, they are
sent by the client with each request.

No additional HTTP requests are involved when using sessions.

-Stuart

-- 
http://stut.net/

--- End Message ---
--- Begin Message ---
Yeah i guess the cookie doesn't need to be stored on the server since it's
in the header anyway.

Thanks for clearing that up.

Tim-Hinnerk Heuer

http://www.ihostnz.com
Charles M. Schulz  - "I love mankind; it's people I can't stand."

2009/2/7 Stuart <stut...@gmail.com>

> 2009/2/7 Paul M Foster <pa...@quillandmouse.com>:
> > I'm not too clear on HTTP headers, cookies, and such. So here are
> > questions related to that. Let's say I generate a random number that I
> > want the user to enter in a form. When I generate the number, I store it
> > in a session variable ($_SESSION). When the user submits the form, I
> > check the number they enter with what I've stored in the session
> > variable.
> >
> > Since this session variable survives across page loads (assuming
> > session_start() is appropriately called), how is it stored and recalled?
> >
> > Is it automatically stored as a cookie on the user's system?
> >
> > Or is it stored on the server?
> >
> > And how does a server "get" a cookie?
> >
> > Is it a separate request made by the server to the client?
> >
> > If the value I've asked the user for is *not* stored as a cookie, then
> > is it passed as part of the HTTP submission or what?
> >
> > Thanks for any enlightenment on this.
>
> Session data is stored on the server and tied to a browser using a
> cookie. The cookie contains a random string which uniquely identifies
> a session on the server. The session_start() function handles all the
> details of setting and maintaining that cookie and managing the
> server-side data.
>
> Cookies are transferred between client and server with every request
> in the headers. If you don't have Firefox getfirefox.com. The google
> for the livehttpheaders addon and install that. Turn it on and browse
> your site. You will see the cookies in the headers of both requests
> and responses. Cookies are not stored on the server side, they are
> sent by the client with each request.
>
> No additional HTTP requests are involved when using sessions.
>
> -Stuart
>
> --
> http://stut.net/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Hi,

I'm having problem with function move_uploaded_file() under Linux
(Slackware 12.2). It  simply want execute only that function in php
file. So maybe I should add something to http.config file or .... ? I
tried to execute that php file under Windows and it's working just
fine (I've copied whole project to xampp's htdocs folder and run it
normally).

And also I have question, does anyone knows how to configure apache
(also under same Linux) so that in future I wouldn't have to write
<?php but only <? every time I start php code?

Thnx, Dusan

-- 
made by Dusan

--- End Message ---

Reply via email to