php-general Digest 9 Sep 2002 02:21:53 -0000 Issue 1574

Topics (messages 115662 through 115696):

Re: LDAP Authentication problem
        115662 by: Stig Venaas

Re: file include relative file addressing.
        115663 by: . Edwin
        115664 by: . Edwin
        115665 by: . Edwin

dropping mail into queue
        115666 by: Petre Agenbag

Upload Progress
        115667 by: Jacob Miller
        115671 by: Jed Verity
        115674 by: Jed Verity

Calling info from mySQL inside flash
        115668 by: Thomas Edison Jr.
        115669 by: Brad Bonkoski

Need a Linux Guru!
        115670 by: SaschaBraun.gmx.de
        115681 by: Rouvas Stathis

turn register_globals on
        115672 by: Anup
        115673 by: Brad Bonkoski
        115677 by: nicos.php.net
        115689 by: Jome
        115692 by: Brad Bonkoski

Re: Warning: Could not execute mail delivery program
        115675 by: Noah Spitzer-Williams
        115676 by: Noah Spitzer-Williams

Troubles Inserting into MYSQL
        115678 by: Steve Gaas
        115679 by: Paul Nicholson
        115680 by: Steve Gaas
        115682 by: Steve Gaas
        115683 by: Brad Bonkoski
        115684 by: Steve Gaas

help me regarding redirecting a page
        115685 by: Anjali Kaur
        115691 by: eriol

Upgrading PHP on Redhat
        115686 by: David Yee
        115690 by: Jan Kudrman

Re: Proposal for securing PHP sessions
        115687 by: Chris Shiflett

borders in dreamwever please Help
        115688 by: Iguider

Trying to install PHPAuction on e-Smith
        115693 by: James Redfern

checkbox question
        115694 by: Alex Shi
        115695 by: Rodrigo Dominguez

Re: How to program very basic chat on PHP?
        115696 by: M

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 ---
On Wed, Sep 04, 2002 at 03:58:18PM -0400, Brad Harriger wrote:
> I'm trying to retrieve information from an NDS server using LDAP 
> functions in PHP 4.06.  I am able to establish the connection and bind 
> to the server using an anonymous bind, but when I try to bind as a valid 
> user, the app seems to run in an infinite loop.  I'm not sure where to 
> look for the cause of this problem.  Any suggestions would be appreciated.

The app, is that your PHP script? Or is it the LDAP library (PHP is
stuck in ldap_bind()?), or is it the NDS server? Perhaps you should
try to authenticate and search with ldapsearch or similar tool and
see if it happens then?

Stig
--- End Message ---
--- Begin Message ---
??? I thought you said "my.inc.php" but you're including "my.php".

This one should work:

  include_once "../include/blah/my.inc.php"; // filename is my.inc.php

- E

"Nelr" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> From the root of a website: /
>
> I had a file called /my.php which included a file /include/blah/my.inc.php
>
> In my.php if I put the include_once( "./include/blah/my.inc.php" ); it
works
> fine
> when my.php is in the root of the site.
>
> If I move /my.php to /blah/my.php, no matter how I address
> ../include/blah/my.php or /include/blah/my.php I keep getting path errors.
>
> How do I get around this problem using only relative paths (no absolute or
> placing in an include path)
>
> Neil.
>
>
--- End Message ---
--- Begin Message ---
??? I thought you said "my.inc.php" but you're including "my.php".

This one should work:

  include_once "../include/blah/my.inc.php"; // filename is my.inc.php

- E

"Nelr" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> From the root of a website: /
>
> I had a file called /my.php which included a file /include/blah/my.inc.php
>
> In my.php if I put the include_once( "./include/blah/my.inc.php" ); it
works
> fine
> when my.php is in the root of the site.
>
> If I move /my.php to /blah/my.php, no matter how I address
> ../include/blah/my.php or /include/blah/my.php I keep getting path errors.
>
> How do I get around this problem using only relative paths (no absolute or
> placing in an include path)
>
> Neil.
>
>
--- End Message ---
--- Begin Message ---
??? I thought you said "my.inc.php" but you're including "my.php".

This one should work:

  include_once "../include/blah/my.inc.php"; // filename is my.inc.php

- E

"Nelr" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> From the root of a website: /
>
> I had a file called /my.php which included a file /include/blah/my.inc.php
>
> In my.php if I put the include_once( "./include/blah/my.inc.php" ); it
works
> fine
> when my.php is in the root of the site.
>
> If I move /my.php to /blah/my.php, no matter how I address
> ../include/blah/my.php or /include/blah/my.php I keep getting path errors.
>
> How do I get around this problem using only relative paths (no absolute or
> placing in an include path)
>
> Neil.
>
>
--- End Message ---
--- Begin Message ---
Hi list
Is is possible to change the default behaviour of the mail() function to
send the message to the queue instead of trying to send it immediately? 
I did do some research into this a while back, but it never really got
to a point where I was completely satisfied with the results. I can
recall from then that the behaviour of the mail() function was inherited
from the way sendmail was configured on the server, but I cannot go that
route ( ie, reconfigure sendmail to send all mail requests to the queue,
as the server is not only a webserver, but servers my clients normal
e-mail as well), so I'm basically asking if it is possible to "override"
the sendmail behaviour when you issue the mail() function, or to even
compose and write the message directly to the /var/spool/mqueue folder (
that would obviously NOT use the mail() function).
The reason for all this is that there are some clients that are
abusing/miss-using the mail() function to query a mysql db of 20K users
with a while() loop and then doing a mail() inside the while, this is
causing some serious problems on my server, and I'm trying to look for
ways to put a tab on this.So any other suggestions are also very
welcome.
Thanks



--- End Message ---
--- Begin Message ---
Everything I've read says that there is no way to display the progress of a 
file upload (via a form) using PHP.

I'm currently working on a site which will regularly be accepting very 
large uploads, anywhere from 10 to 250+ mb and I really need a way to 
display the progress of the upload so that it doesn't appear as if the 
browser has frozen for a few hours.

Any suggestions for a solution?

thanks
-jacob

--- End Message ---
--- Begin Message ---
There really isn't a great solution for this, that I know of. It's one of
the few things that makes an argument for ASP over PHP, as far as I'm
concerned (if you have the luxury of choosing). Below is what I did once to
try to get around the problem. It worked *okay*.

The bummer is that I had to ask people to enter the size of their file in a
field. (Rough estimates were okay.) Then, as soon as somebody hit the submit
button on my form, I popped up a small, modal, progress bar sized window
that was actually two frames. I passed the file size value from the form
field to the top frame. In the bottom frame, JavaScript created a bordered
<div> equal in pixel length to the number of MB of the file being uploaded.
The top frame, a PHP doc, would then refresh every three seconds, executing
a filesize() on the uploaded file, converting it to MB, rounding up, and
then using DHTML to resize the width of a blue-gradient gif contained in the
<div> of the bottom frame of the progress bar window.

Typically, this worked okay for me. It wasn't the prettiest progress bar in
the world, but it did the trick for most people.

HTH!
Jed


On the threshold of genius, Jacob Miller wrote:

> Everything I've read says that there is no way to display the progress of a
> file upload (via a form) using PHP.
> 
> I'm currently working on a site which will regularly be accepting very
> large uploads, anywhere from 10 to 250+ mb and I really need a way to
> display the progress of the upload so that it doesn't appear as if the
> browser has frozen for a few hours.
> 
> Any suggestions for a solution?
> 
> thanks
> -jacob
> 

--- End Message ---
--- Begin Message ---
Sorry, I wrote too quickly. I meant that the file size field value is passed
to the bottom frame. And JavaScript is used to resize the gif, not DHTML.
(Used to be DHTML when I was adding nbsp instead of resizing an image.)

HTH,
Jed

On the threshold of genius, Jed Verity wrote:

> There really isn't a great solution for this, that I know of. It's one of
> the few things that makes an argument for ASP over PHP, as far as I'm
> concerned (if you have the luxury of choosing). Below is what I did once to
> try to get around the problem. It worked *okay*.
> 
> The bummer is that I had to ask people to enter the size of their file in a
> field. (Rough estimates were okay.) Then, as soon as somebody hit the submit
> button on my form, I popped up a small, modal, progress bar sized window
> that was actually two frames. I passed the file size value from the form
> field to the top frame. In the bottom frame, JavaScript created a bordered
> <div> equal in pixel length to the number of MB of the file being uploaded.
> The top frame, a PHP doc, would then refresh every three seconds, executing
> a filesize() on the uploaded file, converting it to MB, rounding up, and
> then using DHTML to resize the width of a blue-gradient gif contained in the
> <div> of the bottom frame of the progress bar window.
> 
> Typically, this worked okay for me. It wasn't the prettiest progress bar in
> the world, but it did the trick for most people.
> 
> HTH!
> Jed
> 
> 
> On the threshold of genius, Jacob Miller wrote:
> 
>> Everything I've read says that there is no way to display the progress of a
>> file upload (via a form) using PHP.
>> 
>> I'm currently working on a site which will regularly be accepting very
>> large uploads, anywhere from 10 to 250+ mb and I really need a way to
>> display the progress of the upload so that it doesn't appear as if the
>> browser has frozen for a few hours.
>> 
>> Any suggestions for a solution?
>> 
>> thanks
>> -jacob
>> 
> 

--- End Message ---
--- Begin Message ---
I have a mySQL db, and a bunch of tables in it. 
What i want to do, is to pick up some data, and
display in my Flash Movie.

For example. I have a table with a list. Now on my
main page, i display the total number of people in the
list so far (By counting the rows). Now i want to
display the same in my Flash movie. 

How can we exactly insert PHP Coding inside Flash
Movie to make the code work? Any tips...

Thanks,
T. Edison Jr.



__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
--- End Message ---
--- Begin Message ---
How about giving this page a look over:
http://www.macromedia.com/desdev/topics/php.html

Here's an article especially for using PHP and MySQL with Flash MX
http://www.macromedia.com/desdev/mx/flash/articles/flashmx_php.html

HTH
-Brad

"Thomas Edison Jr." wrote:
> 
> I have a mySQL db, and a bunch of tables in it.
> What i want to do, is to pick up some data, and
> display in my Flash Movie.
> 
> For example. I have a table with a list. Now on my
> main page, i display the total number of people in the
> list so far (By counting the rows). Now i want to
> display the same in my Flash movie.
> 
> How can we exactly insert PHP Coding inside Flash
> Movie to make the code work? Any tips...
> 
> Thanks,
> T. Edison Jr.
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes
> http://finance.yahoo.com
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi,

I'm setting up an Linux Server for codetesting an routing, but it takes
about one week now to configure this s**t.

I could make the routing working. But some Daemons don't start at bootup.
Such as Apache, Squid, MySQL and so on. The only way I'm able to surf in the
Internet is to start Squid after booting manually from Commandline via SSH.

I've read somewhere that if the DNS isn't configured right squid is not able
to run at bootup. So I believe it has something to do with this.

I need really help on this. So please write me if you are willing and able
to help me.

I can give you the IP and the Root Acount information, or you describe me
how i can solve my problem.

The Server runs SuSE 8.0.

Another Problem is, that I don't know where to setup or start the FTPD
daemon.

Please, please Help!!!!

Sascha

-- 
Sascha Braun
-----------------------
Iltisstrasse 24
24143 Kiel

Postfach 6345
24124 Kiel

fon 0431 - 739 47 50
hdy 0175 - 458 73 74

GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

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

cd /etc/rc.d
locate the scripts reflecting the services you need to start at boot
do insserv for each script.
e.g.
insserv apache

That way, next time it boots these services will start.
Another way is to use the runtime-level editor of YaST2.

-Stathis.

[EMAIL PROTECTED] wrote:
> 
> Hi,
> 
> I'm setting up an Linux Server for codetesting an routing, but it takes
> about one week now to configure this s**t.
> 
> I could make the routing working. But some Daemons don't start at bootup.
> Such as Apache, Squid, MySQL and so on. The only way I'm able to surf in the
> Internet is to start Squid after booting manually from Commandline via SSH.
> 
> I've read somewhere that if the DNS isn't configured right squid is not able
> to run at bootup. So I believe it has something to do with this.
> 
> I need really help on this. So please write me if you are willing and able
> to help me.
> 
> I can give you the IP and the Root Acount information, or you describe me
> how i can solve my problem.
> 
> The Server runs SuSE 8.0.
> 
> Another Problem is, that I don't know where to setup or start the FTPD
> daemon.
> 
> Please, please Help!!!!
> 
> Sascha
> 
> --
> Sascha Braun
> -----------------------
> Iltisstrasse 24
> 24143 Kiel
> 
> Postfach 6345
> 24124 Kiel
> 
> fon 0431 - 739 47 50
> hdy 0175 - 458 73 74
> 
> GMX - Die Kommunikationsplattform im Internet.
> http://www.gmx.net
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Rouvas Stathis
[EMAIL PROTECTED]
http://www.di.uoa.gr/~rouvas
--- End Message ---
--- Begin Message ---
Hello I am working on a PHP server which has register_globals off. In my
script is there anyway to turn it on, just for my script?


--- End Message ---
--- Begin Message ---
I think it is a global configuration setting, so it would not be
possible to turn it off for an individual script.

Just use the $_SERVER['variable_name'] 

-Brad

Anup wrote:
> 
> Hello I am working on a PHP server which has register_globals off. In my
> script is there anyway to turn it on, just for my script?
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi,

Look at www.php.net/ini_set

--

Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
www.WorldAKT.com - Hébergement de sites Internet

"Anup" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> Hello I am working on a PHP server which has register_globals off. In my
> script is there anyway to turn it on, just for my script?
>
>


--- End Message ---
--- Begin Message ---
> Hello I am working on a PHP server which has register_globals off. In my
> script is there anyway to turn it on, just for my script?

ini_set("register_globals", 1); at the top of your script.

  Jome


--- End Message ---
--- Begin Message ---
Does this work for the original poster?

Does not work for me (of course I am going the opposite way, wanting to
test scripts one-by-one to verify they work with register_globals off)
running: ini_set("register_globals", 0);
(and, tried both) ini_set("register_globals", "Off");

According to the docs it says:
register_globals   "0"    PHP_INI_PERDIR|PHP_INI_SYSTEM
Stating that this variable can only be changed in .htaccess, or php.ini

It does seem to return the correct value, but it does not make the same
changes to my script that setting this value to "Off" in php.ini does.

So, is this allowable to set in user scripts?  Or is the dosumentation
correct in saying it cannot?
-Brad


Jome wrote:
> 
> > Hello I am working on a PHP server which has register_globals off. In my
> > script is there anyway to turn it on, just for my script?
> 
> ini_set("register_globals", 1); at the top of your script.
> 
>   Jome
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
So do you think it has to be a server issue and not a code issue? My site's
traffic load has increased significantly in the last week or so and that's
kind of when it started happening. Could there be a resource problem? Is
there any way to find out more on why it's not running?

- Noah

"Noah Spitzer-Williams" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> PHP Warning:  Could not execute mail delivery program in /htdocs/...
>
> Any suggestions on how to fix this?
>
> - Noah
>
>


--- End Message ---
--- Begin Message ---
Here are my safemode parameters:

; Safe Mode
safe_mode  = Off
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_     ; Setting certain environment
variables
             ; may be a potential security breach.
             ; This directive contains a comma-delimited
             ; list of prefixes.  In Safe Mode, the
             ; user may only alter environment
             ; variables whose names begin with the
             ; prefixes supplied here.
             ; By default, users will only be able
             ; to set environment variables that begin
             ; with PHP_ (e.g. PHP_FOO=BAR).
             ; Note:  If this directive is empty, PHP
             ; will let the user modify ANY environment
             ; variable!
safe_mode_protected_env_vars = LD_LIBRARY_PATH



- Noah

"¡Û" <[EMAIL PROTECTED]> wrote in message
42EOfJ$[EMAIL PROTECTED]">news:42EOfJ$[EMAIL PROTECTED]...
> ==> [EMAIL PROTECTED] (Noah Spitzer-Williams) ªº¤å³¹¤¤´£¨ì:
> > PHP Warning:  Could not execute mail delivery program in /htdocs/...
> > Any suggestions on how to fix this?
> > - Noah
>
>         check your php.ini file.
>
>         if should be safe_mode = Off....
>
> --
> * Origin: LastLoveSongBBS (lls.twbbs.org) From:
localhost.localdomai 


--- End Message ---
--- Begin Message ---
Hello,

My code below always dies!  I've tried just about every iteration of the
values, etc..  Can anybody show me how to insert into MySQL a value?

"INSERT INTO events ('user','detaildesc') VALUES ('$user','$details')"

I just don't get it!


if ($update_type == update_Williams) {
mysql_query("INSERT INTO events ('user', 'detaildesc', 'index', 'reference',
'date_added') VALUES (\'$cookiewho\',
\'$add_Williams\',\'\',\'$row_num\',\'$last_update\')", $sql4)
        or die ("could not do update");
        }
--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey,
Send the results of mysql_errno() please. :)
~Pauly

if ($update_type == update_Williams) {
    mysql_query("INSERT INTO events ('user', 'detaildesc', 'index',
    'reference', 'date_added') VALUES (\'$cookiewho\',
    \'$add_Williams\',\'\',\'$row_num\',\'$last_update\')", $sql4)
    or echo mysql_errno()/*die ("could not do update")*/;
}



On Sunday 08 September 2002 03:07 pm, you wrote:
> Hello,
>
> My code below always dies!  I've tried just about every iteration of the
> values, etc..  Can anybody show me how to insert into MySQL a value?
>
> "INSERT INTO events ('user','detaildesc') VALUES ('$user','$details')"
>
> I just don't get it!
>
>
> if ($update_type == update_Williams) {
> mysql_query("INSERT INTO events ('user', 'detaildesc', 'index',
> 'reference', 'date_added') VALUES (\'$cookiewho\',
> \'$add_Williams\',\'\',\'$row_num\',\'$last_update\')", $sql4)
>       or die ("could not do update");
>       }

- -- 
~Paul Nicholson
Design Specialist @ WebPower Design
"The web....the way you want it!"
[EMAIL PROTECTED]

"It said uses Windows 98 or better, so I loaded Linux!"
Registered Linux User #183202 using Register Linux System # 81891
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9e6McDyXNIUN3+UQRAriZAKCTPYsBfypW7N6k8vpG+UDJEZ77BQCfVtEi
BmSkmFZDBbXuAm+g3nvw/tc=
=InFX
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---

Parse error: parse error, unexpected T_ECHO in
/var/www/html/actionreg/doupdate.php on line 24

Forgot I had that function..  I don't understand the error though..

Steve Gaas
Sr. Systems Engineer, Carrier Markets
Riverstone Networks
972.668.8329 (follow-me)
877.713.7063 (pager analog dial)
[EMAIL PROTECTED] (interactive pager)

http://www.rstn.net / Nasdaq: RSTN
 
"Wisdom begins in wonder."   -Socrates

-----Original Message-----
From: Paul Nicholson [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, September 08, 2002 2:21 PM
To: Steve Gaas; [EMAIL PROTECTED]
Subject: Re: [PHP] Troubles Inserting into MYSQL

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey,
Send the results of mysql_errno() please. :)
~Pauly

if ($update_type == update_Williams) {
    mysql_query("INSERT INTO events ('user', 'detaildesc', 'index',
    'reference', 'date_added') VALUES (\'$cookiewho\',
    \'$add_Williams\',\'\',\'$row_num\',\'$last_update\')", $sql4)
    or echo mysql_errno()/*die ("could not do update")*/;
}



On Sunday 08 September 2002 03:07 pm, you wrote:
> Hello,
>
> My code below always dies!  I've tried just about every iteration of the
> values, etc..  Can anybody show me how to insert into MySQL a value?
>
> "INSERT INTO events ('user','detaildesc') VALUES ('$user','$details')"
>
> I just don't get it!
>
>
> if ($update_type == update_Williams) {
> mysql_query("INSERT INTO events ('user', 'detaildesc', 'index',
> 'reference', 'date_added') VALUES (\'$cookiewho\',
> \'$add_Williams\',\'\',\'$row_num\',\'$last_update\')", $sql4)
>       or die ("could not do update");
>       }

- -- 
~Paul Nicholson
Design Specialist @ WebPower Design
"The web....the way you want it!"
[EMAIL PROTECTED]

"It said uses Windows 98 or better, so I loaded Linux!"
Registered Linux User #183202 using Register Linux System # 81891
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9e6McDyXNIUN3+UQRAriZAKCTPYsBfypW7N6k8vpG+UDJEZ77BQCfVtEi
BmSkmFZDBbXuAm+g3nvw/tc=
=InFX
-----END PGP SIGNATURE-----

--- End Message ---
--- Begin Message ---
This syntax fixes the syntax error..

if ($update_type == update_Williams) {
mysql_query("INSERT INTO events_Williams ('user', 'detaildesc', 'index',
'reference', 'date_added') VALUES \'$cookiewho\',
\'$add_Williams\',\'\',\'$row_num\',\'$last_update\'", $sql4)
        or print mysql_error();
        }

this is the output
You have an error in your SQL syntax near ''user', 'detaildesc', 'index',
'reference', 'date_added') VALUES \'sgaas-wil\', ' at line 1

Steve Gaas
Sr. Systems Engineer, Carrier Markets
Riverstone Networks
972.668.8329 (follow-me)
877.713.7063 (pager analog dial)
[EMAIL PROTECTED] (interactive pager)

http://www.rstn.net / Nasdaq: RSTN
 
"Wisdom begins in wonder."   -Socrates

-----Original Message-----
From: Steve Gaas 
Sent: Sunday, September 08, 2002 2:26 PM
To: 'Paul Nicholson'; Steve Gaas; [EMAIL PROTECTED]
Subject: RE: [PHP] Troubles Inserting into MYSQL


Parse error: parse error, unexpected T_ECHO in
/var/www/html/actionreg/doupdate.php on line 24

Forgot I had that function..  I don't understand the error though..

Steve Gaas
Sr. Systems Engineer, Carrier Markets
Riverstone Networks
972.668.8329 (follow-me)
877.713.7063 (pager analog dial)
[EMAIL PROTECTED] (interactive pager)

http://www.rstn.net / Nasdaq: RSTN
 
"Wisdom begins in wonder."   -Socrates

-----Original Message-----
From: Paul Nicholson [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, September 08, 2002 2:21 PM
To: Steve Gaas; [EMAIL PROTECTED]
Subject: Re: [PHP] Troubles Inserting into MYSQL

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey,
Send the results of mysql_errno() please. :)
~Pauly

if ($update_type == update_Williams) {
    mysql_query("INSERT INTO events ('user', 'detaildesc', 'index',
    'reference', 'date_added') VALUES (\'$cookiewho\',
    \'$add_Williams\',\'\',\'$row_num\',\'$last_update\')", $sql4)
    or echo mysql_errno()/*die ("could not do update")*/;
}



On Sunday 08 September 2002 03:07 pm, you wrote:
> Hello,
>
> My code below always dies!  I've tried just about every iteration of the
> values, etc..  Can anybody show me how to insert into MySQL a value?
>
> "INSERT INTO events ('user','detaildesc') VALUES ('$user','$details')"
>
> I just don't get it!
>
>
> if ($update_type == update_Williams) {
> mysql_query("INSERT INTO events ('user', 'detaildesc', 'index',
> 'reference', 'date_added') VALUES (\'$cookiewho\',
> \'$add_Williams\',\'\',\'$row_num\',\'$last_update\')", $sql4)
>       or die ("could not do update");
>       }

- -- 
~Paul Nicholson
Design Specialist @ WebPower Design
"The web....the way you want it!"
[EMAIL PROTECTED]

"It said uses Windows 98 or better, so I loaded Linux!"
Registered Linux User #183202 using Register Linux System # 81891
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9e6McDyXNIUN3+UQRAriZAKCTPYsBfypW7N6k8vpG+UDJEZ77BQCfVtEi
BmSkmFZDBbXuAm+g3nvw/tc=
=InFX
-----END PGP SIGNATURE-----

--- End Message ---
--- Begin Message ---
Shoudn't it be:

if ($update_type == update_Williams) {
mysql_query("INSERT INTO events_Williams ('user', 'detaildesc', 'index',
'reference', 'date_added') VALUES
('$cookiewho','$add_Williams','','$row_num','$last_update')", $sql4)
        or print mysql_error();
        }
You need the '(' and ')' in your query to group VALUES

(And what's with all the escaping with '\'?  They don't appear to be
needed and make it look very cluttered, i.e. not very readable.

HTH
-Brad

Steve Gaas wrote:
> 
> This syntax fixes the syntax error..
> 
> if ($update_type == update_Williams) {
> mysql_query("INSERT INTO events_Williams ('user', 'detaildesc', 'index',
> 'reference', 'date_added') VALUES \'$cookiewho\',
> \'$add_Williams\',\'\',\'$row_num\',\'$last_update\'", $sql4)
>         or print mysql_error();
>         }
> 
> this is the output
> You have an error in your SQL syntax near ''user', 'detaildesc', 'index',
> 'reference', 'date_added') VALUES \'sgaas-wil\', ' at line 1
> 
> Steve Gaas
> Sr. Systems Engineer, Carrier Markets
> Riverstone Networks
> 972.668.8329 (follow-me)
> 877.713.7063 (pager analog dial)
> [EMAIL PROTECTED] (interactive pager)
> 
> http://www.rstn.net / Nasdaq: RSTN
> 
> "Wisdom begins in wonder."   -Socrates
> 
> -----Original Message-----
> From: Steve Gaas
> Sent: Sunday, September 08, 2002 2:26 PM
> To: 'Paul Nicholson'; Steve Gaas; [EMAIL PROTECTED]
> Subject: RE: [PHP] Troubles Inserting into MYSQL
> 
> Parse error: parse error, unexpected T_ECHO in
> /var/www/html/actionreg/doupdate.php on line 24
> 
> Forgot I had that function..  I don't understand the error though..
> 
> Steve Gaas
> Sr. Systems Engineer, Carrier Markets
> Riverstone Networks
> 972.668.8329 (follow-me)
> 877.713.7063 (pager analog dial)
> [EMAIL PROTECTED] (interactive pager)
> 
> http://www.rstn.net / Nasdaq: RSTN
> 
> "Wisdom begins in wonder."   -Socrates
> 
> -----Original Message-----
> From: Paul Nicholson [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, September 08, 2002 2:21 PM
> To: Steve Gaas; [EMAIL PROTECTED]
> Subject: Re: [PHP] Troubles Inserting into MYSQL
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hey,
> Send the results of mysql_errno() please. :)
> ~Pauly
> 
> if ($update_type == update_Williams) {
>     mysql_query("INSERT INTO events ('user', 'detaildesc', 'index',
>     'reference', 'date_added') VALUES (\'$cookiewho\',
>     \'$add_Williams\',\'\',\'$row_num\',\'$last_update\')", $sql4)
>     or echo mysql_errno()/*die ("could not do update")*/;
> }
> 
> On Sunday 08 September 2002 03:07 pm, you wrote:
> > Hello,
> >
> > My code below always dies!  I've tried just about every iteration of the
> > values, etc..  Can anybody show me how to insert into MySQL a value?
> >
> > "INSERT INTO events ('user','detaildesc') VALUES ('$user','$details')"
> >
> > I just don't get it!
> >
> >
> > if ($update_type == update_Williams) {
> > mysql_query("INSERT INTO events ('user', 'detaildesc', 'index',
> > 'reference', 'date_added') VALUES (\'$cookiewho\',
> > \'$add_Williams\',\'\',\'$row_num\',\'$last_update\')", $sql4)
> >       or die ("could not do update");
> >       }
> 
> - --
> ~Paul Nicholson
> Design Specialist @ WebPower Design
> "The web....the way you want it!"
> [EMAIL PROTECTED]
> 
> "It said uses Windows 98 or better, so I loaded Linux!"
> Registered Linux User #183202 using Register Linux System # 81891
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
> 
> iD8DBQE9e6McDyXNIUN3+UQRAriZAKCTPYsBfypW7N6k8vpG+UDJEZ77BQCfVtEi
> BmSkmFZDBbXuAm+g3nvw/tc=
> =InFX
> -----END PGP SIGNATURE-----
> 
>   ------------------------------------------------------------------------
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Ohmygosh.. That works...

if ($update_type == update_Williams) {
mysql_query("INSERT INTO events_Williams (user, detaildesc, indexx,
reference, date_added) VALUES ('$cookiewho',
'$add_Williams','','$row_num','$last_update')", $sql4)
        or print mysql_error();
        }

inserts perfectly..



Steve Gaas
Sr. Systems Engineer, Carrier Markets
Riverstone Networks
972.668.8329 (follow-me)
877.713.7063 (pager analog dial)
[EMAIL PROTECTED] (interactive pager)

http://www.rstn.net / Nasdaq: RSTN
 
"Wisdom begins in wonder."   -Socrates

-----Original Message-----
From: Brad Bonkoski [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, September 08, 2002 2:43 PM
To: Steve Gaas
Cc: '[EMAIL PROTECTED]'
Subject: Re: [PHP] Troubles Inserting into MYSQL

Shoudn't it be:

if ($update_type == update_Williams) {
mysql_query("INSERT INTO events_Williams ('user', 'detaildesc', 'index',
'reference', 'date_added') VALUES
('$cookiewho','$add_Williams','','$row_num','$last_update')", $sql4)
        or print mysql_error();
        }
You need the '(' and ')' in your query to group VALUES

(And what's with all the escaping with '\'?  They don't appear to be
needed and make it look very cluttered, i.e. not very readable.

HTH
-Brad

Steve Gaas wrote:
> 
> This syntax fixes the syntax error..
> 
> if ($update_type == update_Williams) {
> mysql_query("INSERT INTO events_Williams ('user', 'detaildesc', 'index',
> 'reference', 'date_added') VALUES \'$cookiewho\',
> \'$add_Williams\',\'\',\'$row_num\',\'$last_update\'", $sql4)
>         or print mysql_error();
>         }
> 
> this is the output
> You have an error in your SQL syntax near ''user', 'detaildesc', 'index',
> 'reference', 'date_added') VALUES \'sgaas-wil\', ' at line 1
> 
> Steve Gaas
> Sr. Systems Engineer, Carrier Markets
> Riverstone Networks
> 972.668.8329 (follow-me)
> 877.713.7063 (pager analog dial)
> [EMAIL PROTECTED] (interactive pager)
> 
> http://www.rstn.net / Nasdaq: RSTN
> 
> "Wisdom begins in wonder."   -Socrates
> 
> -----Original Message-----
> From: Steve Gaas
> Sent: Sunday, September 08, 2002 2:26 PM
> To: 'Paul Nicholson'; Steve Gaas; [EMAIL PROTECTED]
> Subject: RE: [PHP] Troubles Inserting into MYSQL
> 
> Parse error: parse error, unexpected T_ECHO in
> /var/www/html/actionreg/doupdate.php on line 24
> 
> Forgot I had that function..  I don't understand the error though..
> 
> Steve Gaas
> Sr. Systems Engineer, Carrier Markets
> Riverstone Networks
> 972.668.8329 (follow-me)
> 877.713.7063 (pager analog dial)
> [EMAIL PROTECTED] (interactive pager)
> 
> http://www.rstn.net / Nasdaq: RSTN
> 
> "Wisdom begins in wonder."   -Socrates
> 
> -----Original Message-----
> From: Paul Nicholson [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, September 08, 2002 2:21 PM
> To: Steve Gaas; [EMAIL PROTECTED]
> Subject: Re: [PHP] Troubles Inserting into MYSQL
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hey,
> Send the results of mysql_errno() please. :)
> ~Pauly
> 
> if ($update_type == update_Williams) {
>     mysql_query("INSERT INTO events ('user', 'detaildesc', 'index',
>     'reference', 'date_added') VALUES (\'$cookiewho\',
>     \'$add_Williams\',\'\',\'$row_num\',\'$last_update\')", $sql4)
>     or echo mysql_errno()/*die ("could not do update")*/;
> }
> 
> On Sunday 08 September 2002 03:07 pm, you wrote:
> > Hello,
> >
> > My code below always dies!  I've tried just about every iteration of the
> > values, etc..  Can anybody show me how to insert into MySQL a value?
> >
> > "INSERT INTO events ('user','detaildesc') VALUES ('$user','$details')"
> >
> > I just don't get it!
> >
> >
> > if ($update_type == update_Williams) {
> > mysql_query("INSERT INTO events ('user', 'detaildesc', 'index',
> > 'reference', 'date_added') VALUES (\'$cookiewho\',
> > \'$add_Williams\',\'\',\'$row_num\',\'$last_update\')", $sql4)
> >       or die ("could not do update");
> >       }
> 
> - --
> ~Paul Nicholson
> Design Specialist @ WebPower Design
> "The web....the way you want it!"
> [EMAIL PROTECTED]
> 
> "It said uses Windows 98 or better, so I loaded Linux!"
> Registered Linux User #183202 using Register Linux System # 81891
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
> 
> iD8DBQE9e6McDyXNIUN3+UQRAriZAKCTPYsBfypW7N6k8vpG+UDJEZ77BQCfVtEi
> BmSkmFZDBbXuAm+g3nvw/tc=
> =InFX
> -----END PGP SIGNATURE-----
> 
>   ------------------------------------------------------------------------
> --
> 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 ---
hello,

i dont know how to redirect a page... i mean i want to
have the effect of submit button without clicking on
the submit button.

thank you
anjali

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
--- End Message ---
--- Begin Message ---
<?
  header("Location: http://your.redirection.url/";);
  die;  
?>

http://www.php.net/manual/en/function.header.php

HTH..

Take care.. peace..
eriol

====

"Anjali Kaur" <[EMAIL PROTECTED]> disgorged:

: i dont know how to redirect a page... i mean i want to
: have the effect of submit button without clicking on
: the submit button.

--- End Message ---
--- Begin Message ---
Hi all. What's the correct procedure to upgrade PHP (in this case 4.0.6) on
a Red Hat system?  Usually I just get the PHP tarball compile it myself but
for this particular machine I just want to upgrade the Redhat PHP that's on
the system.  As you guys know Redhat puts its PHP (and Apache) files in
different locations- e.g. php.ini is in /etc.  I looked for some RPMs but I
kept getting failed dependencies when trying to install them- e.g.:

# rpm -Uvh php-4.1.2-7.2.4.i386.rpm
error: failed dependencies:
        php = 4.0.6-15 is needed by php-manual-4.0.6-15
        php = 4.0.6-15 is needed by php-imap-4.0.6-15
        php = 4.0.6-15 is needed by php-ldap-4.0.6-15
        php = 4.0.6-15 is needed by php-mysql-4.0.6-15
        php = 4.0.6-15 is needed by php-odbc-4.0.6-15
        php = 4.0.6-15 is needed by php-pgsql-4.0.6-15

I'm not an expert in using rpm so I'm probably doing something completely
wrong???

David

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

you should start by checking your current php instalation:

# rpm - qa | grep php

This will show you all packages which contains "php". It will be something
like following:
php-4.1.2-7.2.4
php-manual-4.0.6-15
php-imap-4.0.6-15
php-ldap-4.0.6-15
php-mysql-4.0.6-15
php-odbc-4.0.6-15
php-pgsql-4.0.6-15

Now you know what packages you have installed on your system. Now go to Red
Hat web site to find all this packages - you should to upgrade all of them.
If you have Red Hat Linux 7.2, go to
http://rhn.redhat.com/errata/RHSA-2002-102.html and find all of this
packages and download them. Be sure you are downloading rpms for your
version (ie. 7.2).

If you will have all these files downloaded, write the folowwing rpm command
whitch will update all of packages:

# rpm -Uv php-4.1.2-7.2.4.i386.rpm php-manual-4.1.2-7.2.4.i386.rpm \
  php-imap-4.1.2-7.2.4.i386.rpm php-ldap-4.1.2-7.2.4.i386.rpm \
  php-mysql-4.1.2-7.2.4.i386.rpm php-odbc-4.1.2-7.2.4.i386.rpm \
  php-pgsql-4.1.2-7.2.4.i386.rpm

All the packages are on the one line. Something like following:
# rpm - UV package_1 package_2 ... packege_n

By this way you will update all the packages and there shouldn't be any
"dependencies" error.

If yes, please let me know. I'm not an expert for Red Hat Linux but I am
yousind this distribution and I am doing it by this way... and it's works
for me.

Best regards,
Jan


----- Original Message -----
From: "David Yee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 08, 2002 10:59 PM
Subject: [PHP] Upgrading PHP on Redhat


> Hi all. What's the correct procedure to upgrade PHP (in this case 4.0.6)
on
> a Red Hat system?  Usually I just get the PHP tarball compile it myself
but
> for this particular machine I just want to upgrade the Redhat PHP that's
on
> the system.  As you guys know Redhat puts its PHP (and Apache) files in
> different locations- e.g. php.ini is in /etc.  I looked for some RPMs but
I
> kept getting failed dependencies when trying to install them- e.g.:
>
> # rpm -Uvh php-4.1.2-7.2.4.i386.rpm
> error: failed dependencies:
>         php = 4.0.6-15 is needed by php-manual-4.0.6-15
>         php = 4.0.6-15 is needed by php-imap-4.0.6-15
>         php = 4.0.6-15 is needed by php-ldap-4.0.6-15
>         php = 4.0.6-15 is needed by php-mysql-4.0.6-15
>         php = 4.0.6-15 is needed by php-odbc-4.0.6-15
>         php = 4.0.6-15 is needed by php-pgsql-4.0.6-15
>
> I'm not an expert in using rpm so I'm probably doing something completely
> wrong???
>
> David
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

--- End Message ---
--- Begin Message ---
I think you are definitely on the right track here, though I 
unfortunately haven't had time to look at your code (thus, I'm just 
going by your description).

Due to frequent vulnerabilities found in Internet Explorer's cookie 
handling (versions 4.0 - 6.0 allow anyone to view cookies from any 
domain, regardless of the cookie's characteristics), cookies should be 
considered public by any system attempting to be secure. Meaning, if 
both your key that you describe as well as the session ID are stored in 
cookies, a compromise of both these cookies opens you up to a 
presentation attack. This does not require the attacker to sniff the 
HTTP traffic in any way, so even the use of another security method such 
as SSL does not prevent this type of attack.

Instead, you should consider some sort of combination approach, where 
you utilize both URL variables and cookies. URL variables are quite 
exposed (and can be revealed with the Referer HTTP header), so you want 
to make the exposure of this by itself useless to an attacker. At the 
same time, you want a cookie compromise to not compromise your entire 
mechanism. By requiring both types of attacks, you at least make a 
compromise more difficult and therefore slightly strengthen what you've 
already got.

Hope that helps. Happy hacking.

Chris

mar tin wrote:

>Dear all:
>
>Until I read the article "PHP Session security"
>(http://www.webkreator.com/php/configuration/php-session-security.html)
>I haven't noticed how insecure PHP Sessions are.
>
>
>
>Basically there're 2 problems: 
>
>*) It's possible to hijack a session if you know the
>SID (session id)
>
> 1) If you're on a shared server (cheap webhosting)
>other users can get the SIDs by doing "ls /tmp/sess_*"
>(/tmp/ is defined on session.save_path on the config
>file, so it may be different).
>
> 2) When a user clicks on an external link, the
>browser sends the REFERER url and sometimes it
>contains the SID (if session.use_trans_sid is enabled)
>
>PHP offers a security measure: with
>session.referer_check it will reject SIDs comming from
>other referers, but the referer url can be easily
>forged.
>
>*) Users can read session data from the session files,
>which are owned by the server process (every user
>which has an account on the webserver can read server
>owned files)
>
>(If you're intrested in the subject I would recommend
>to read full the article:
>http://www.webkreator.com/php/configuration/php-session-security.html)
>
>I have developed some functions to avoid this
>problems. They replace the standard session functions
>(using session_set_save_handler), so you only have to
>include the file at the beggining of your script and
>(afaik) you're safe :)
>
>This is the idea:
>
>Apart from the session cookie, I set another one (with
>the same name and the string '_sec' appended). On this
>cookie I set a random KEY.
>The name of the file which contains the session data
>is the md5 hash of the SID and the KEY together. This
>turns impossible to guess the session id by looking at
>the filenames.
>
>To hide the data inside the file, the serialized
>string is crypted using the KEY as password, so nobody
>can see the content of your user's sessions.
>
>You can find the code here:
>http://www.n3rds.com.ar/files/docs/php_sessions/sess_handler.txt
>
>Im looking for suggestions to make it 100% compatible
>with the standard session functions, and I would like
>to hear some thougts about the idea
>

--- End Message ---
--- Begin Message ---
Hi
I setup Easy php on my PC (windows 98) , I try to use dreamweaver 4.0 to
make borders as it is done with frontpage. I used (SSI ) like that  :
<!--#include virtual="/OnLine/borders/Left/left.htm" -->
but the pb the borders (top , left  and bottom.htm) appears in my
dreamweaver but in local host they don't appear (the local host is apache
1.3.20 )
please can some one help me


______________________________________________________________________________
Pour mieux recevoir vos emails, utilisez un PC plus performant !
Découvrez la nouvelle gamme DELL en exclusivité sur i (france)
http://www.ifrance.com/_reloc/signedell

--- End Message ---
--- Begin Message ---
One of the reasons I chose e-Smith because it runs native PHP and
MySQL servers, and I have a specific PHP application I want to run on
it.  However, I have fallen at the first hurdle by trying to learn how
to drive e-Smith, PHP and MySQL all at the same time.  I need the
following information to set up PHPAuction v.20 and I wondered if
anyone has set up PHPAuction on e-smith or could help steer my in the
right direction...

¦ Step 1  
¦ 
¦ Please select :       [Create new database Use existing database]
¦ Database host :       [               ]
¦ Database name :       [               ]
¦ Database username :   [               ]
¦ Database password :   [               ]
¦ Admin E-Mail :        [[EMAIL PROTECTED]   ]
¦ Site name :           [                       ]
¦ Site URL :            [http://www.privacyx.co.uk/]
    
There is precious little information I can be sure I understand either
in the manual or the text files on this, so any help or guidance would
be much appreciated.

JR.


-- 
James Redfern [The Redfern Organization]
PGP Auto-responder <mailto:[EMAIL PROTECTED]?subject=0xCB81E8E8>
Fingerprint: 6809 FE89 4CEF E76F C6DF  04BF 46DC 58B9 CB81 E8E8

...You always suppress momentary anger at something you deeply and permanently 
hate"--Robert M. Persig
--- End Message ---
--- Begin Message ---
How to ontain data from a group of checkbox using same name?
For example, in a form there're 6 checkboxes and all named as
"Interesting_Area". I know if put a pairs of square brackets at the
end of the name then in php all the values of them can be ontained.
However, for some reason I cannot use square brackets. Please
help me out if anyone know how to do the trick. THanks!

Alex


-- 
---------------------------
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029

--- End Message ---
--- Begin Message ---
Why you can't use square brackets?
"Alex Shi" <[EMAIL PROTECTED]> escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How to ontain data from a group of checkbox using same name?
> For example, in a form there're 6 checkboxes and all named as
> "Interesting_Area". I know if put a pairs of square brackets at the
> end of the name then in php all the values of them can be ontained.
> However, for some reason I cannot use square brackets. Please
> help me out if anyone know how to do the trick. THanks!
>
> Alex
>
>
> --
> ---------------------------
> TrafficBuilder Network:
> http://www.bestadv.net/index.cfm?ref=7029
>


--- End Message ---
--- Begin Message ---
timo stamm wrote:

> Hi Mig,
>
> to create something that behaves more like a true "chat", you
> need an active client side.
> For example, you could let a frame with the PHP be reloaded in a
> short interval.
>
> To create a real chat, you need a socket connection. The best
> solution would be Flash (which has great functions for that).
> Java is another option.
>
> Timo

Hello Timo, thanks very much. I don't know flash, but do you think Flash
5 has this option also?. I read a basic Flash manual and didn't find
some feature for 'sockets' or something else.
For Java, I know a very basic programming of it, I will try study more
of it to understand socket functions.

Thanks all of you for your responses.

Mig


--- End Message ---

Reply via email to