php-windows Digest 2 Jan 2002 08:29:33 -0000 Issue 932
Topics (messages 11255 through 11265):
500 Internal Server Error
11255 by: Chris Burwell
11258 by: Chris Burwell
Cookies
11256 by: Chris Burwell
Re: Passing by reference...
11257 by: Ignatius Teo
11260 by: Pac mon
11261 by: Ignatius Teo
11262 by: Pac mon
11263 by: Michael Sims
11264 by: Michael Sims
Re: MySQL problems...
11259 by: Pac mon
problem login as root
11265 by: Albert Leonardo
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
I am running apache 1.3.X, MySQL 3.23.47, and PHP 4.1.0 on windows XP pro. I
have a user login script that compare the information the user enters into
the forms with the information in our database. After the user enters the
correct information a session should be started. My question is when my
script gets to the part where the session functions are I get two messages.
The first is a box that pops-up saying "php.exe has encountered a problem
and needs to close.". After I close that window I get an internal server
error page in my browser.
Does anyone have any idea why this might be happening. I have only
experienced this problem now (when I started using sessions).
--- End Message ---
--- Begin Message ---
I fixed this problem. I don't remember how, but none the less it's fixed.
Now i am encountering another problem. It seems session vars do not retain
their values once you leave the page that registers them. I have found
several entries in the bug database about this. My question is does anyone
else encounter this problem, and has anyone solved this problem. Also, does
anyone know if this problem is going to be addressed in future releases of
PHP?
"Chris Burwell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am running apache 1.3.X, MySQL 3.23.47, and PHP 4.1.0 on windows XP pro.
I
> have a user login script that compare the information the user enters into
> the forms with the information in our database. After the user enters the
> correct information a session should be started. My question is when my
> script gets to the part where the session functions are I get two
messages.
> The first is a box that pops-up saying "php.exe has encountered a problem
> and needs to close.". After I close that window I get an internal server
> error page in my browser.
> Does anyone have any idea why this might be happening. I have only
> experienced this problem now (when I started using sessions).
>
>
--- End Message ---
--- Begin Message ---
I have a user authentication script that compares the information the user
enters t the information that is in a database table. When the user enter
the correct information (Username and password) Two cookies are set one for
the username and one for the password. My problem is when the user is
redirscted to the index page (Which should print out the values of the two
cookies) the cookies seem to be empty.
I have tryed printing $cookiename and $HTTP_COOKIE_VARS[cookiename]. Neither
work. Has anyone else had this problem?
--- End Message ---
--- Begin Message ---
Isn't passing by reference a "no-no" is terms of good programming? At least
that's what I was told when I studied programming about 12 years ago?
Ignatius
----- Original Message -----
From: "Anthony Ritter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 01, 2002 2:40 PM
Subject: Re: [PHP-WIN] Passing by reference...
> Michael Sims wrote in message:
> > Yes, that is true. The "tax" function has the ampersand in the argument
> > list, which means that any variable that you send to it gets passed by
> > reference. This means that any changes to that variable that occur
inside
> > the function will actually affect the same variable that is in the scope
> of
> > the main script. Without the ampersand, the function will only modify
> it's
> > own local copy of the variable and leave the one in the main script
> > unaltered. If you remove the ampersand from the above script and re-run
> > it, then the output of the first echo statement should not change, but
the
> > second one will change to 2500 since the function will no longer be
> > altering the variable in the main script.
> >
> > http://www.php.net/manual/en/language.references.pass.php
> >
> > Sorry if I'm not understanding your question...
> ....................................
>
> Thanks for the reply Michael. You've answered my question.
>
> A happy and healthy new year to you and yours.
> Tony Ritter
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--- End Message ---
--- Begin Message ---
Some teachers will say this just because they think students are dumb. The
reasoning behind it is that 'if we teach them to pass by reference some
other dumb programmer can accidentally change values around and break
stuff!' Simpletons!
>
>Isn't passing by reference a "no-no" is terms of good programming? At least
>that's what I was told when I studied programming about 12 years ago?
>
>Ignatius
>
>
>
>----- Original Message -----
>From: "Anthony Ritter" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Tuesday, January 01, 2002 2:40 PM
>Subject: Re: [PHP-WIN] Passing by reference...
>
>
> > Michael Sims wrote in message:
> > > Yes, that is true. The "tax" function has the ampersand in the
>argument
> > > list, which means that any variable that you send to it gets passed by
> > > reference. This means that any changes to that variable that occur
>inside
> > > the function will actually affect the same variable that is in the
>scope
> > of
> > > the main script. Without the ampersand, the function will only modify
> > it's
> > > own local copy of the variable and leave the one in the main script
> > > unaltered. If you remove the ampersand from the above script and
>re-run
> > > it, then the output of the first echo statement should not change, but
>the
> > > second one will change to 2500 since the function will no longer be
> > > altering the variable in the main script.
> > >
> > > http://www.php.net/manual/en/language.references.pass.php
> > >
> > > Sorry if I'm not understanding your question...
> > ....................................
> >
> > Thanks for the reply Michael. You've answered my question.
> >
> > A happy and healthy new year to you and yours.
> > Tony Ritter
> >
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
--- End Message ---
--- Begin Message ---
One of the fundamental rules of blackbox programming is that a function
should never change the value of a global variable. And there are very
compelling reasons why this rule exists.
I'm simply suggesting that "passing by reference" as a programming
"technique" breaks this fundamental rule.....although I am not suggesting
that passing by reference is in itself a "bad thing"....perhaps a necessary
evil.
All I'm saying is ....have the "rules" changed since I left Uni?
Ignatius
----- Original Message -----
From: "Pac mon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 02, 2002 2:30 PM
Subject: Re: Fw: [PHP-WIN] Passing by reference...
> Some teachers will say this just because they think students are dumb. The
> reasoning behind it is that 'if we teach them to pass by reference some
> other dumb programmer can accidentally change values around and break
> stuff!' Simpletons!
> >
> >Isn't passing by reference a "no-no" is terms of good programming? At
least
> >that's what I was told when I studied programming about 12 years ago?
> >
> >Ignatius
> >
> >
> >
> >----- Original Message -----
> >From: "Anthony Ritter" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Tuesday, January 01, 2002 2:40 PM
> >Subject: Re: [PHP-WIN] Passing by reference...
> >
> >
> > > Michael Sims wrote in message:
> > > > Yes, that is true. The "tax" function has the ampersand in the
> >argument
> > > > list, which means that any variable that you send to it gets passed
by
> > > > reference. This means that any changes to that variable that occur
> >inside
> > > > the function will actually affect the same variable that is in the
> >scope
> > > of
> > > > the main script. Without the ampersand, the function will only
modify
> > > it's
> > > > own local copy of the variable and leave the one in the main script
> > > > unaltered. If you remove the ampersand from the above script and
> >re-run
> > > > it, then the output of the first echo statement should not change,
but
> >the
> > > > second one will change to 2500 since the function will no longer be
> > > > altering the variable in the main script.
> > > >
> > > > http://www.php.net/manual/en/language.references.pass.php
> > > >
> > > > Sorry if I'm not understanding your question...
> > > ....................................
> > >
> > > Thanks for the reply Michael. You've answered my question.
> > >
> > > A happy and healthy new year to you and yours.
> > > Tony Ritter
> > >
> > >
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> >
> >
> >--
> >PHP Windows Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> _________________________________________________________________
> Join the world’s largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--- End Message ---
--- Begin Message ---
Understood.. as far as I can answer your question... I'd have to say that
yes it does 'break' the 'rule' and that it is still the 'preached' method to
avoid such things.
>
>One of the fundamental rules of blackbox programming is that a function
>should never change the value of a global variable. And there are very
>compelling reasons why this rule exists.
>
>I'm simply suggesting that "passing by reference" as a programming
>"technique" breaks this fundamental rule.....although I am not suggesting
>that passing by reference is in itself a "bad thing"....perhaps a necessary
>evil.
>
>All I'm saying is ....have the "rules" changed since I left Uni?
>
>
>
>Ignatius
>
>
>
>----- Original Message -----
>From: "Pac mon" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Wednesday, January 02, 2002 2:30 PM
>Subject: Re: Fw: [PHP-WIN] Passing by reference...
>
>
> > Some teachers will say this just because they think students are dumb.
>The
> > reasoning behind it is that 'if we teach them to pass by reference some
> > other dumb programmer can accidentally change values around and break
> > stuff!' Simpletons!
> > >
> > >Isn't passing by reference a "no-no" is terms of good programming? At
>least
> > >that's what I was told when I studied programming about 12 years ago?
> > >
> > >Ignatius
> > >
> > >
> > >
> > >----- Original Message -----
> > >From: "Anthony Ritter" <[EMAIL PROTECTED]>
> > >To: <[EMAIL PROTECTED]>
> > >Sent: Tuesday, January 01, 2002 2:40 PM
> > >Subject: Re: [PHP-WIN] Passing by reference...
> > >
> > >
> > > > Michael Sims wrote in message:
> > > > > Yes, that is true. The "tax" function has the ampersand in the
> > >argument
> > > > > list, which means that any variable that you send to it gets
>passed
>by
> > > > > reference. This means that any changes to that variable that
>occur
> > >inside
> > > > > the function will actually affect the same variable that is in the
> > >scope
> > > > of
> > > > > the main script. Without the ampersand, the function will only
>modify
> > > > it's
> > > > > own local copy of the variable and leave the one in the main
>script
> > > > > unaltered. If you remove the ampersand from the above script and
> > >re-run
> > > > > it, then the output of the first echo statement should not change,
>but
> > >the
> > > > > second one will change to 2500 since the function will no longer
>be
> > > > > altering the variable in the main script.
> > > > >
> > > > > http://www.php.net/manual/en/language.references.pass.php
> > > > >
> > > > > Sorry if I'm not understanding your question...
> > > > ....................................
> > > >
> > > > Thanks for the reply Michael. You've answered my question.
> > > >
> > > > A happy and healthy new year to you and yours.
> > > > Tony Ritter
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
>[EMAIL PROTECTED]
> > > >
> > >
> > >
> > >--
> > >PHP Windows Mailing List (http://www.php.net/)
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >To contact the list administrators, e-mail:
>[EMAIL PROTECTED]
> > >
> >
> >
> > _________________________________________________________________
> > Join the world’s largest e-mail service with MSN Hotmail.
> > http://www.hotmail.com
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
--- End Message ---
--- Begin Message ---
At 09:27 AM 1/2/2002 +1100, Ignatius Teo wrote:
>Isn't passing by reference a "no-no" is terms of good programming? At least
>that's what I was told when I studied programming about 12 years ago?
>
>Ignatius
Not sure...do you recall the reasons that were given when you were told that?
--- End Message ---
--- Begin Message ---
At 12:08 AM 1/2/2002 -0600, Michael Sims wrote:
>At 09:27 AM 1/2/2002 +1100, Ignatius Teo wrote:
>>Isn't passing by reference a "no-no" is terms of good programming? At least
>>that's what I was told when I studied programming about 12 years ago?
>>
>>Ignatius
>
>Not sure...do you recall the reasons that were given when you were told that?
Sorry guys, I see you already answered this...guess I should read ALL of
the messages before I bother to respond... :(
--- End Message ---
--- Begin Message ---
Uhm... I don't think so ... what I mean is if you access mysql directly from
the mysql app then there are users and passwords. Most likely you have or at
least *SHOULD* have a password set for the root user of MYSQL. When
accessing the DB from PHP you in order to be able to run queries on a DB you
need to be properly connected. If you do not pass the correct password the
the root mysql user then you will not be properly connected.
understand?
------------------------------------------
>
>Do I have to CHMOD PHPMyAdmin ???
>
-----------------------------------------
>
>
> > My guess is that you have a password set for the root user in Mysql, but
> > (from the error statement) I can see that a password was not sent to
>Mysql
> > for verification. That being neccessary, of course. I believe David is
> > referring the the exact variables in phpMyAdmin that would hold the
>value
>in
> > question. Good Luck.
> >
> > >
> > >Hi VivoAnt
> > >
> > >On 30 December 2001 at 01:02:22 -0800 (which was 09:02 where I live)
> > >VivoAnt
> > >rearranged electrons to get
> > >
> > >V> Thanks for the help on my previous question :) I got it to work
>finally
> > >V> :) After I did everything I tried to upload phpmyadmin to my server.
>I
> > >V> tried accessing the page but I got this error:
> > >
> > >V> Error
> > >V> MySQL said:
> > >
> > >V> Access denied for user: 'root@localhost' (Using password: NO)
> > >
> > >V> I'm not sure what that means...
> > >
> > >At a guess I would say that you have not configured config.inc.php3 (or
> > >config.inc.php) correctly check the following entries
> > >
> > >$cfgServers[1]['host']
> > >$cfgServers[1]['user']
> > >$cfgServers[1]['password']
> > >
> > >--
> > > BBFN,
>_______________________________________________
> > > David | David Elliott | Software Engineer
> > >|
> > > _________________________| [EMAIL PROTECTED] | PGP Key ID
>0x650F4534
> > >|
> > >| We're riding on the Escalator of Life
>|
> > >
> > >
> > >--
> > >PHP Windows Mailing List (http://www.php.net/)
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >To contact the list administrators, e-mail:
>[EMAIL PROTECTED]
> > >
> >
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at
>http://explorer.msn.com/intl.asp.
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
--- End Message ---
--- Begin Message ---
Help me!!! I have problem login as root at my MySQL. I remember the last
thing I did before this happened, is that I deleted the root column from
user table from mysql database. Since then, I can login as root (without
password), but when I want to use the databases, I can't. I also cannot
grant(give privileges), It seemed like I login as a user, not an
administrator. Can somebody please help me? Thank you.
--- End Message ---