OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general-digest-help_at_lists.php.net
Date: Fri Jan 24 2003 - 01:49:11 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    php-general Digest 24 Jan 2003 07:49:11 -0000 Issue 1841

    Topics (messages 132888 through 132953):

    URLencode issues - halp!
            132888 by: SpyProductions Support Team
            132889 by: rw.xend.net
            132891 by: Chris Shiflett
            132893 by: David T-G

    Re: Using strtotime on 'old' dates.
            132890 by: Joakim Andersson

    Re: Why PHP doesn't work with Apache2?
            132892 by: Richard Baskett
            132895 by: Joseph W. Goff
            132951 by: Evan Nemerson
            132952 by: Richard Ellerbrock

    Re: changing a key in an array
            132894 by: David T-G
            132932 by: John W. Holmes

    Re: Word Count
            132896 by: Maxim Maletsky

    Re: Executing Shell Commands.
            132897 by: Maxim Maletsky
            132904 by: Chris Hewitt

    Re: Page doesn't load..
            132898 by: Maxim Maletsky

    Re: URLencode issues - halp! - code included
            132899 by: SpyProductions Support Team
            132900 by: Leif K-Brooks
            132902 by: SpyProductions Support Team
            132906 by: Chris Shiflett

    php performance
            132901 by: arch
            132903 by: Chris McCluskey
            132940 by: arch
            132941 by: John Wells

    mail() function not working in PHP 4.2.3
            132905 by: Jeff Pauls
            132939 by: Jason Wong

    Re: POST vs GET method
            132907 by: Bob Lockie
            132909 by: Chris Shiflett

    PHP5 - Apache 2.0.44 - perchild mpm
            132908 by: Jochen Kaechelin
            132910 by: Rasmus Lerdorf

    Ecard Senders
            132911 by: Pushpinder Singh Garcha

    Query Reset?
            132912 by: Jed R. Brubaker
            132913 by: Chris Shiflett

    image source from PHP
            132914 by: Karina S
            132915 by: Justin French
            132916 by: Chris Shiflett
            132917 by: Philip Olson

    Minor email problem
            132918 by: Denis L. Menezes
            132919 by: Chris Hayes
            132935 by: John W. Holmes

    Cookies problem
            132920 by: Sabina A. Schneider
            132921 by: Chris Shiflett

    Using PHP with SAPI 5.1 or COM objects
            132922 by: Joseph M. Londa

    AD authentication
            132923 by: Michael Hall
            132924 by: Ray Hunter

    why is mv copying ??
            132925 by: Christian

    Login and sessions?
            132926 by: Pag
            132927 by: Justin French
            132928 by: Chris Shiflett
            132931 by: John W. Holmes

    MySQL Functions Setup
            132929 by: Michael A Smith
            132936 by: Steven Balthazor

    Re: total file size
            132930 by: Victor

    Re: textarea new line
            132933 by: Foong
            132934 by: Foong

    Waiting Lines/Query FTP Server
            132937 by: Mike Bowers
            132938 by: Jason Wong

    Re: Disable pic copy/save?
            132942 by: Uttam

    Who is foo & what is bar?
            132943 by: Uttam
            132945 by: John Wells
            132947 by: Rick Emery

    help me
            132944 by: Amit Gupta

    Strange anomolie with each() and mysql_fetch_array()
            132946 by: Daevid Vincent
            132948 by: Rick Emery

    Re: ? in URLS.
            132949 by: Simon Angell
            132950 by: Martin Towell

    how to verify the available email address
            132953 by: ocean

    Administrivia:

    To subscribe to the digest, e-mail:
            php-general-digest-subscribelists.php.net

    To unsubscribe from the digest, e-mail:
            php-general-digest-unsubscribelists.php.net

    To post to the list, e-mail:
            php-generallists.php.net

    ----------------------------------------------------------------------

    attached mail follows:


    I am having some issues, apparently, with URL encode.

    I've got people signing up for a membership on a site, but some of their
    memberships fail because the username, which in encoded, sometimes goes
    through fine and sometimes does not.

    Are there any special reasons this may happen?

    I decided to use this because people are allowed to use *any* key as part of
    their name, so a name like "rt'$%^*&'rt" is perfectly allowable.

    The strange thing is, more normal names like 'star99' or just 'logmein' are
    failing, but the weirder character typed names are making it through fine.

    Any ideas?

    Oh, and BTW, I do use urldecode(). :)

    Thanks,

    -Mike

    attached mail follows:


    Some code please!

    RW

    Quoting SpyProductions Support Team <supportspyproductions.com>:

    ###
    ### I am having some issues, apparently, with URL encode.
    ###
    ### I've got people signing up for a membership on a site, but some of their
    ### memberships fail because the username, which in encoded, sometimes goes
    ### through fine and sometimes does not.
    ###
    ### Are there any special reasons this may happen?
    ###
    ### I decided to use this because people are allowed to use *any* key as part
    ### of
    ### their name, so a name like "rt'$%^*&'rt" is perfectly allowable.
    ###
    ### The strange thing is, more normal names like 'star99' or just 'logmein'
    ### are
    ### failing, but the weirder character typed names are making it through
    ### fine.
    ###
    ### Any ideas?
    ###
    ### Oh, and BTW, I do use urldecode(). :)
    ###
    ### Thanks,
    ###
    ### -Mike
    ###
    ###
    ###
    ### --
    ### PHP General Mailing List (http://www.php.net/)
    ### To unsubscribe, visit: http://www.php.net/unsub.php
    ###
    ###

    attached mail follows:


    --- SpyProductions Support Team
    <supportspyproductions.com> wrote:
    > I am having some issues, apparently, with URL encode.
    ...
    > Oh, and BTW, I do use urldecode(). :)

    If you are using URL encode in order to pass values on the
    URL (and then reference them as $_GET['blah']), then URL
    decoding is superfluous and can cause problems.

    Some code or more details would be nice, as the other
    poster suggested. As it is, we have no idea why you are
    using URL encoding, so we have no idea what is not working
    for you.

    Chris

    attached mail follows:


    Mike --

    ...and then SpyProductions Support Team said...
    %
    % I am having some issues, apparently, with URL encode.
    ...
    %
    % I decided to use this because people are allowed to use *any* key as part of
    % their name, so a name like "rt'$%^*&'rt" is perfectly allowable.

    Makes sense, but I'd use base64_encode (with base64_decode, of course)
    rather than urlencode; it will properly shield everything. No, I don't
    know why 'normal' names fail and goofy ones don't; without some code and
    some specific examples we can't really tell too well :-)

    HTH & HAND

    :-D

    -- 
    David T-G                      * There is too much animal courage in 
    (play) davidtgjustpickone.org * society and not sufficient moral courage.
    (work) davidtgworkjustpickone.org  -- Mary Baker Eddy, "Science and Health"
    http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
    

    -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD)

    iD8DBQE+MFDtGb7uCXufRwARAqbLAJ4zgiwkpIElL2b+w9H5jEkcQ7dF/wCgsTiC 3WrV2CeI8qKDpXELmj9/FDQ= =ZPlU -----END PGP SIGNATURE-----

    attached mail follows:


    Nathan Fritz wrote: > We're running into the same problem. It was quite convenient to use > date("Y-m-d",strtotime($dateField)) to process date data for MySQL. Worked > fine for my news management system, since I work with current dates, but my > colleague is using it for an application submission system, and needs > birthdates and such from before 1970. > > Are there other functions that can do the same kind of textual date > conversions?

    Is your colleague running on Windows? I came across this problem today and scripts running fine on Linux and FreeBSD failed on Windows when feeding dates pre-1970 to strtotime().

    I then found this post among PHP's bug reports: http://bugs.php.net/bug.php?id=14313

    Regards Joakim Andersson

    attached mail follows:


    Ok I am hearing a bad rumor that Red Hat 8.0 and the Mac xserve both come with Apache 2.. now is this a rumor or is this true?

    If it's true.. why? And does anybody have any experience in uninstalling Apache 2 on the xserve and does it break anything?

    Cheers!

    Rick

    Don't walk in front of me, I may not follow, Don't walk behind me, I may not lead, Just walk beside me, and be my friend. - Unknown

    > From: Tim Thorburn <immortalnwconx.net> > Date: Thu, 23 Jan 2003 05:03:00 -0500 > To: php-generallists.php.net > Subject: Re: [PHP] Why PHP doesn't work with Apache2? > > Just to add a little fuel to the fire, the only way I've seen or been able > to get PHP and Apache 2 working together is by installing each from my Red > Hat 8.0 CD's. When I tried to compile each together, I got many an error. > > When I start doing some actually web work on my testing server, I imagine > I'll uninstall Apache 2, and go with some version of 1.3 > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >

    attached mail follows:


    Well, I don't know about trying to uninstall it, but RH8.0 does come with Apache 2 It works fine and I have not ran into a reason why I should use the older version for this. Granted I only use it for testing, my live server is RH7.2 which uses Apache 1 ----- Original Message ----- From: "Richard Baskett" <rickbaskettcase.com> To: "PHP General" <php-generallists.php.net> Sent: Thursday, January 23, 2003 2:28 PM Subject: Re: [PHP] Why PHP doesn't work with Apache2?

    > Ok I am hearing a bad rumor that Red Hat 8.0 and the Mac xserve both come > with Apache 2.. now is this a rumor or is this true? > > If it's true.. why? And does anybody have any experience in uninstalling > Apache 2 on the xserve and does it break anything? > > Cheers! > > Rick > > Don't walk in front of me, I may not follow, Don't walk behind me, I may not > lead, Just walk beside me, and be my friend. - Unknown > > > From: Tim Thorburn <immortalnwconx.net> > > Date: Thu, 23 Jan 2003 05:03:00 -0500 > > To: php-generallists.php.net > > Subject: Re: [PHP] Why PHP doesn't work with Apache2? > > > > Just to add a little fuel to the fire, the only way I've seen or been able > > to get PHP and Apache 2 working together is by installing each from my Red > > Hat 8.0 CD's. When I tried to compile each together, I got many an error. > > > > When I start doing some actually web work on my testing server, I imagine > > I'll uninstall Apache 2, and go with some version of 1.3 > > > > > > > > -- > > 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 >

    attached mail follows:


    Albert Camus. Your sig has a quote attributed to "unknown". It was Albert Camus.

    Don't walk in front of me, I may not follow, Don't walk behind me, I may not lead, Just walk beside me, and be my friend. -Albert Camus

    On Thursday 23 January 2003 12:28 pm, Richard Baskett wrote: > Ok I am hearing a bad rumor that Red Hat 8.0 and the Mac xserve both come > with Apache 2.. now is this a rumor or is this true? > > If it's true.. why? And does anybody have any experience in uninstalling > Apache 2 on the xserve and does it break anything? > > Cheers! > > Rick > > Don't walk in front of me, I may not follow, Don't walk behind me, I may > not lead, Just walk beside me, and be my friend. - Unknown > > > From: Tim Thorburn <immortalnwconx.net> > > Date: Thu, 23 Jan 2003 05:03:00 -0500 > > To: php-generallists.php.net > > Subject: Re: [PHP] Why PHP doesn't work with Apache2? > > > > Just to add a little fuel to the fire, the only way I've seen or been > > able to get PHP and Apache 2 working together is by installing each from > > my Red Hat 8.0 CD's. When I tried to compile each together, I got many > > an error. > > > > When I start doing some actually web work on my testing server, I imagine > > I'll uninstall Apache 2, and go with some version of 1.3 > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    On Thu, 23 Jan 2003 12:28:21 -0800, Richard Baskett wrote:

    > Ok I am hearing a bad rumor that Red Hat 8.0 and the Mac xserve both come > with Apache 2.. now is this a rumor or is this true? > > If it's true.. why? And does anybody have any experience in uninstalling > Apache 2 on the xserve and does it break anything? > > Cheers! > > Rick > > Don't walk in front of me, I may not follow, Don't walk behind me, I may not > lead, Just walk beside me, and be my friend. - Unknown > >> From: Tim Thorburn <immortalnwconx.net> >> Date: Thu, 23 Jan 2003 05:03:00 -0500 >> To: php-generallists.php.net >> Subject: Re: [PHP] Why PHP doesn't work with Apache2? >> >> Just to add a little fuel to the fire, the only way I've seen or been able >> to get PHP and Apache 2 working together is by installing each from my Red >> Hat 8.0 CD's. When I tried to compile each together, I got many an error. >> >> When I start doing some actually web work on my testing server, I imagine >> I'll uninstall Apache 2, and go with some version of 1.3

    I also uninstalled apache 2 from Redhat 8.0. Just go and grab the latest apache 1.3 source rpm from 7.3, rebuild the rpm and install that. Works like a charm. I could also never get php to build against Apache2 on Redhat 8.0.

    http://iptrack.sourceforge.net

    attached mail follows:


    Chris --

    ...and then Chris Boget said... % % > So I'm back to the beginning and to funky array wrappers again... I % > think these surfers will just see their baskets in different order after % > a rename :-) % % Of course, if you display the baskets in alpha order by name, it won't

    True enough, and I've thought about that, too, but I'd like to keep it in the original order if possible. Now that I've pretty much decided that that's not going to happen, I'll probably sort :-)

    % be too much of a shock to them when they are displayed in a different % order after rename. :p

    Probably not :-)

    % Just a through.

    Thanks; they all help.

    % % Chris

    HAND

    :-D

    -- 
    David T-G                      * There is too much animal courage in 
    (play) davidtgjustpickone.org * society and not sufficient moral courage.
    (work) davidtgworkjustpickone.org  -- Mary Baker Eddy, "Science and Health"
    http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
    

    -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD)

    iD8DBQE+MFKDGb7uCXufRwARAk9cAKCxRW7S2bZy1QSiQDkDsgjrry+57QCbBFRn YTqxnUEu7opP5ckulfuLvHU= =npCR -----END PGP SIGNATURE-----

    attached mail follows:


    Why do I have the feeling this problem is like spending $20,000 to get a rusted out Gremlin (it's a car, a crappy one) to be able to go 5 mph (a speed, similar to kph) downhill, when you could just buy a nice shiny brand new Kia, if you have a job, if you have $99, and if you WANT A NEW CAR! (not that I would be caught dead in a foreign car)

    References in parenthesis added for you foreigners... or because I'm a foreigner to you, I guess... :)

    ---John W. Holmes...

    PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

    > -----Original Message----- > From: David T-G [mailto:davidtg-phpjustpickone.org] > Sent: Thursday, January 23, 2003 3:37 PM > To: PHP General list > Cc: Chris Boget > Subject: Re: [PHP] changing a key in an array > > Chris -- > > ...and then Chris Boget said... > % > % > So I'm back to the beginning and to funky array wrappers again... I > % > think these surfers will just see their baskets in different order > after > % > a rename :-) > % > % Of course, if you display the baskets in alpha order by name, it won't > > True enough, and I've thought about that, too, but I'd like to keep it in > the original order if possible. Now that I've pretty much decided that > that's not going to happen, I'll probably sort :-) > > > % be too much of a shock to them when they are displayed in a different > % order after rename. :p > > Probably not :-) > > > % Just a through. > > Thanks; they all help. > > > % > % Chris > > > HAND > > :-D > -- > David T-G * There is too much animal courage in > (play) davidtgjustpickone.org * society and not sufficient moral courage. > (work) davidtgworkjustpickone.org -- Mary Baker Eddy, "Science and > Health" > http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

    attached mail follows:


    words, for a programming language, are nothing more than just the spaces. So, as previousely was shown - could the mount of spaces in the string to get the amount of `words' in between them.

    --
    Maxim Maletsky
    maximphp.net
    

    "Craig" <craigsitedesign.net> wrote... :

    > Is there a way to count the number of words in a string? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Use the execution operator backtricks (``)

    <?php echo '<pre>'; echo `ls -la`; ?>

    will throw you the shell's ls -la to the browser

    --
    Maxim Maletsky
    maximphp.net
    

    scott <ScottLinuxmn.rr.com> wrote... :

    > Hello, > > Does anybody know how to execute a shell command from PHP on a Linux > system? > > Thanks, > Scott > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    scott wrote:

    >Thanks Chris, > >Could you explain to me how to launch a program from PHP as >another user, such as root? The app that I am trying to launch, apache >does not have rights to. And, it would be to complex of a procedure to >change the ownership on all of the processes that go with it. > The ownership problem is one to consider security on carefully. The way I overcome the few scripts that need to be run as another user is to put them into my /etc/sudoers file ("man sudoers") for the file format, then execute "sudo script_name" ("man sudo" for details).

    This way, only the scripts that need to be run as another user can be done. Security is much better than trying to change the webserver user. If you are on a shared server, note that not all hosting companies allow this.

    Maybe others do it differently?

    Regards

    Chris

    attached mail follows:


    Guess what, if you'll try another browser the whole thing will work :) This is IE's problem

    --
    Maxim Maletsky
    maximphp.net
    

    Marek Kilimajer <kilimajerwebglobe.sk> wrote... :

    > Do you get the message from apache? If so, check apache logs. If it is > the exploder's default error page, turn user friendly messages off (in > IE), or try another browser > > Borut Kovacec wrote: > > >Hello .. > > > >I don't know if this is the right question for this mailing list .. but I'm having some problems with loading some php pages, localy on my computer (win XP, apache 1.3,Mysql) .. > > > >The prioblem is that certain page doesnt load ... I get "The page doesn't exist" message .. but it's there... > >And then if I press refresh button couple of times, then sometimes it works .. but if I hit refresh aggain it doesn't work aggain... > > > >Would anybody maybe have an idea of what could be wrong? > > > >Thanx in advance > >B. > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Here is some code:

    From a form, I get username as $name and it goes to the processing file for the form, where a sale happens and it sends the code to a different server like this:

    $data = urlencode($name); print "<META HTTP-EQUIV='refresh' CONTENT='0;URL=http://somedestination.php?name=$data'>";

    That server then processes the person and puts them into the MySQL - but if the name is bad, it errors out and stops the script:

    $name = urldecode($name); if(!$name) { print "You entered an invalid name. Please stop and call us at...."; } else { Inserts record into database. }

    That's it. It doesn't seem to matter what the name entered is; there is no rhyme or reason (seemingly) to the names it fails on (as per my previous post).

    urlencode may just be a flaky thing to use? Perhaps depending on the browser?

    Thanks,

    -Mike

    > -----Original Message----- > From: David T-G [mailto:davidtg-phpjustpickone.org] > Sent: Thursday, January 23, 2003 3:31 PM > To: PHP General list > Cc: SpyProductions Support Team > Subject: Re: [PHP] URLencode issues - halp! > > > Mike -- > > ...and then SpyProductions Support Team said... > % > % I am having some issues, apparently, with URL encode. > ... > % > % I decided to use this because people are allowed to use *any* > key as part of > % their name, so a name like "rt'$%^*&'rt" is perfectly allowable. > > Makes sense, but I'd use base64_encode (with base64_decode, of course) > rather than urlencode; it will properly shield everything. No, I don't > know why 'normal' names fail and goofy ones don't; without some code and > some specific examples we can't really tell too well :-) > > > HTH & HAND > > :-D > -- > David T-G * There is too much animal courage in > (play) davidtgjustpickone.org * society and not sufficient moral courage. > (work) davidtgworkjustpickone.org -- Mary Baker Eddy, "Science > and Health" > http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! > >

    attached mail follows:


    Take the

    $name = urldecode($name);

    bit out. The decoding is all handled by PHP before your script runs. Also, you should look into using $_GET['name'] instead of $name.

    SpyProductions Support Team wrote:

    >Here is some code: > >>From a form, I get username as $name and it goes to the processing file for >the form, where a sale happens and it sends the code to a different server >like this: > > >$data = urlencode($name); >print "<META HTTP-EQUIV='refresh' >CONTENT='0;URL=http://somedestination.php?name=$data'>"; > > > >That server then processes the person and puts them into the MySQL - but if >the name is bad, it errors out and stops the script: > >$name = urldecode($name); >if(!$name) { print "You entered an invalid name. Please stop and call us >at...."; } >else { Inserts record into database. } > > > >That's it. It doesn't seem to matter what the name entered is; there is no >rhyme or reason (seemingly) to the names it fails on (as per my previous >post). > >urlencode may just be a flaky thing to use? Perhaps depending on the >browser? > >Thanks, > >-Mike > > > > > > > > > >>-----Original Message----- >>From: David T-G [mailto:davidtg-phpjustpickone.org] >>Sent: Thursday, January 23, 2003 3:31 PM >>To: PHP General list >>Cc: SpyProductions Support Team >>Subject: Re: [PHP] URLencode issues - halp! >> >> >>Mike -- >> >>...and then SpyProductions Support Team said... >>% >>% I am having some issues, apparently, with URL encode. >>... >>% >>% I decided to use this because people are allowed to use *any* >>key as part of >>% their name, so a name like "rt'$%^*&'rt" is perfectly allowable. >> >>Makes sense, but I'd use base64_encode (with base64_decode, of course) >>rather than urlencode; it will properly shield everything. No, I don't >>know why 'normal' names fail and goofy ones don't; without some code and >>some specific examples we can't really tell too well :-) >> >> >>HTH & HAND >> >>:-D >>-- >>David T-G * There is too much animal courage in >>(play) davidtgjustpickone.org * society and not sufficient moral courage. >>(work) davidtgworkjustpickone.org -- Mary Baker Eddy, "Science >>and Health" >>http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! >> >> >> >> > > > > >

    -- 
    The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.
    

    attached mail follows:


    So what is the decode part for then? Earlier versions of PHP?

    :)

    Thanks,

    -Mike

    -----Original Message----- From: Leif K-Brooks [mailto:eurleifbuyer-brokerage.com] Sent: Thursday, January 23, 2003 4:43 PM To: supportspyproductions.com Cc: php-generallists.php.net Subject: Re: [PHP] URLencode issues - halp! - code included

    Take the $name = urldecode($name);bit out. The decoding is all handled by PHP before your script runs. Also, you should look into using $_GET['name'] instead of $name.

    SpyProductions Support Team wrote:

    Here is some code:

    >From a form, I get username as $name and it goes to the processing file for the form, where a sale happens and it sends the code to a different server like this:

    $data = urlencode($name); print "<META HTTP-EQUIV='refresh' CONTENT='0;URL=http://somedestination.php?name=$data'>";

    That server then processes the person and puts them into the MySQL - but if the name is bad, it errors out and stops the script:

    $name = urldecode($name); if(!$name) { print "You entered an invalid name. Please stop and call us at...."; } else { Inserts record into database. }

    That's it. It doesn't seem to matter what the name entered is; there is no rhyme or reason (seemingly) to the names it fails on (as per my previous post).

    urlencode may just be a flaky thing to use? Perhaps depending on the browser?

    Thanks,

    -Mike

    -----Original Message----- From: David T-G [mailto:davidtg-phpjustpickone.org] Sent: Thursday, January 23, 2003 3:31 PM To: PHP General list Cc: SpyProductions Support Team Subject: Re: [PHP] URLencode issues - halp!

    Mike --

    ...and then SpyProductions Support Team said... % % I am having some issues, apparently, with URL encode. ... % % I decided to use this because people are allowed to use *any* key as part of % their name, so a name like "rt'$%^*&'rt" is perfectly allowable.

    Makes sense, but I'd use base64_encode (with base64_decode, of course) rather than urlencode; it will properly shield everything. No, I don't know why 'normal' names fail and goofy ones don't; without some code and some specific examples we can't really tell too well :-)

    HTH & HAND

    :-D

    --
    David T-G                      * There is too much animal courage in
    (play) davidtgjustpickone.org * society and not sufficient moral courage.
    (work) davidtgworkjustpickone.org  -- Mary Baker Eddy, "Science
    and Health"
    http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
    

    -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.

    attached mail follows:


    --- SpyProductions Support Team <supportspyproductions.com> wrote: > So what is the decode part for then? Earlier versions of > PHP?

    No, it is for decoding URL-encoded strings, just as you would expect.

    The reason you do not need to decode URL variables is because they are not URL-encoded by the time your script executes.

    Chris

    attached mail follows:


    I'm running php4 on apache on linux. I'm having performance problems with php getting data from the mysql database. With one user at a given instant, performance is fine, even with the massive size of the data table. But when do very rudimentary load testing (basically, opening a few browser and performing the same requests), the performance is awful. I suppose the issue is with mysql, but I can't be sure.

    What are some solutions to performance issues such as these? I've already done mysql indexing, which is how I got the current level of performance. But again, performance is unsatisfactory with just a few simultaneous requests.

    Thanks in advance.

    attached mail follows:


    I'm going to ask the really stupid question... Is mysql, php, apache running on the same box as the box you are using to test from?

    -Chris

    -----Original Message----- From: arch [mailto:archspyre.net] Sent: Thursday, January 23, 2003 1:42 PM To: php-generallists.php.net Subject: [PHP] php performance

    I'm running php4 on apache on linux. I'm having performance problems with php getting data from the mysql database. With one user at a given instant, performance is fine, even with the massive size of the data table. But when do very rudimentary load testing (basically, opening a few browser and performing the same requests), the performance is awful. I suppose the issue is with mysql, but I can't be sure.

    What are some solutions to performance issues such as these? I've already done mysql indexing, which is how I got the current level of performance. But again, performance is unsatisfactory with just a few simultaneous requests.

    Thanks in advance.

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

    attached mail follows:


    Nope. It's tested with a typical client/server setup, as in a real use case.

    "Chris McCluskey" <chrismodulusgroup.com> wrote in message news:92BC9A90F2D7FD41AD97761F7E522C28234D1Bnx-enterprise.modulusgroup.com.. . I'm going to ask the really stupid question... Is mysql, php, apache running on the same box as the box you are using to test from?

    -Chris

    -----Original Message----- From: arch [mailto:archspyre.net] Sent: Thursday, January 23, 2003 1:42 PM To: php-generallists.php.net Subject: [PHP] php performance

    I'm running php4 on apache on linux. I'm having performance problems with php getting data from the mysql database. With one user at a given instant, performance is fine, even with the massive size of the data table. But when do very rudimentary load testing (basically, opening a few browser and performing the same requests), the performance is awful. I suppose the issue is with mysql, but I can't be sure.

    What are some solutions to performance issues such as these? I've already done mysql indexing, which is how I got the current level of performance. But again, performance is unsatisfactory with just a few simultaneous requests.

    Thanks in advance.

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

    attached mail follows:


    Chris,

    Can we see your test code?

    John

    arch said: > Nope. It's tested with a typical client/server setup, as in a real use > case. > > > "Chris McCluskey" <chrismodulusgroup.com> wrote in message > news:92BC9A90F2D7FD41AD97761F7E522C28234D1Bnx-enterprise.modulusgroup.com.. > . > I'm going to ask the really stupid question... Is mysql, php, apache > running on the same box as the box you are using to test from? > > -Chris > > -----Original Message----- > From: arch [mailto:archspyre.net] > Sent: Thursday, January 23, 2003 1:42 PM > To: php-generallists.php.net > Subject: [PHP] php performance > > > I'm running php4 on apache on linux. I'm having performance problems > with php getting data from the mysql database. With one user at a given > instant, performance is fine, even with the massive size of the data > table. But when do very rudimentary load testing (basically, opening a > few browser and performing the same requests), the performance is awful. > I suppose the issue is with mysql, but I can't be sure. > > What are some solutions to performance issues such as these? I've > already done mysql indexing, which is how I got the current level of > performance. But again, performance is unsatisfactory with just a few > simultaneous requests. > > Thanks in advance. > > > > -- > 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

    attached mail follows:


    Hi, I have a simple mail script and when I run the script I get the following error:

    Warning: mail() is not supported in this PHP build in /var/www/htdocs/file.php on line 159

    I've checked the php.ini file to see if a setting was turned off, but came up with nothing except for:

    ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ;sendmail_path =

    If the server that I'm working on is using QMAIL for it's email do I have to change a setting somewhere? Or does mail() not work in version 4.2.3?

    Any help would be great. Thanks,

    Jeff

    attached mail follows:


    On Friday 24 January 2003 06:09, Jeff Pauls wrote: > I have a simple mail script and when I run the script I get the following > error: > > Warning: mail() is not supported in this PHP build in

    Try searching the archives using the above message. It's topic that has been covered quite a number of times before.

    > If the server that I'm working on is using QMAIL for it's email do I have > to change a setting somewhere?

    Make sure you have linked/copied the qmail supplied sendmail wrapper to somewhere where php can find it.

    > Or does mail() not work in version 4.2.3?

    It does.

    -- 
    Jason Wong -> Gremlins Associates -> www.gremlins.biz
    Open Source Software Systems Integrators
    * Web Design & Hosting * Internet & Intranet Applications Development *
    

    /* Horner's Five Thumb Postulate: Experience varies directly with equipment ruined. */

    attached mail follows:


    On 01/22/03 23:22 John W. Holmes spoke thusly

    >Pretty sure this is an Apache2/PHP bug. It was discussed on here in the >past few days. > > I tried Apache 2.0.44 and PHP 4.3 and it still doesn't work. :-(

    >---John W. Holmes... > >PHP Architect - A monthly magazine for PHP Professionals. Get your copy >today. http://www.phparch.com/ > > >>-----Original Message----- >>From: Bob Lockie [mailto:bjlockielockie.ca] >>Sent: Wednesday, January 22, 2003 10:33 PM >>To: php-general Mailing List >>Subject: [PHP] POST vs GET method >> >> PHP Version 4.3.0 >> >> Apache 2.0.43 >> >>I am having a problem with a post method. >> >>GET method: >>_REQUEST['name']=value >>_GET['name']=value >>_POST['name']= >> >>POST method: >>_REQUEST['name']=valuename=value >>_GET['name']= >>_POST['name']=valuename=value >> >>I assumed that by using _REQUEST that I could use either a POST or GET >>method on the form. >>I can't, so does this seem right? >>The extra name=value seems like it shouldn't be there. >>

    -- 
    ----------------------------------------
    Sent from Mozilla and GNU/Linux.
    Powered by an AMD processor.
    

    attached mail follows:


    --- Bob Lockie <bjlockielockie.ca> wrote: > On 01/22/03 23:22 John W. Holmes spoke thusly > > > Pretty sure this is an Apache2/PHP bug. It was > > discussed on here in the past few days. > > > > I tried Apache 2.0.44 and PHP 4.3 and it still doesn't > work. :-(

    Apache 2.0.44 == Apache2

    Chris

    attached mail follows:


    Will this combination work? It would be great if we could use this combination for testing only til the big brothers apache and php work fine with perchild.

    -- 
    Jochen Kaechelin
    

    attached mail follows:


    > Will this combination work? > It would be great if we could use this combination for testing only > til the big brothers apache and php work fine with perchild.

    Perchild alone doesn't work at this point, so no, perchild+PHP won't work.

    -Rasmus

    attached mail follows:


    Hello there,

    I am looking around for some E card senders based on PHP and MySQL . Duz anyone have any ideas which I should use.? Please let me know... I really appreciate it,

    best Pushpinder

    attached mail follows:


    I am having a problem with reseting my query results. I want to take $results and have it spit it out line by line - but twice. I have found that after the first time through, it just spits out 15 (in this case) more blank lines.

    Any help? (My code is below) ------------------------------------ This code is to create an HTML drop down list of the results.

    Here is the function to display the box - it works fine:

    class display { function form_dropdown ($list_array, $name) { // default name code if (!isset($name)) { $name = "default"; }

    $database = new database; $rows = $database->rows($list_array);

    $field_name = mysql_field_name($list_array, 0);

    ?> <select name="<? echo $name; ?>"> <option>Select One</option> <?

    for ($i=0; $i <$rows; $i++) { $row = mysql_fetch_array($list_array); echo "<option>".$row[$field_name]."</option>"; }

    ?></select><? } }

    Here is the query and call script:

    $query = "SELECT username FROM `user` ORDER BY username ASC";

    // These three lines connect to the database, run the query, and get a row tally. $database = new database; $result = $database->query($query); $result_row = $database->rows($result);

    ?><form name="User Select" method="post" action="transcriptlist.php"><?

    $display = new display;

    // First drop down - WORKS echo "User1"; $name = "User1"; $display->form_dropdown($result, $name); echo "<br>";

    // Second drop down - ONLY BLANK LINES! echo "User2"; $name = "User2"; $display->form_dropdown($result, $name);

    attached mail follows:


    --- "Jed R. Brubaker" <jed.brubakerpsych.utah.edu> wrote: > I am having a problem with reseting my query results. I > want to take $results and have it spit it out line by > line - but twice.

    http://www.php.net/manual/en/function.mysql-data-seek.php

    Chris

    attached mail follows:


    Hello,

    I want to make a sit where an image comes from a database. In the db I store only the filename and path. I have the following code: <?php $ps = '"Pic/'.$row_photos['Photo_File_Name'].'"'; echo $ps;?>

    <img src=<?php $ps; ?> >

    The echo line print the good string e.g.: "Pic/Myphoto.jpeg" But I can't see the image. Only a one small whit box wit red x (no image).

    And if I try to put with hard code: <img src "Pic/Myphoto.jpeg" > It works fine.

    What can I do?

    Thanks!

    attached mail follows:


    can you copy & paste a little bit of the HTML source of what you're doing?

    justin

    on 24/01/03 10:05 AM, Karina S (bali1afreemail.hu) wrote:

    > Hello, > > I want to make a sit where an image comes from a database. In the db I store > only the filename and path. I have the following code: > <?php $ps = '"Pic/'.$row_photos['Photo_File_Name'].'"'; > echo $ps;?> > > <img src=<?php $ps; ?> > > > The echo line print the good string e.g.: "Pic/Myphoto.jpeg" > But I can't see the image. Only a one small whit box wit red x (no image). > > And if I try to put with hard code: <img src "Pic/Myphoto.jpeg" > It works > fine. > > What can I do? > > Thanks! > >

    attached mail follows:


    --- Karina S <bali1afreemail.hu> wrote: > <img src=<?php $ps; ?> >

    Try this instead:

    <img src="<? echo $ps; ?>">

    Chris

    attached mail follows:


    > <img src=<?php $ps; ?> >

    <img src="<?php echo $ps; ?>">

    Regards, Philip

    attached mail follows:


    hello friends,

    I am hosted with an ISP called Apexon. I have written php scripts to send mail from a webpage. When I send this mail, the from address becomes abcdeapexon3.abac.com . Their website says that the variable sendmail_from is meapexon.com . I want to force my own from address in this. I also want to change the sender's name to my name rather than my website name.

    I have tried many ways, but not successful. Can someone help me?

    Please help.

    Thanks denis

    attached mail follows:


    At 00:48 24-1-2003, you wrote: >hello friends, > >I am hosted with an ISP called Apexon. I have written php scripts to send >mail from a webpage. When I send this mail, the from address >becomes abcdeapexon3.abac.com . Their website says that the variable >sendmail_from is meapexon.com . I want to force my own from address in >this. I also want to change the sender's name to my name rather than my >website name. > >I have tried many ways, but not successful. Can someone help me? Did you try to add the values to the 'extra headers' parameter?

    Some ISPs restrict what you can change in mail().

    In that case i'm afraid you need to find another SMTP server. You cannot set the default SMTP server in php.ini because that is obviously under control by the ISP. I did not try but i think there must be ways to change the SMTP in a .htaccess file. But .htaccess is not allowed by every ISP. So maybe you need your own mail function. Such things could be available on script libraries.

    I think a good start would be to read the user annotations in the online PHP manual on www.php.net.

    Chris H

    attached mail follows:


    > I am hosted with an ISP called Apexon. I have written php scripts to send > mail from a webpage. When I send this mail, the from address becomes > abcdeapexon3.abac.com . Their website says that the variable > sendmail_from is meapexon.com . I want to force my own from address in > this. I also want to change the sender's name to my name rather than my > website name.

    Spend some time to read the manual page on the mail() function, please. All of this is covered in great detail. Make sure you're reading the version which has user comments in it. Thanks.

    ---John W. Holmes...

    PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

    attached mail follows:


    PHP general list I don't want to take much time, but I'm still having problems with cookies and I want to know if somebody could help my solve them. First of all I tried to put the cookie Path to the different pages, but didin't function. What's more.... I don't know what to put in cookieDomain... it should be my server name, no? But doesn't function... I want to do the following: first the user enters a page and if he/ she doesn't have a cookie so I can recognize him/ her, I display a form so the user can complete it with his/ her data. In that page I put the cookie in his/ her computer, so the other time he/ she comes to the page, I can recognize him/ her. The problem is that the variable $_COOKIE is not set in the page after the page that has the setcookie function and niether the first page of the site where I check if there is the cookie in the client. I have a directory structure with the pages:

    page1/ --> here is the first page, where I check if the client has the cookie. page2/ ---> here is the page with the form, in case is the first time the user enter the site. page3/ ---> here is a page where I put the users data in the database and the cookie in the client.

    The question is.... what sould I put in the $cookiePath variable? which directory?? Another problem is that when I set the domain to the cookie, in the page appears a window message that asks me if I accept the cookie or not, because is from an unknown domain.... What sould I put in the cookie expiration time if I want it the last for ever (until the user delets it...)?

    Thanks a lot for the help I've allways recieved from the list and I hope you can help me a bit, because it's a complete day I'm with this cookies and I'm going desespperate without a solution :-( Thank you very much for your time and help once again.

    Sabina Alejandra Schneider. sabinaschneidertutopia.com

    attached mail follows:


    --- "Sabina A. Schneider" <sabinaschneidertutopia.com> wrote: > I don't want to take much time, but I'm > still having problems with cookies

    Sabina,

    First, to answer your question of path, you should start with / as it is the least restrictive. You can always try restricting cookies per directory later, but it is best to just use that until you get things working.

    As for date, there is no way to make a cookie last forever. In fact, I am pretty sure (but don't feel like looking it up) that there is a maximum lifetime of a cookie in the specification - two years comes to mind, but it might be shorter. The only three options you have are:

    1. No date - this makes it a session cookies that expires as soon as the browser session ends (all instances of the browser terminate). 2. Set a date to the current date or a date in the past - This effectively deletes a cookie. 3. Set a date in the future - This indicates the lifetime of the cookie.

    As a really simple test, try this:

    page1.php: ---------- <? header("Set-Cookie: foo=bar); ?> <a href="page2.php">

    page2.php: ---------- <pre> <? print_r($_COOKIE); ?> </pre>

    If you don't see anything on page 2, either your browser did not supply the cookie, or your version of PHP is too old to have the $_COOKIE superglobal.

    Hope that helps.

    Chris

    attached mail follows:


    I have reached the end of my research and reading and I am stuck. Can anyone help me understand why I am not able to SET the voice of my choice with the following PHP code? Everything else works just fine.

    I should say that I am a novice at both PHP and SAPI so please excuse my simplistic approach on all of this.

    Here is the PHP 4.3 code using Apache 2.0.43 on a W2K server.

    // This instantiates the object $VoiceObj = new COM("SAPI.SpVoice") or die("Unable to instantiate SAPI");

    // Gets the available voices and prints them $VoicesToken=$VoiceObj->GetVoices(); $NumberofVoices=$VoicesToken->Count; For ($i=0;$i<$NumberofVoices;$i++) { $VoiceToken=$VoicesToken->Item($i); $VoiceName[$i]=$VoiceToken->GetDescription(); print "$VoiceName[$i]................Item Number: $i </br>"; }

    // Gets and prints the id of the specified voice $SelectedVoiceToken=$VoicesToken->Item(1); $SelectedVoiceTokenid=$SelectedVoiceToken->id; print "$SelectedVoiceTokenid</br>";

    // Tries to Sets the voice $VoiceObj->Voice=$SelectedVoiceToken; $VoiceName=$VoiceObj->Voice->GetDescription(); print "$VoiceName</br>";

    // This changes the rate of the selected voice $VoiceObj->Rate = "0";

    $VoiceObj->Speak("Hello, welcome to my website");

    unset($VoiceObj);

    The result is.......

    Microsoft Mary................Item Number: 0 ATT DTNV 1.3 Crystal16................Item Number: 1 ATT DTNV 1.3 Mike................Item Number: 2 LH Michael................Item Number: 3 LH Michelle................Item Number: 4 ATT DTNV 1.3 Crystal................Item Number: 5 Microsoft Mike................Item Number: 6 Microsoft Sam................Item Number: 7 Sample TTS Voice................Item Number: 8 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\ATT-DT-13-Crystal 16

    Warning: main(): PropPut() failed: Member not found. in C:\talk.php on line 59

    Microsoft Mary

    Is my problem with the code or my understanding of SAPI 5.1?

    Joe londajmrcn.com

    attached mail follows:


    -- 
    

    I was wondering if anyone had any experience, suggestions, advice or pointers regarding the use of Win 2000 Active Directory servers to authenticate users in PHP scripts hosted on Linux. Are PHP's LDAP functions of use here?

    TIA Mick

    ---------------------------------------------------- MICHAEL HALL Web Development Officer Batchelor Institute of Indigenous Tertiary Education W: mick.hallnt.gov.au (08) 8951 8352 H: nintininti.com (08) 8953 1442 ----------------------------------------------------

    attached mail follows:


    Yes,

    I have used php-ldap to connect to exchange for authentication...

    --
    Ray
    

    On Thu, 2003-01-23 at 17:52, Michael Hall wrote: > -- > > I was wondering if anyone had any experience, suggestions, advice or pointers > regarding the use of Win 2000 Active Directory servers to authenticate users in > PHP scripts hosted on Linux. Are PHP's LDAP functions of use here? > > TIA > Mick > > > ---------------------------------------------------- > MICHAEL HALL Web Development Officer > Batchelor Institute of Indigenous Tertiary Education > W: mick.hallnt.gov.au (08) 8951 8352 > H: nintininti.com (08) 8953 1442 > ----------------------------------------------------

    attached mail follows:


    Hi all,

    Any idea why when I execute 'mv' in a php script the file is copied not moved?

    Apache is a member of the group which owns the file and has wrx permissions.

    Thanx, Christian

    attached mail follows:


    Hi,

    I am trying to add a "login" functionality to my new manager. A simple username/password functionality, so that the user logs in and everything he does inside the site will have his name. I mean, if he wants to create a new entry on the database, the field "name" wont have to be filled, etc. Anyway, i dont have a clue to where to start. Tried to search the net but i dont even know the keywords to search for. Could you guys please put me in the good path? Heres where i got so far:

    Have a table on a mysql database named USERS, with "name", password" "address", etc on it. What do i use to authenticate the user on my site? Sessions? If so, the steps i need to solve the problem are, user logs in, the server keeps his personal variables in "memory" so everytime they are needed for some form or whatever, the server fills the fields automatically.

    How can i have several users "logged on" and then have like a box on the site displaying who and how many users are logged in? Sorry for the messed up explanation, but i really dont know what do do about it. Thanks.

    Pag

    attached mail follows:


    Start here http://www.WebmasterBase.com/article/319

    Sure, it isn't perfect, and doesn't do everything you want it to do (and it currently relies in register_globals ON), but I found it educating, and formed the basis of my own user/admin/clearance/membership/session management system which I use on EVERY project.

    Worth a read, even just to understand the theories.

    Justin

    on 24/01/03 12:17 PM, Pag (dantemail.telepac.pt) wrote:

    > > Hi, > > I am trying to add a "login" functionality to my new manager. A simple > username/password functionality, so that the user logs in and everything he > does inside the site will have his name. I mean, if he wants to create a > new entry on the database, the field "name" wont have to be filled, etc. > Anyway, i dont have a clue to where to start. Tried to search the net but > i dont even know the keywords to search for. Could you guys please put me > in the good path? > Heres where i got so far: > > Have a table on a mysql database named USERS, with "name", password" > "address", etc on it. > What do i use to authenticate the user on my site? Sessions? If so, the > steps i need to solve the problem are, user logs in, the server keeps his > personal variables in "memory" so everytime they are needed for some form > or whatever, the server fills the fields automatically. > > How can i have several users "logged on" and then have like a box on the > site displaying who and how many users are logged in? > Sorry for the messed up explanation, but i really dont know what do do > about it. Thanks. > > Pag > >

    attached mail follows:


    --- Pag <dantemail.telepac.pt> wrote: > What do i use to authenticate the user on my site? > Sessions?

    No, authentication is something you do. PHP's sessions help you keep up with persistent data associated with a user.

    There are some things in PEAR (http://pear.php.net/) that handle authentication for you, but many people just check to see if the username and password are correct, and go from there.

    A good thing to research is PHP's session management, as you will probably make use of that feature, since it is pretty easy to implement. For authentication, you can search PEAR for something or just make sure the username and password are correct (look at examples of interacting with a database if that is where the username and password are stored - hopefully the passwords are encrypted and preferably message digests).

    Chris

    attached mail follows:


    > I am trying to add a "login" functionality to my new manager. A > simple > username/password functionality, so that the user logs in and everything > he > does inside the site will have his name. I mean, if he wants to create a > new entry on the database, the field "name" wont have to be filled, etc. > Anyway, i dont have a clue to where to start. Tried to search the > net but > i dont even know the keywords to search for. Could you guys please put me > in the good path? > Heres where i got so far: > > Have a table on a mysql database named USERS, with "name", password" > "address", etc on it. > What do i use to authenticate the user on my site? Sessions? If so, > the > steps i need to solve the problem are, user logs in, the server keeps his > personal variables in "memory" so everytime they are needed for some form > or whatever, the server fills the fields automatically. > > How can i have several users "logged on" and then have like a box on > the > site displaying who and how many users are logged in? > Sorry for the messed up explanation, but i really dont know what do > do > about it. Thanks.

    Load the information into a session and use that when you insert data. It won't happen "automatically" but if you save the user's name in something like $_SESSION['name'], then you can use that variable in your SQL statements and it'll be the value of the current logged on user.

    ---John W. Holmes...

    PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

    attached mail follows:


    Hello All,

    I'm trying to setup a RedHat Psyche (8.0) server. So far, all well. However, I just ran into a problem with MySQL. PHP doesn't have the MySQL functions in it. Is there another way to install those without having to re-compile PHP?

    Thanks for any and all help,

    -Michael Smith

    Some peoples minds are like cement; all mixed up and permanently set.

    attached mail follows:


    I am guessing that you installed the php from a redhat rpm; if so then you just need to install the php-mysql rpm. You can download from: http://rpmfind.net//linux/RPM/redhat/8.0/i386/php-mysql-4.2.2-8.0.5.i386.htm l (or any of a number of other places).

    Cheers, Steven Balthazor

    -----Original Message----- From: Michael A Smith [mailto:msmithprattmuseum.org] Sent: Thursday, January 23, 2003 6:33 PM To: php-generallists.php.net Subject: [PHP] MySQL Functions Setup

    Hello All,

    I'm trying to setup a RedHat Psyche (8.0) server. So far, all well. However, I just ran into a problem with MySQL. PHP doesn't have the MySQL functions in it. Is there another way to install those without having to re-compile PHP?

    Thanks for any and all help,

    -Michael Smith

    Some peoples minds are like cement; all mixed up and permanently set.

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

    attached mail follows:


    With what then? Why not? Should this be a bug filed in their bugs database?

    - Vic

    -----Original Message----- From: Jim Lucas [mailto:phplistzonedzero.net] Sent: Thursday, January 23, 2003 2:00 PM To: Victor; php-generallists.php.net Subject: Re: [PHP] total file size

    yes, it is possible, but not with php.

    Jim

    ----- Original Message ----- From: "Victor" <victorargilent.com> To: <php-generallists.php.net> Sent: Wednesday, January 22, 2003 8:10 PM Subject: [PHP] total file size

    > Is there a way to find out total upload file size from a file uploaded > though an html form? I figure if I know the total size, then I can just > consistently poke at the file being uploaded and math a progress bar for > the file being uploaded, of course, this all hangs upon the ability of > getting the total file size BEFORE it is uploaded. It IS possible I have > seen it done with JSP; anybody can help me with this? Thanks > > - Vic > > ______________________________________________________________________

    > Post your free ad now! http://personals.yahoo.ca > > -- > 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
    

    ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca

    attached mail follows:


    u can use nl2br() to convert \n to <br> tags b4 echo the string in textarea.

    Foong

    "Neil M" <neil.mooneycern.ch> wrote in message news:3E2FD832.8060601cern.ch... > Adi wrote: > > i want to add in textarea a string with new line tag in it. how to do that? > > > > my try: > > $string="-line1n\ -line2 n\-line3"; > > echo "<br><textarea name='aria' cols='50' rows='2'>$string</textarea>"; > > > > but i see a single line instead of: > > -line1 > > -line2 > > -line3 > > > > tx in advance for any help > > > > Hello > > For a new line in a text area you cant use html <br>'s > > You need to use either \n OR \r\n > > Thanks > > Neil >

    attached mail follows:


    u can use nl2br() to convert \n to <br> tags b4 echo the string in textarea.

    Foong

    "Neil M" <neil.mooneycern.ch> wrote in message news:3E2FD832.8060601cern.ch... > Adi wrote: > > i want to add in textarea a string with new line tag in it. how to do that? > > > > my try: > > $string="-line1n\ -line2 n\-line3"; > > echo "<br><textarea name='aria' cols='50' rows='2'>$string</textarea>"; > > > > but i see a single line instead of: > > -line1 > > -line2 > > -line3 > > > > tx in advance for any help > > > > Hello > > For a new line in a text area you cant use html <br>'s > > You need to use either \n OR \r\n > > Thanks > > Neil >

    attached mail follows:


    I want to make something somewhat like fileplanet so I can keep my server fast yet still maintain a large downloads database. I'm unfamiliar with FTP and PHP. Could anyone tell me how to find out how many people are on the FTP server at one time?

    Thanks in advance,

    Mike Bowers PlanetModz Gaming Network Webmaster webmasterplanetmodz.com ViperWeb Hosting Server Manager mbowersviperwebconsulting.com raptr24att.net All outgoing messages scanned for viruses using Norton AV 2002

    attached mail follows:


    On Friday 24 January 2003 11:42, Mike Bowers wrote: > I want to make something somewhat like fileplanet so I can keep my > server fast yet still maintain a large downloads database. I'm > unfamiliar with FTP and PHP. Could anyone tell me how to find out how > many people are on the FTP server at one time?

    Nothing to do with PHP. Depends on what ftp server you're using -- try ftpwho.

    -- 
    Jason Wong -> Gremlins Associates -> www.gremlins.biz
    Open Source Software Systems Integrators
    * Web Design & Hosting * Internet & Intranet Applications Development *
    

    /* A poet who reads his verse in public may have other nasty habits. */

    attached mail follows:


    alternate to right click is Shift-F10 in IE which i think can not be handled by javascript.

    uttam -----Original Message----- From: Martin Hudec [mailto:corwincorwin.sk] Sent: Thursday, January 23, 2003 15:47 To: php-generallists.php.net Subject: Re: [PHP] Disable pic copy/save?

    Hmmmm it might be done by checking which mouse button is pressed using javascript :) but i think this works only in Iexplore ;)...i used such code on my webpage....it shows only copyright etc....anyway user does not need to rightclik and save if he knows where is his browser cache located.....

    Martin

    On Thursday 23 January 2003 10:57 am, Jason Wong wrote: > On Thursday 23 January 2003 17:52, Anthony Rodriguez wrote: > > Hi! > > > > A client wants to test market two versions of an advertising but wants to > > disable the users' ability to copy/save the ads (right click, copy/save). > > > > How can this be done in PHP? > > It can't be done, period. You need to get the data to the browser for it to > be displayed. Once it's on the user's browser a determined user will be > able to save whatever it is that's being displayed.

    attached mail follows:


    Hi list!

    I think this topic is worth discussion here...

    regds,

    -----Original Message----- From: Uttam [mailto:uttamlml.co.in] Sent: 21 January 2003 13:29 To:php-windowslists.php.net Subject: [PHP-WIN] Who is foo & what is bar?

    In many code examples in PHP documention (& others also), I have seen authors referring to variables 'foo' & 'bar', but I have yet not discovered the origin of these names. I am sure there must be dozens of others who have the curiosity to find how the use of these names started.

    Can anyone quench the curiosities please?

    regards,

    -----Original Message----- From: Woolsey, Fred [mailto:FWoolseyltk.com] Sent: Wednesday, January 22, 2003 05:29 To: php-windowslists.php.net Subject: RE: [PHP-WIN] Who is foo & what is bar?

    I'm pretty certain it is one of those brilliant, sarcastic military acronymns like SNAFU (situation normal, all f#$%d up), as alluded to by Mikey- however, I believe the correct meaning is f#$%d up beyond all repair. Witness the following hypothetical exchanges:

    "So soldier, what's the sitrep?" "SNAFU, sir..."

    and

    "How bad is it, soldier?" "Well sir, I'm afraid it's FUBAR..."

    Phonetically, FUBAR was simplified to FOOBAR, which allowed it to be parsed into FOO and BAR by standard software :-{)>

    Cheers, Fred Woolsey

    -----Original Message----- From: Chris Kranz [mailto:chriskranz.com] Sent: Tue 1/21/2003 8:35 AM To: php-windowslists.php.net Cc: Subject: RE: [PHP-WIN] Who is foo & what is bar?

    Hehe!!!

    It's one of those classic terms that spans across many languages and dates back quite a long time. Whenever I pickup a programming book, somewhere in there, you'll find the infamous foo and bar...

    chris kranz fatcuban.com

    -----Original Message----- From: Mikey [mailto:mikeysplatted.net] Sent: Tuesday, January 21, 2003 1:32 PM To: Uttam; php-windows-digest-helplists.php.net; php-windowslists.php.net Subject: RE: [PHP-WIN] Who is foo & what is bar?

    Just my opinion, but I think it comes from the acronym FUBAR - fcked up beyond all recognition...

    Mikey

    > -----Original Message----- > From: Uttam [mailto:uttamlml.co.in] > Sent: 21 January 2003 13:29 > To: php-windows-digest-helplists.php.net; php-windowslists.php.net > Subject: [PHP-WIN] Who is foo & what is bar? > > > In many code examples in PHP documention (& others also), I have seen > authors referring to variables 'foo' & 'bar', but I have yet not > discovered > the origin of these names. I am sure there must be dozens of others who > have the curiosity to find how the use of these names started. > > Can anyone quench the curiosities please? > > regards, > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > >

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

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

    attached mail follows:


    Ummm...and this has what to do with PHP?

    http://www.catb.org/~esr/jargon/html/entry/foobar.html

    attached mail follows:


    It comes from the acronym, FUBAR. This is military slang that has been around since WWII. FUBAR stands for: "F**ked Up Beyond All Repair"

    ----- Original Message ----- From: "Uttam" <uttamlml.co.in> To: <php-generallists.php.net> Sent: Thursday, January 23, 2003 11:15 PM Subject: [PHP] Who is foo & what is bar?

    Hi list!

    I think this topic is worth discussion here...

    regds,

    -----Original Message----- From: Uttam [mailto:uttamlml.co.in] Sent: 21 January 2003 13:29 To:php-windowslists.php.net Subject: [PHP-WIN] Who is foo & what is bar?

    In many code examples in PHP documention (& others also), I have seen authors referring to variables 'foo' & 'bar', but I have yet not discovered the origin of these names. I am sure there must be dozens of others who have the curiosity to find how the use of these names started.

    Can anyone quench the curiosities please?

    regards,

    -----Original Message----- From: Woolsey, Fred [mailto:FWoolseyltk.com] Sent: Wednesday, January 22, 2003 05:29 To: php-windowslists.php.net Subject: RE: [PHP-WIN] Who is foo & what is bar?

    I'm pretty certain it is one of those brilliant, sarcastic military acronymns like SNAFU (situation normal, all f#$%d up), as alluded to by Mikey- however, I believe the correct meaning is f#$%d up beyond all repair. Witness the following hypothetical exchanges:

    "So soldier, what's the sitrep?" "SNAFU, sir..."

    and

    "How bad is it, soldier?" "Well sir, I'm afraid it's FUBAR..."

    Phonetically, FUBAR was simplified to FOOBAR, which allowed it to be parsed into FOO and BAR by standard software :-{)>

    Cheers, Fred Woolsey

    -----Original Message----- From: Chris Kranz [mailto:chriskranz.com] Sent: Tue 1/21/2003 8:35 AM To: php-windowslists.php.net Cc: Subject: RE: [PHP-WIN] Who is foo & what is bar?

    Hehe!!!

    It's one of those classic terms that spans across many languages and dates back quite a long time. Whenever I pickup a programming book, somewhere in there, you'll find the infamous foo and bar...

    chris kranz fatcuban.com

    -----Original Message----- From: Mikey [mailto:mikeysplatted.net] Sent: Tuesday, January 21, 2003 1:32 PM To: Uttam; php-windows-digest-helplists.php.net; php-windowslists.php.net Subject: RE: [PHP-WIN] Who is foo & what is bar?

    Just my opinion, but I think it comes from the acronym FUBAR - fcked up beyond all recognition...

    Mikey

    > -----Original Message----- > From: Uttam [mailto:uttamlml.co.in] > Sent: 21 January 2003 13:29 > To: php-windows-digest-helplists.php.net; php-windowslists.php.net > Subject: [PHP-WIN] Who is foo & what is bar? > > > In many code examples in PHP documention (& others also), I have seen > authors referring to variables 'foo' & 'bar', but I have yet not > discovered > the origin of these names. I am sure there must be dozens of others who > have the curiosity to find how the use of these names started. > > Can anyone quench the curiosities please? > > regards, > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > >

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

    -- PHP Windows 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

    attached mail follows:


    Hi,

    How are you?

    My friends following are two javascript files for pop-up menus. menu2.js is working satisfactorily while menu.js is not working. I tried lot to trace the loophole but all in vain. kindly compare the two files and help me.

    menu2.js function fwLoadMenus() {

    if (window.fw_menu_0) return;

    window.fw_menu_1_1 = new Menu("DIRECTORY",130,17,"Arial",10,"#003300","#ccffff","#cc9966","#003333");

    fw_menu_1_1.addMenuItem("HEADQUATER","location='http://www.bis.org.in/dir/hq.htm'");

    fw_menu_1_1.fontWeight="bold";

    fw_menu_1_1.hideOnMouseOut=true;

    window.fw_menu_1 = new Menu("root",213,17,"Helvetica",10,"#003300","#ccffff","#cc9966","#003333");

    fw_menu_1.addMenuItem(fw_menu_1_1);

    fw_menu_1.fontWeight="bold";

    fw_menu_1.hideOnMouseOut=true;

    window.fw_menu_2 = new Menu("root",208,0,"sans-serif",10,"#003300","#ccffff","#cc9966","#003333");

    fw_menu_2.addMenuItem("STANDARD PROMOTION","location='http://www.bis.org.in/sf/sfp2.htm'");

    fw_menu_2.fontWeight="bold";

    fw_menu_2.hideOnMouseOut=true;

    window.fw_menu_3 = new Menu("root",208,17,"Helvetica",10,"#003300","#ccffff","#cc9966","#003333");

    fw_menu_3.addMenuItem("STANDARD PROMOTION","location='http://www.bis.org.in/sf/sfp2.htm'");

    fw_menu_3.fontWeight="bold";

    fw_menu_3.hideOnMouseOut=true;

    fw_menu_3.writeMenus();}

    menu.js function fwLoadMenus() {

    if (window.fw_menu_0) return;

    window.fw_menu_1 = new Menu("root",213,17,"Verdana, Arial, Helvetica, sans-serif",11,"#003300","#ccffff","#cc9966","#003333");

    window.fw_menu_1_1 = new Menu("2222",213,17,"Verdana, Arial, Helvetica, sans-serif",11,"#003300","#ccffff","#cc9966","#003333");

    fw_menu_1_1.addMenuItem("u","location='http://www.bi2s.org.in/other/iscd.htm'");

    fw_menu_1_1.fontWeight="bold";

    fw_menu_1_1.hideOnMouseOut=true;

    fw_menu_1.addMenuItem(fw_menu_1_1);

    fw_menu_1.fontWeight="bold";

    fw_menu_1.hideOnMouseOut=true;

    window.fw_menu_2 = new Menu("root",208,17,"Helvetica",10,"#003300","#ccffff","#cc9966","#003333");

    fw_menu_2.fontWeight="bold";

    fw_menu_2.hideOnMouseOut=true;

    window.fw_menu_3 = new Menu("root",213,17,"Verdana, Arial, Helvetica, sans-serif",11,"#003300","#ccffff","#cc9966","#003333");

    fw_menu_3.addMenuItem("cccc","location=' http://www.bi3s.org.in/other/iscd.htm'");

    fw_menu_3.fontWeight="bold";

    fw_menu_3.hideOnMouseOut=true;

    fw_menu_3.writeMenus();

    }

    Keep smiling. It cost nothing but gives everything.

    Yours

    Amit Gupta

    attached mail follows:


    How come I *can* do these commands:

    $row = mysql_fetch_array($result,MYSQL_ASSOC); while(list($myVariableName,$sqlFieldName)=each($row)) { $$myVariableName = $sqlFieldName; }

    But I can't do this command?

    while(list($myVariableName,$sqlFieldName)=each(mysql_fetch_array($result ,MYSQL_ASSOC))) { $$myVariableName = $sqlFieldName; }

    Notice the only differenceis that the first one assigns the array to $row FIRST, whereas the second tries to avoid that extra call, especially since I know I'm only getting one row back. Hmmm?

    attached mail follows:


    First, if you expect only a single row returned, why are you using a while(){} construct? Second, mysql_fetch_array() does not like to operate within another function call. I've tried it on multiple occasions; failed. Third, each() operates on succeeding elements of an array; there are only two elements aparrently, so what are you expecting eac() to do?

    ----- Original Message ----- From: "Daevid Vincent" <daeviddaevid.com> To: <php-generallists.php.net> Sent: Thursday, January 23, 2003 11:38 PM Subject: [PHP] Strange anomolie with each() and mysql_fetch_array()

    How come I *can* do these commands:

    $row = mysql_fetch_array($result,MYSQL_ASSOC); while(list($myVariableName,$sqlFieldName)=each($row)) { $$myVariableName = $sqlFieldName; }

    But I can't do this command?

    while(list($myVariableName,$sqlFieldName)=each(mysql_fetch_array($result ,MYSQL_ASSOC))) { $$myVariableName = $sqlFieldName; }

    Notice the only differenceis that the first one assigns the array to $row FIRST, whereas the second tries to avoid that extra call, especially since I know I'm only getting one row back. Hmmm?

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

    attached mail follows:


    Ok, ill explain my self further. the URL in the script is http://www.weatherzone.com.au/yourHomePage.jsp?ref=f2eeb571ed

    The script uses the URL to see the page and store it locally, then another script grabs selected data from that page. the stuff after the ? is essential for the data i want to be displayed, with out that part, the script only sees the base page without the data i need, so hence it doesn't grab it. so how do i use the $_GET['var1'] $_GET['var2'] $_GET['var3']

    or urlencode() in the script this is the script. <?php //Writing of local file

    $rContents = implode( "\r\n", file( 'http://www.weatherzone.com.au/yourHomePage.jsp?ref=f2eeb571ed' ) );

    if( ($fp = fopen( 'wztest.txt', 'wb+' )) !== false ) { fputs( $fp, $rContents ); fclose( $fp ); } ?>

    --
    

    Cheers --------------------------------- Simon Angell Canberra, ACT www.canberra-wx.com --------------------------------------------- Proud member of the Australian Severe Weather Association. www.severeweather.asn.au -------------------------------------------------------------- "Marek Kilimajer" <kilimajerwebglobe.sk> wrote in message news:3E302FE0.9090605webglobe.sk... > use urlencode() > > Simon Angell wrote: > > >Hi All. > >I am currently playing with sripts, and have come across a problem, that i > >can't slove. (i am a novice - lol). > >The script requires a URL to grab data from. The URL has a ? in it, and > >testing the script it grabs the base data of the URL, but not the essential > >data i need, which is only brought up with what comes after the ? in the > >URL. now i figure it has something to do with the ? in the URL but i can't > >seem to fix it myself. > > > >Thanks > > > >-- > > > >Cheers > >--------------------------------- > >Simon Angell > >Canberra, ACT > >www.canberra-wx.com > >--------------------------------------------- > >Proud member of the > >Australian Severe Weather Association. > >www.severeweather.asn.au > >-------------------------------------------------------------- > > > > > > > > > > >

    attached mail follows:


    if it's just the string after the ? then use $QUERY_STRING can't remember which $_* variable it's under... HTH

    > -----Original Message----- > From: Simon Angell [mailto:simoncanberra-wx.com] > Sent: Friday, January 24, 2003 4:50 PM > To: php-generallists.php.net > Subject: Re: [PHP] ? in URLS. > > > Ok, ill explain my self further. the URL in the script is > http://www.weatherzone.com.au/yourHomePage.jsp?ref=f2eeb571ed > > The script uses the URL to see the page and store it locally, > then another > script grabs selected data from that page. the stuff after the ? is > essential for the data i want to be displayed, with out that part, the > script only sees the base page without the data i need, so > hence it doesn't > grab it. so how do i use the > $_GET['var1'] > $_GET['var2'] > $_GET['var3'] > > or urlencode() in the script > this is the script. > <?php > //Writing of local file > > $rContents = implode( "\r\n", file( > 'http://www.weatherzone.com.au/yourHomePage.jsp?ref=f2eeb571ed' ) ); > > if( ($fp = fopen( 'wztest.txt', 'wb+' )) !== false ) > { > fputs( $fp, $rContents ); > fclose( $fp ); > } > ?> > > > -- > > Cheers > --------------------------------- > Simon Angell > Canberra, ACT > www.canberra-wx.com > --------------------------------------------- > Proud member of the > Australian Severe Weather Association. > www.severeweather.asn.au > -------------------------------------------------------------- > "Marek Kilimajer" <kilimajerwebglobe.sk> wrote in message > news:3E302FE0.9090605webglobe.sk... > > use urlencode() > > > > Simon Angell wrote: > > > > >Hi All. > > >I am currently playing with sripts, and have come across a > problem, that > i > > >can't slove. (i am a novice - lol). > > >The script requires a URL to grab data from. The URL has a > ? in it, and > > >testing the script it grabs the base data of the URL, but not the > essential > > >data i need, which is only brought up with what comes > after the ? in the > > >URL. now i figure it has something to do with the ? in the > URL but i > can't > > >seem to fix it myself. > > > > > >Thanks > > > > > >-- > > > > > >Cheers > > >--------------------------------- > > >Simon Angell > > >Canberra, ACT > > >www.canberra-wx.com > > >--------------------------------------------- > > >Proud member of the > > >Australian Severe Weather Association. > > >www.severeweather.asn.au > > >-------------------------------------------------------------- > > > > > > > > > > > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    In a signup page , I want to verify some information what the user fill in ,inculde user nameĦ˘passwordĦ˘email etc.But I don't know how to verify the available email address.Who can help me ? Thanks a lot. ----ocean