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: Thu Aug 01 2002 - 23:15:00 CDT

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

    php-general Digest 2 Aug 2002 04:15:00 -0000 Issue 1500

    Topics (messages 110695 through 110770):

    Re: Problem with "<?xml ....>" inside the PHP code, due to "?"
            110695 by: Mark Middleton
            110699 by: Tom Rogers
            110701 by: electroteque
            110706 by: Scott Fletcher

    Re: mcrypt
            110696 by: Danny Shepherd

    .htaccess file
            110697 by: B i g D o g
            110700 by: Nicole Lallande
            110703 by: Nicole Lallande
            110704 by: Neil Freeman

    Re: include()
            110698 by: Lee

    sessions
            110702 by: Tyler Durdin

    Php Dynamic Pages & Apache Server
            110705 by: msmecca.mindspring.com
            110708 by: Lee
            110709 by: Nicole Lallande

    Re: ARRRRGGGGHHHH! Weird Problems!
            110707 by: Tony Harrison
            110729 by: Tony Harrison
            110735 by: Aaron

    DPHPEdit - PHP IDE - New version (0.9.2.4) available
            110710 by: Davor Pleskina

    Re: PHP mail() problems FIXED
            110711 by: John Williams

    Re: sort results into two columns
            110712 by: Brian V Bonini

    SOAP client class that supports https????
            110713 by: Anson Smith
            110714 by: Anson Smith

    Re: Getting user's local TZ
            110715 by: Jason Wong

    Re: [PHP-WIN] php cookie question
            110716 by: Damian Harouff

    Re: Help with fopen please.
            110717 by: Michael Sweeney
            110721 by: eat pasta type fasta

    attachements in mail()
            110718 by: Danny wall
            110719 by: Philip Hallstrom
            110730 by: Tony Harrison
            110737 by: Danny wall
            110740 by: Manuel Lemos
            110751 by: Danny wall

    randomize etc?
            110720 by: Hawk
            110722 by: Philip Hallstrom
            110723 by: Kurth Bemis (List Monkey)

    Readdir
            110724 by: msmecca.mindspring.com
            110725 by: Matt Schroebel
            110726 by: Nicole Lallande
            110728 by: Jason Wong
            110739 by: Danny wall

    problems with random again
            110727 by: Hawk
            110731 by: Philip Hallstrom

    Re: [PHP-DEV] [CROSS POST] PHP Meetup & Texas PHP Users
            110732 by: Jay Blanchard

    Example safe use of eval()
            110733 by: David Pratt
            110755 by: Justin French
            110757 by: David Pratt

    Can several different sessions coexist?
            110734 by: DonPro
            110747 by: John Holmes

    How much should this cost Or ...
            110736 by: PHP mail
            110756 by: Justin French

    Sessions not expiring
            110738 by: Lee

    adding info to an array?
            110741 by: Hawk
            110742 by: Aaron
            110743 by: Hawk
            110744 by: Aaron
            110745 by: Kevin Stone
            110746 by: Hawk
            110748 by: Hawk
            110768 by: Jason Wong

    Best way to save?
            110749 by: Shane
            110766 by: John Holmes

    Favorite Calendar Anyone?
            110750 by: Shane

    Protect PHP coding
            110752 by: YC Nyon
            110753 by: Martin Towell
            110758 by: Verdana Musone
            110759 by: Manuel Lemos

    Re: A Fond Farewell
            110754 by: Bob Lockie

    Re: extending class then calling its original function
            110760 by: CC Zona

    decrypting values in MYSQL
            110761 by: Michael P. Carel
            110762 by: Julio Nobrega
            110763 by: Michael P. Carel
            110765 by: Justin French
            110767 by: John Holmes
            110769 by: Aaron

    mail reading newbie and line lengths...
            110764 by: Jeff D. Hamann

    Re: still need help with crash on make
            110770 by: Bob Lockie

    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:


    > <?php
    > $XML = "<?xml version='1.0' encoding='UTF-8'?><Product>Apple</Product>";
    > echo $XML;
    > ?>
    >

    Not sure if this is the best way, but it worked for me:

    $XML = "<"."?xml version='1.0'
    encoding='UTF-8'?"."><Product>Apple</Product>";

    Hope this helps,
    Mark

    ::::::::::::::::::::
    Mark Middleton
    Whirled Web

    attached mail follows:


    Hi,

    Friday, August 2, 2002, 2:03:18 AM, you wrote:
    SF> Anyone know the workaround with the situation here? Here is the sample
    SF> script. The problem is I include the XML tag into the PHP variable and it
    SF> messed up everything. It all had to do with "?" here since PHP use it also.

    SF> --clip--
    SF> <?php
    SF> $XML = "<?xml version='1.0' encoding='UTF-8'?><Product>Apple</Product>";
    SF> echo $XML;
    ?>>

    SF> Thanks,
    SF> FletchSOD

    Another variation with single quotes :)

    echo '<?xml version="1.0"?>';

    -- 
    regards,
    Tom
    

    attached mail follows:


    heres how i do it $xml .= "<?xml version=\"1.0\"?>\n"; "Tom Rogers" <trogerskwikin.com> wrote in message news:11630025.20020802023727kwikin.com... > Hi, > > Friday, August 2, 2002, 2:03:18 AM, you wrote: > SF> Anyone know the workaround with the situation here? Here is the sample > SF> script. The problem is I include the XML tag into the PHP variable and it > SF> messed up everything. It all had to do with "?" here since PHP use it also. > > SF> --clip-- > SF> <?php > SF> $XML = "<?xml version='1.0' encoding='UTF-8'?><Product>Apple</Product>"; > SF> echo $XML; > ?>> > > SF> Thanks, > SF> FletchSOD > > Another variation with single quotes :) > > echo '<?xml version="1.0"?>'; > > -- > regards, > Tom >

    attached mail follows:


    Thank you all for the feedback! I was trying to say the problem lie with the "?", not with the quote or double quote. Because PHP use "<?" also, so when php read this "<?xml", it think the "<?" is intended for PHP. So, using the escape character does the trick, "\" but now I get the invalid format as a response from the other side that read in the XML codes I send.

    Thanks, FletchSOD "Matt Babineau" <mattcriticalcode.com> wrote in message news:019701c23974$f29b78a0$0100a8c0developerx... > <?php > $XML = "<\?xml version='1.0' > encoding='UTF-8'\?><Product>Apple</Product>"; > echo $XML; > ?> > > Try this? > > Matt Babineau > MCWD / CCFD > ----------------------------------------- > e: mattcriticalcode.com > p: 603.943.4237 > w: http://www.criticalcode.com > PO BOX 601 > Manchester, NH 03105 > > > -----Original Message----- > From: Scott Fletcher [mailto:scottabcoa.com] > Sent: Thursday, August 01, 2002 12:03 PM > To: php-generallists.php.net > Subject: [PHP] Problem with "<?xml ....>" inside the PHP code, due to > "?" > > > Anyone know the workaround with the situation here? Here is the sample > script. The problem is I include the XML tag into the PHP variable and > it messed up everything. It all had to do with "?" here since PHP use > it also. > > --clip-- > <?php > $XML = "<?xml version='1.0' encoding='UTF-8'?><Product>Apple</Product>"; > echo $XML; > ?> > > Thanks, > FletchSOD > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Try setting the database field type to 'BLOB'

    Danny.

    ----- Original Message ----- From: "Randy Johnson" <icgphpicecoldgold.com> To: "Danny Shepherd" <dannykyboshed.com> Cc: <php-generallists.php.net> Sent: Thursday, August 01, 2002 4:51 PM Subject: Re: [PHP] mcrypt

    > I found that the some of the high ascii characters would not store right in > the database or something cause when i went to compare them, the comparison > would fail. > > > Randy > > ----- Original Message ----- > From: "Danny Shepherd" <dannykyboshed.com> > To: "Randy Johnson" <icgphpicecoldgold.com> > Cc: <php-generallists.php.net> > Sent: Thursday, August 01, 2002 11:31 AM > Subject: Re: [PHP] mcrypt > > > > Just base64 encode the mcrypt output if the non printable chars bother > you, > > though I don't really see what the problem is, unless you're pushing the > > output to a web page. > > > > Danny. > > > > > > ----- Original Message ----- > > From: "Randy Johnson" <icgphpicecoldgold.com> > > Cc: <php-generallists.php.net> > > Sent: Thursday, August 01, 2002 4:24 PM > > Subject: [PHP] mcrypt > > > > > > > I am looking into different password encryption solutions. > > > > > > i started using crypt() > > > > > > then changed to mcrypt() > > > > > > which was not any good cause of the high ascii characters > > > > > > then i read about converting the high ascii characters to hex . > > > > > > Is this the ideal way to encrypt passwords or is their something better. > > > > > > Thanks > > > > > > Randy > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > >

    attached mail follows:


    Is it possible to set register_globals to off in the .htaccess file. If so how do I do that?

    .: B i g D o g :.

    attached mail follows:


    I think it is something like - can't remember if it's an underscore or dash between the 'php' and 'flag'

    php-flag register_globals off

    HTH,

    Nicole

    B i g D o g wrote:

    >Is it possible to set register_globals to off in the .htaccess file. If so >how do I do that? > > >.: B i g D o g :. > > > >

    -- 
    ########################
    Nicole Lallande
    nicolenmlconsulting.com
    760.753.6766
    ########################
    

    attached mail follows:


    it's php_flag register_globals off -- you can either place this within your <Directory> tags in your httpd .conf file or in an htaccess file -- for more info see http://www.php.net/manual/en/configuration.php#AEN2390

    best,

    Nicole

    Nicole Lallande wrote:

    > I think it is something like - can't remember if it's an underscore or > dash between the 'php' and 'flag' > > php-flag register_globals off > > HTH, > > Nicole > > B i g D o g wrote: > >> Is it possible to set register_globals to off in the .htaccess file. >> If so >> how do I do that? >> >> >> .: B i g D o g :. >> >> >> >> >

    -- 
    ########################
    Nicole Lallande
    nicolenmlconsulting.com
    760.753.6766
    ########################
    

    attached mail follows:


    php_value register_globals "0"

    B i g D o g wrote: > ************************************************************************** > This Message Was Virus Checked With : SAVI 3.59 May 2002 > Last Updated 8th July 2002 > ************************************************************************** > > Is it possible to set register_globals to off in the .htaccess file. If so > how do I do that? > > > .: B i g D o g :. > > > >

    -- 
    ----------------------
      www.curvedvision.com
    ----------------------
    

    attached mail follows:


    --snip-- > If you run your own server, you can set it up so that each webmaster is > locked into a private environment, but it's messy. According to me, you > would need a separate copy of apache for each site, each running under a > different user, and they would need to run on separate ports, which is a > nuisance. --snip--

    Though I would add my 2 pennies worh on this but it is probably more on an Apache list answer but, I recently asked a question about something similair myself on the Apache mailing list.

    You can have mutiple apache servers running on the same machine as long as you have used the "Listen IP:Port" Directive on each Apache server Instance to limit the IP it listens to. Therefore as long as each site has its own IP address you would not need to use different ports. I am not aware of any ISP/web host that runs like this though, due to the extract resources (e.g. memory & CPU time) required to run the muliple instances.

    Cheers

    Lee

    ----- Original Message ----- From: "Simon Ritchie" <spamsinkmerrowinternet.com> To: <php-generallists.php.net> Sent: Thursday, August 01, 2002 11:30 AM Subject: RE: [PHP] include()

    > > I suppose include() can be used to include files from remote > > systems(not on > > WINDOWS). > > Only if the sysadmin running your web server allows it, which they should > not. > > > > A webmaster on the same server can always use a path like > > "/home/htdocs/.../config.php" and include my config .php which contains my > > database password !! > > Not quite, but if you are on a shared server hosted by somebody else, there > is a potential problem. If somebody can figure out the name of the function > that opens the database, they could call it, potemtially giving access to > the data. You could use the solution posted by Justin French to make sure > that the function does nothing for them when they call it. > > As other people have said, your hosting organisation should set the system > up so that nobody can read your PHP code, and that nobody outside the host > computer can include it. However, I think it would be difficult for them to > stop another user on the same server including your code. > > If you run your own server, you can set it up so that each webmaster is > locked into a private environment, but it's messy. According to me, you > would need a separate copy of apache for each site, each running under a > different user, and they would need to run on separate ports, which is a > nuisance. > > Simon Ritchie > > Download my introduction to PHP for $25: > http://merrowinternet.com/downloads?source=ml > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >

    attached mail follows:


    I have a login page using sessions the old way. I have switched it to using $_SESSION['valid_user']and was wondering how to switch this (below) part of my code. In the if statement I am checking to see if the session is registered, but using $_SESSION[''] I do not understand how to do this or the isset statement. As of now my login page will login anyone and log them in as whatever they type in the username and password fields even if the are not in the DB.

    if (session_is_registered("valid_user")) { blah blah... } else { if (isset($userid)) { echo "Could not log you on"; } else { echo "You are not logged in"; }

    //this is where I created my login form that submits to itself and runs through the code

    _________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com

    attached mail follows:


    I am trying to create a php page that will show the files on an apache server. Each file will show up as a link on the page. When clicked, the user will be able to download the file. Is there anyone out there that can lead me in the right direction.

    attached mail follows:


    You could try using the readdir function to read a list of files (full docs available from http://www.php.net/manual/en/function.readdir.php)

    Here is an expanded version of the example give on the above link.

    <html> <body> File List <?php if ($handle = opendir('./)) { /* This is the correct way to loop over the directory. */ while (false !== ($file = readdir($handle))) { echo "<a href='$file'>$file</a><br>"; } closedir($handle); } ?> </body> </html>

    This example assumes that the PHP script and files are in the same directory and are all publically accessible (i.e. a user could simple type http://www.example.com/filename)

    Hope this helps

    Regards

    Lee

    ----- Original Message ----- From: <msmeccamindspring.com> To: <php-generallists.php.net> Sent: Thursday, August 01, 2002 5:57 PM Subject: [PHP] Php Dynamic Pages & Apache Server

    > I am trying to create a php page that will show the files on an apache server. > Each file will show up as a link on the page. When clicked, the user will be > able to download the file. Is there anyone out there that can lead me in the > right direction. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > >

    attached mail follows:


    This will read all '.pdf' files in a sub-directory and put them in a link -

    HTH,

    Nicole

    <?php // read the contents of this directory $dir = ('./accessories/');

    $dir_stream = opendir($dir) or die ("Could not open a directory stream for <i>$dir</i>.");

    while($entry = readdir($dir_stream)) {

    // get the file extention $ext = substr($entry, strrpos($entry,'.'));

    // print the link to the file if ($ext == '.pdf') { echo "<a href='$entry'>$entry</a><br />"; } } ?>

    msmeccamindspring.com wrote:

    >I am trying to create a php page that will show the files on an apache server. >Each file will show up as a link on the page. When clicked, the user will be >able to download the file. Is there anyone out there that can lead me in the >right direction. >

    -- 
    ########################
    Nicole Lallande
    nicolenmlconsulting.com
    760.753.6766
    ########################
    

    attached mail follows:


    Thanx, I havent tried the loop yet, but the color will work im sure .

    "Aaron Ott" <aaron_otthotmail.com> wrote in message news:20020801032331.86011.qmailpb1.pair.com... > tony, > > regarding problem one, it looks like there is a problem in the code near: > for ($g = 0; $g < $num_lyrics; $g ++) { > > try doing: > for ($g = 0; $g <= $num_lyrics; $g ++) { > > As for problem two, it looks like you have your color variable set in the > for loop thereby resetting the color variable to 1 with each pass: > for ($g = 0; $g < $num_lyrics; $g ++) { > $color = 1; > if ($color == 1) { $rowcolor = "#DFDFDF"; $color ++; } else { $rowcolor= > "#FFFFFF"; $color --; } > ... > } > > > "Tony Harrison" <tonyh21tharrison21.fsnet.co.uk> wrote in message > news:20020731181502.56031.qmailpb1.pair.com... > > OK, im having some minor problems with my site. > > In artist.php (http://members.lycos.co.uk/ajohnh/artist.php - Source at: > > http://members.lycos.co.uk/ajohnh/source/artist.txt) If for example you > view > > lyrics by Weird Al Yankovic > > (http://members.lycos.co.uk/ajohnh/artist.php?id=1) You'll see that the > > bottom lyric (The Sage Begins) does not display. Now when you sort them by > > views (http://members.lycos.co.uk/ajohnh/artist.php?id=1&sortby=views) you > > will see that err, The Sage Begins is there, and the other one can no > longer > > be seen. PLease examine my source and tell me whats wrong. And another > thing > > about that page. The rows are meant to be alternating between #DFDFDF > (grey) > > and #FFFFFF (white) - why the hell are they all grey?!?!?!!? It worked > fine > > in index.php - source at > http://members.lycos.co.uk/ajohnh/source/index.txt > > > > > > Please help !!!!!! > > > > > >

    attached mail follows:


    OK, the color works, but now I have 2 empty lines!!!!!!!!!!!!!!!!!!!!

    "Tony Harrison" <tonyh21tharrison21.fsnet.co.uk> wrote in message news:20020801170900.62874.qmailpb1.pair.com... > Thanx, I havent tried the loop yet, but the color will work im sure . > > "Aaron Ott" <aaron_otthotmail.com> wrote in message > news:20020801032331.86011.qmailpb1.pair.com... > > tony, > > > > regarding problem one, it looks like there is a problem in the code near: > > for ($g = 0; $g < $num_lyrics; $g ++) { > > > > try doing: > > for ($g = 0; $g <= $num_lyrics; $g ++) { > > > > As for problem two, it looks like you have your color variable set in the > > for loop thereby resetting the color variable to 1 with each pass: > > for ($g = 0; $g < $num_lyrics; $g ++) { > > $color = 1; > > if ($color == 1) { $rowcolor = "#DFDFDF"; $color ++; } else { $rowcolor= > > "#FFFFFF"; $color --; } > > ... > > } > > > > > > "Tony Harrison" <tonyh21tharrison21.fsnet.co.uk> wrote in message > > news:20020731181502.56031.qmailpb1.pair.com... > > > OK, im having some minor problems with my site. > > > In artist.php (http://members.lycos.co.uk/ajohnh/artist.php - Source at: > > > http://members.lycos.co.uk/ajohnh/source/artist.txt) If for example you > > view > > > lyrics by Weird Al Yankovic > > > (http://members.lycos.co.uk/ajohnh/artist.php?id=1) You'll see that the > > > bottom lyric (The Sage Begins) does not display. Now when you sort them > by > > > views (http://members.lycos.co.uk/ajohnh/artist.php?id=1&sortby=views) > you > > > will see that err, The Sage Begins is there, and the other one can no > > longer > > > be seen. PLease examine my source and tell me whats wrong. And another > > thing > > > about that page. The rows are meant to be alternating between #DFDFDF > > (grey) > > > and #FFFFFF (white) - why the hell are they all grey?!?!?!!? It worked > > fine > > > in index.php - source at > > http://members.lycos.co.uk/ajohnh/source/index.txt > > > > > > > > > Please help !!!!!! > > > > > > > > > > > >

    attached mail follows:


    What is the purpose of using the for loop? if I may make a suggestion for using the while loop. The code would look something like this:

    <?php $color=1; while ($lyric_array = mysql_fetch_array($lyrics)) { $comments = mysql_query("SELECT * FROM `comments` WHERE `resource_id` = $lyric_array[0]"); $num_comments = mysql_num_rows($comments);

    if ($color == 1) { $rowcolor = "#DFDFDF"; $color ++; } else { $rowcolor = "#FFFFFF"; $color --; }

    echo "<tr bgcolor=\""; echo "\"><td><a href=\"view.php?id=$lyric_array[0]\">$lyric_array[1]</a></td>"; echo "<td>$lyric_array[3]</td>"; echo "<td>$num_comments</td>"; echo "<td>$lyric_array[2]</td>"; echo "<td><a href=\"$lyric_array[4]\">Buy at Amazon.com</td></tr>";

    $ltotalv = $ltotalv + $lyric_array[3]; } ?>

    I was looking at the current code and wasn't seeing the purpose for the for loop. If I'm incorrect and you are using it for a specific purpose, please let me know.

    -aaron

    "Tony Harrison" <tonyh21tharrison21.fsnet.co.uk> wrote in message news:20020801191202.73718.qmailpb1.pair.com... > OK, the color works, but now I have 2 empty lines!!!!!!!!!!!!!!!!!!!! > > "Tony Harrison" <tonyh21tharrison21.fsnet.co.uk> wrote in message > news:20020801170900.62874.qmailpb1.pair.com... > > Thanx, I havent tried the loop yet, but the color will work im sure . > > > > "Aaron Ott" <aaron_otthotmail.com> wrote in message > > news:20020801032331.86011.qmailpb1.pair.com... > > > tony, > > > > > > regarding problem one, it looks like there is a problem in the code > near: > > > for ($g = 0; $g < $num_lyrics; $g ++) { > > > > > > try doing: > > > for ($g = 0; $g <= $num_lyrics; $g ++) { > > > > > > As for problem two, it looks like you have your color variable set in > the > > > for loop thereby resetting the color variable to 1 with each pass: > > > for ($g = 0; $g < $num_lyrics; $g ++) { > > > $color = 1; > > > if ($color == 1) { $rowcolor = "#DFDFDF"; $color ++; } else { $rowcolor= > > > "#FFFFFF"; $color --; } > > > ... > > > } > > > > > > > > > "Tony Harrison" <tonyh21tharrison21.fsnet.co.uk> wrote in message > > > news:20020731181502.56031.qmailpb1.pair.com... > > > > OK, im having some minor problems with my site. > > > > In artist.php (http://members.lycos.co.uk/ajohnh/artist.php - Source > at: > > > > http://members.lycos.co.uk/ajohnh/source/artist.txt) If for example > you > > > view > > > > lyrics by Weird Al Yankovic > > > > (http://members.lycos.co.uk/ajohnh/artist.php?id=1) You'll see that > the > > > > bottom lyric (The Sage Begins) does not display. Now when you sort > them > > by > > > > views (http://members.lycos.co.uk/ajohnh/artist.php?id=1&sortby=views) > > you > > > > will see that err, The Sage Begins is there, and the other one can no > > > longer > > > > be seen. PLease examine my source and tell me whats wrong. And another > > > thing > > > > about that page. The rows are meant to be alternating between #DFDFDF > > > (grey) > > > > and #FFFFFF (white) - why the hell are they all grey?!?!?!!? It worked > > > fine > > > > in index.php - source at > > > http://members.lycos.co.uk/ajohnh/source/index.txt > > > > > > > > > > > > Please help !!!!!! > > > > > > > > > > > > > > > > > > > >

    attached mail follows:


    For all those interested - http://www.pleskina.com/dphped

    In newest version (0.9.2.4):

    a. You can now add multiple files to projects using Drag&Drop! b. Internal previewer enhanced c. BUG corrected on previewing single files

    Thanks everybody for suggestions and support!

    __________________________________________________________________ Davor Pleskina - davorpleskina.com http://www.pleskina.com ICQ#: 38632789 Programmers don't die; they just GOSUB without RETURN... __________________________________________________________________

    attached mail follows:


    John Williams wrote:

    >I'm having a problem getting the mail() function working on php 4.2.2. > >I get the error message: >Warning: mail() is not supported in this PHP build > >I'm running Solaris 8 and have set the symlink for sendmail. I have >recompiled PHP, set the php.ini to point to sendmail and restarted the >web server. > >; For Unix only. >;You may supply arguments as well (default: 'sendmail -t -i'). >sendmail_path = "/usr/sbin/sendmail -t -i" > >(I've tried it with and without quotes) > > >Still no luck... > >Any ideas? > >Thanks! > >John

    Solved it by removing the PHP directory and untarring it again. When I rebuilt it the 1st time there was no config.cache so I assumed there was no cache from the previous configure. I think this was because I had to rm configure and do a ./buildconf and it named the cache file something else. Oh well, long story short. Make a symlink so sendmail is in the path (otherwise PHP will disable sendmail support), and with the cache removed recompile PHP.

    After that it works fine. Tks to all who sent advice!

    John

    attached mail follows:


    <!-- begin Wise crack --> <table> <tr> <td>link1</td><td>linka</td> </tr> <tr> <td>link</td><td>linke</td> </tr> </table> <!-- end wise crack -->

    I suppose an example of the sql query you attempting to use and perhaps an idea of how your db is structured would help a little.. ;-)

    > -----Original Message----- > From: kompresor [mailto:avdijaepn.ba] > Sent: Thursday, August 01, 2002 10:23 AM > To: php-generallists.php.net > Subject: [PHP] sort results into two columns > > > hi, > > how can i sort data from mysql into two columns. Thanks. > > eg: > > link1 linka > link linke > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    I am working on a project that requires me to access a web service over https. I was wondering if anyone has any luck getting this class to work over https or if anyone knows of a soap client class that supports https?? thanks, Anson Smith

    attached mail follows:


    The class I am referring to in the original message is nuSphere's nuSoap class which works great over http by the way. -------Original Message------- From: Anson Smith Date: Thursday, August 01, 2002 12:38:47 PM To: php-generallists.php.net Subject: [PHP] SOAP client class that supports https???? I am working on a project that requires me to access a web service over https. I was wondering if anyone has any luck getting this class to work over https or if anyone knows of a soap client class that supports https?? thanks, Anson Smith

    attached mail follows:


    On Thursday 01 August 2002 23:10, Chris Boget wrote: > I looked in the predefined variable section of the manual and > couldn't find that there was a way to get this information from > that. If there was another way you could get this via PHP, I > couldn't find it anywhere else in the docs. > So, does anyone know of a good method to get the Time Zone > local to the end user?

    Not with PHP, try javascript.

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

    /* Bell Labs Unix -- Reach out and grep someone. */

    attached mail follows:


    http://www.php.net/manual/en/ref.session.php

    php.net is rather interesting, in which you can do something like type in "php.net/<idea>" or "php.net/<function>" and get the manual page for it...

    C> I want to ask user to login, and use cookie to save their userid and C> password C> what should i do?

    attached mail follows:


    Shane, You haven't told us what the problem is, only that you're having trouble making it work. How is it not working? One other question: I have to assume that the script is running on a different server than the one your are trying to write to (otherwise, why use ftp?) - are you sure that the ftp server on that system supports passive ftp? In any case, fopen may not be the best approach to meet your needs, but you need to tell us more about what the actual problem is.

    ..michael..

    On Wed, 2002-07-31 at 16:26, Shane wrote: > Looked in the archive and manual and came up with no luck, so here it goes. > > My end result is to save the output of a PHP script as an HTML file in a specified directory on a WIN2K server. > > my script is such... > <? PHP > function save_archive(){ > $filename = "http://myserver.net/extranet/archive.php?jobid=1"; > $fd = fopen( $filename, "r" ); > $fd2 = fopen("myserver.net/extranet/test2.html">ftp://me:pwmyserver.net/extranet/test2.html", "w"); > > while (!feof($fd)) { > $line = fgets($fd, 1024); > fputs($fd2,$line); > } > > fclose($fd); > fclose($fd2); > } > ?> > > I'm having a terrible time getting this to work. Is there a better way? Or can someone point me toward or post an example of some working function I could study??? >

    attached mail follows:


    check chmods, if the directory where you're saving the $fd2 is not 777 then it wont write, keep in mind it's a security issue however, use /tmp or instead of indicating paths in the file itself have include("file with the path to the dir") instead and put that .inc file off the reach of apache and ftp access,

    R>

    >Shane, >You haven't told us what the problem is, only that you're having trouble >making it work. How is it not working? One other question: I have to >assume that the script is running on a different server than the one >your are trying to write to (otherwise, why use ftp?) - are you sure >that the ftp server on that system supports passive ftp? In any case, >fopen may not be the best approach to meet your needs, but you need to >tell us more about what the actual problem is. > >..michael.. > >On Wed, 2002-07-31 at 16:26, Shane wrote: >> Looked in the archive and manual and came up with no luck, so here it goes. >> >> My end result is to save the output of a PHP script as an HTML file in a >specified directory on a WIN2K server. >> >> my script is such... >> <? PHP >> function save_archive(){ >> $filename = "http://myserver.net/extranet/archive.php?jobid=1"; >> $fd = fopen( $filename, "r" ); >> $fd2 = fopen("myserver.net/extranet/test2.html">ftp://me:pwmyserver.net/extranet/test2.html", "w"); >> >> while (!feof($fd)) { >> $line = fgets($fd, 1024); >> fputs($fd2,$line); >> } >> >> fclose($fd); >> fclose($fd2); >> } >> ?> >> >> I'm having a terrible time getting this to work. Is there a better way? Or >can someone point me toward or post an example of some working function I >could study??? >> > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php >

    ________________________--__-______-______________ eat pasta type fasta

    attached mail follows:


    I've looked, and can not find out how you send attachments using the mail() function. I find it difficult to believe that this was left out, so obviously I'm missing something right in front of my face.

    So my question is, how do you send attachments using the mail() fucntion?

    -Danny "You are stuuuuupid." Dexter of Dexter's labratory

    Yes, I watch Dexter ... you got a problem with that! :-)

    _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com

    attached mail follows:


    You can't (in the sense that there's an $attachment argument), but I've seen several classes that will let you do it. Check zend.com and php.resourceindex.com for the classes.

    On Thu, 1 Aug 2002, Danny wall wrote:

    > I've looked, and can not find out how you send attachments using the mail() > function. I find it difficult to believe that this was left out, so > obviously I'm missing something right in front of my face. > > So my question is, how do you send attachments using the mail() fucntion? > > -Danny > "You are stuuuuupid." > Dexter of Dexter's labratory > > Yes, I watch Dexter ... you got a problem with that! :-) > > > _________________________________________________________________ > Chat with friends online, try MSN Messenger: http://messenger.msn.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Shouldnt there be some sort of MIME header for it?

    "Philip Hallstrom" <philipadhesivemedia.com> wrote in message news:20020801111647.M3050-100000cypress.adhesivemedia.com... > You can't (in the sense that there's an $attachment argument), but I've > seen several classes that will let you do it. Check zend.com and > php.resourceindex.com for the classes. > > On Thu, 1 Aug 2002, Danny wall wrote: > > > I've looked, and can not find out how you send attachments using the mail() > > function. I find it difficult to believe that this was left out, so > > obviously I'm missing something right in front of my face. > > > > So my question is, how do you send attachments using the mail() fucntion? > > > > -Danny > > "You are stuuuuupid." > > Dexter of Dexter's labratory > > > > Yes, I watch Dexter ... you got a problem with that! :-) > > > > > > _________________________________________________________________ > > Chat with friends online, try MSN Messenger: http://messenger.msn.com > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > >

    attached mail follows:


    Ah ... well that's good. I thought I was just being an idiot. Thanks for the resources, a couple of the classes will do the job nicely.

    -Danny

    >From: Philip Hallstrom <philipadhesivemedia.com> >To: Danny wall <dannywallhotmail.com> >CC: php-generallists.php.net >Subject: [PHP] Re: attachements in mail() >Date: Thu, 1 Aug 2002 11:17:37 -0700 (PDT) > >You can't (in the sense that there's an $attachment argument), but I've >seen several classes that will let you do it. Check zend.com and >php.resourceindex.com for the classes. > >On Thu, 1 Aug 2002, Danny wall wrote: > > > I've looked, and can not find out how you send attachments using the >mail() > > function. I find it difficult to believe that this was left out, so > > obviously I'm missing something right in front of my face. > > > > So my question is, how do you send attachments using the mail() >fucntion? > > > > -Danny > > "You are stuuuuupid." > > Dexter of Dexter's labratory > > > > Yes, I watch Dexter ... you got a problem with that! :-) > > > > > > _________________________________________________________________ > > Chat with friends online, try MSN Messenger: http://messenger.msn.com > > > > > > -- > > 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

    -Danny "You are stuuuuupid." Dexter of Dexter's labratory

    Yes, I watch Dexter ... you got a problem with that! :-)

    _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com

    attached mail follows:


    Hello,

    On 08/01/2002 03:14 PM, Danny Wall wrote: > I've looked, and can not find out how you send attachments using the > mail() function. I find it difficult to believe that this was left out, > so obviously I'm missing something right in front of my face. > > So my question is, how do you send attachments using the mail() fucntion?

    Try this class as it does exactly what you want and probably more. Besides attachments (multipart/mixed), it is also capable of sending multipart/related messages to let you compose HTML messages with images and other embedded files, and multipart/alternative to let you compose messages with alternative text and HTML versions in the same message body.

    http://www.phpclasses.org/mimemessage

    -- 
    

    Regards, Manuel Lemos

    attached mail follows:


    This thing's pretty cool! Thanks!

    -Danny

    >From: Manuel Lemos <mlemosacm.org> >Reply-To: mlemosacm.org >To: php-generallists.php.net >Subject: [PHP] Re: attachements in mail() >Date: Thu, 01 Aug 2002 17:43:04 -0300 > >Hello, > >On 08/01/2002 03:14 PM, Danny Wall wrote: >>I've looked, and can not find out how you send attachments using the >>mail() function. I find it difficult to believe that this was left out, >>so obviously I'm missing something right in front of my face. >> >>So my question is, how do you send attachments using the mail() fucntion? > >Try this class as it does exactly what you want and probably more. Besides >attachments (multipart/mixed), it is also capable of sending >multipart/related messages to let you compose HTML messages with images and >other embedded files, and multipart/alternative to let you compose messages >with alternative text and HTML versions in the same message body. > >http://www.phpclasses.org/mimemessage > > >-- > >Regards, >Manuel Lemos > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    -Danny "You are stuuuuupid." Dexter of Dexter's labratory

    Yes, I watch Dexter ... you got a problem with that! :-)

    _________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com

    attached mail follows:


    I'm trying to make a small script that I can use for randomizing teams and stuff, I have one field where I enter how many teams, one for how many in each team, and a <textarea> to write down all the players in. This is where my brain stopped working, first I was thinking about using split, but I don't know how when there isn't a predefined number of variables to split it into, how do I do this?

    and when I have separated them into variables, how do I put them into arrays? or maybe that's not a good way to do it? I don't know, and the heat in my room is killing me, can't think clearly :)

    Håkan

    attached mail follows:


    split should work fine... Just do something like:

    $teamMembersArray = split(" ,;", $textarea);

    That will give you an array of the team members. Of course I'm assuming that their names don't include spaces and that you'll separate them with either a space, comma, or semi-colon. And you'll want to get rid of any newlines in $textarea as well.

    -philip

    On Thu, 1 Aug 2002, Hawk wrote:

    > I'm trying to make a small script that I can use for randomizing teams and > stuff, I have one field where I enter how many teams, one for how many in > each team, and a <textarea> to write down all the players in. This is where > my brain stopped working, first I was thinking about using split, but I > don't know how when there isn't a predefined number of variables to split it > into, how do I do this? > > and when I have separated them into variables, how do I put them into > arrays? > or maybe that's not a good way to do it? I don't know, and the heat in my > room is killing me, can't think clearly :) > > Håkan > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    At 08:19 PM 8/1/2002 +0200, Hawk wrote:

    try using explode then walk through the array that explode makes :-)

    does that help?

    ~kurth

    >I'm trying to make a small script that I can use for randomizing teams and >stuff, I have one field where I enter how many teams, one for how many in >each team, and a <textarea> to write down all the players in. This is where >my brain stopped working, first I was thinking about using split, but I >don't know how when there isn't a predefined number of variables to split it >into, how do I do this? > >and when I have separated them into variables, how do I put them into >arrays? >or maybe that's not a good way to do it? I don't know, and the heat in my >room is killing me, can't think clearly :) > >Håkan > > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer

    "Jedi business, Go back to your drinks" - Anakin Skywalker, AOTC

    kurthusaexpress.net | http://kurth.hardcrypto.com PGP key available - http://kurth.hardcrypto.com/pgp

    attached mail follows:


    New To Php so please bear with me... :)

    I used the readdir function to read the files listed on a Apache server. And it worked fine. Now I would like to be able to get the files the php code returns, to be links. Where the user can click the file and download it. Also for the files to sit within a table or at least look neat on the page. http://www.optimus7.com/findme.php is the result I get from the php code below. Help!

    <?php if ($handle = opendir('/my/directory')) { echo "Directory handle: $handle\n"; echo "Files:\n";

    while (false !== ($file = readdir($handle))) { echo "$file\n"; }

    closedir($handle); } ?>

    attached mail follows:


    > From: msmeccamindspring.com [mailto:msmeccamindspring.com] > Sent: Thursday, August 01, 2002 2:54 PM > To: php-generallists.php.net > Subject: [PHP] Readdir > > New To Php so please bear with me... :) > > I used the readdir function to read the files listed on a > Apache server. And > it worked fine. Now I would like to be able to get the files > the php code > returns, to be links. Where the user can click the file and > download it. Also > for the files to sit within a table or at least look neat on the page. > http://www.optimus7.com/findme.php is the result I get from > the php code > below. Help! > > <?php > if ($handle = opendir('/my/directory')) { > echo "Directory handle: $handle\n"; > echo "Files:\n"; > > > > while (false !== ($file = readdir($handle))) { > echo "$file\n"; > } > > > closedir($handle); > } > ?>

    Change your echo stmt to something like:

    echo "<a href=\"$file\">$file</a><br>\n";

    attached mail follows:


    Change:

    echo "$file\n";

    to:

    echo "<a href='$file'>$file</a>\n"; Note the nested quotes -- outer quotes - ", inner quotes (around $file) single - '

    Best,

    Nicole

    msmeccamindspring.com wrote:

    >New To Php so please bear with me... :) > >I used the readdir function to read the files listed on a Apache server. And >it worked fine. Now I would like to be able to get the files the php code >returns, to be links. Where the user can click the file and download it. Also >for the files to sit within a table or at least look neat on the page. >http://www.optimus7.com/findme.php is the result I get from the php code >below. Help! > ><?php >if ($handle = opendir('/my/directory')) { > echo "Directory handle: $handle\n"; > echo "Files:\n"; > > > > while (false !== ($file = readdir($handle))) { > echo "$file\n"; > } > > > closedir($handle); >} >?> >

    -- 
    ########################
    Nicole Lallande
    nicolenmlconsulting.com
    760.753.6766
    ########################
    

    attached mail follows:


    On Friday 02 August 2002 02:53, msmeccamindspring.com wrote: > New To Php so please bear with me... :) > > I used the readdir function to read the files listed on a Apache server. > And it worked fine.

    > http://www.optimus7.com/findme.php is the result I get from the php > code below. Help! > > <?php > if ($handle = opendir('/my/directory')) { > echo "Directory handle: $handle\n"; > echo "Files:\n"; > > > > while (false !== ($file = readdir($handle))) { > echo "$file\n"; > } > > > closedir($handle); > } > ?>

    1) If you don't want the parent directory (..) and current directory (.) to appear you should follow the example(s) in the manual.

    2) In your while loop you can do something like:

    while (false !== ($file = readdir($handle))) { $file_array[] = $file; }

    This will put all your files into an array $file_array, which you can then use foreach() to loop through each item and display neatly.

    > Now I would like to be able to get the files the php > code returns, to be links. Where the user can click the file and download > it. Also for the files to sit within a table or at least look neat on the > page.

    These are basic HTML issues which presumably you should know the answer to.

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

    /* Alimony is the high cost of leaving. */

    attached mail follows:


    ><?php >if ($handle = opendir('/my/directory')) { > echo "Directory handle: $handle\n"; > echo "Files:\n"; > > > > while (false !== ($file = readdir($handle))) { > echo "$file\n"; > }

    Everything is good, you just to make a slight addition to your echo.

    echo "<a href=\"$file\">$file</a><P>"

    -Danny "You are stuuuuuupid" Dexter of Dexter's Labratory

    Yeah, I watch Dexter, you got a problem with that! :-)

    _________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com

    attached mail follows:


    Is there some easy way to make rand() only use each number once in a loop, to avoid getting the same values more than once?

    Håkan

    attached mail follows:


    No... that wouldn't really be random then would it? :) But you could always keep track of the previous random numbers and if you've seen it ask for another one.

    On Thu, 1 Aug 2002, Hawk wrote:

    > Is there some easy way to make rand() only use each number once in a loop, > to avoid getting the same values more than once? > > Håkan > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Well, the predictions have come true. In San Antonio only four folks signed up for the meetup, and the event was cancelled with no way to get in touch with the other local developers to make a go of it. Out of the 147 cities listed only 15 had enough people for meetup.com to do their thing. A noble idea, but ...

    I want to encourage developers to farm PHP developer groups in their own communities. Some may find that their community already has a users group (a list is available at http://www.phpusergroups.org) although some of these groups are not really groups at all, just people looking to form groups.

    If you live in the San Antonio area I would be glad to be the chief-wrangler-whats-in-charge for just such a group. Please contact me directly. I am also working on a Texas PHP Developer Conference at the beautiful T Bar M Resort & Conference Center in New Braunfels, Texas sometime between January and April of 2003. I have begun contacting potential speakers and hope to have people who wish to present papers at the conference as well as do some other fun activities such as a high or low ropes course, golf, tennis, etc. All suggestions and admonitions are welcome. Everyone in Texas is invited to contact me so that I can dispurse further information. Also, my contact at T Bar M says, "The more, the cheaper ... " as discounts for larger groups are available. Heck, even if you don't live in Texas but would be interested in attending drop me a line and I'll keep you up to date.

    Thanks!

    Jay

    It’s as bad as you think, and they are out to get you.

    *************************************** * * * Texas PHP Developers Meeting * * Spring 2003 * * T Bar M Resort & Conference Center * * New Braunfels, Texas * * Interested? Contact; * * jay.blanchardniicommunications.com * * * ***************************************

    attached mail follows:


    I am trying to get code that I have saved as a string in a database to evaluate as code within a larger script with a loop. There are obvious security concerns with allowing users to input code into the field if it is not preprocessed before it is evaluated. The eval function appears to be the ticket with PHP 4 since it will return the results as well. Has anyone got an example of an appropriate preprocessing strategy and/or example of eval() being used this way? Thanks to those that replied to my original post.

    --
    

    Dave Pratt

    attached mail follows:


    You can't really do much to make sure the execution of eval is safe, it's more than you have to trust the string that you're about to eval().

    So, as long as you and your production team were the only ones who put the code into the strings or tables, and tested the code before hand, then 90% there.

    I'd suggest also reading all the user-contributed notes at http://php.net/eval too.

    Justin

    on 02/08/02 5:26 AM, David Pratt (dave.prattwebcoursesnow.com) wrote:

    > I am trying to get code that I have saved as a string in a database to > evaluate as code within a larger script with a loop. There are obvious > security concerns with allowing users to input code into the field if it is > not preprocessed before it is evaluated. The eval function appears to be the > ticket with PHP 4 since it will return the results as well. Has anyone got > an example of an appropriate preprocessing strategy and/or example of eval() > being used this way? Thanks to those that replied to my original post. > > -- > > Dave Pratt

    attached mail follows:


    Thanks, Justin. I am really trying to figure something else out instead of eval. It is really too much of a security hole. I really appreciate the community to bounce ideas.

    Regards, Dave

    ---------- >From: Justin French <justinindent.com.au> >To: David Pratt <dave.prattwebcoursesnow.com>, <php-generallists.php.net> >Subject: Re: [PHP] Example safe use of eval() >Date: Thu, Aug 1, 2002, 5:35 PM >

    > You can't really do much to make sure the execution of eval is safe, it's > more than you have to trust the string that you're about to eval(). > > So, as long as you and your production team were the only ones who put the > code into the strings or tables, and tested the code before hand, then 90% > there. > > I'd suggest also reading all the user-contributed notes at > http://php.net/eval too. > > > Justin > > > on 02/08/02 5:26 AM, David Pratt (dave.prattwebcoursesnow.com) wrote: > >> I am trying to get code that I have saved as a string in a database to >> evaluate as code within a larger script with a loop. There are obvious >> security concerns with allowing users to input code into the field if it is >> not preprocessed before it is evaluated. The eval function appears to be the >> ticket with PHP 4 since it will return the results as well. Has anyone got >> an example of an appropriate preprocessing strategy and/or example of eval() >> being used this way? Thanks to those that replied to my original post. >> >> -- >> >> Dave Pratt > >

    attached mail follows:


    Hi,

    I'd like to register a session and create several session variables. In another part of my site, I'd like to register another session again creating session variables. After a bit, I'd like to destroy this second registered session keeping the first intact. Thus far, whenever I issue:

    session_unset(); session_destroy();

    both sessions are obliterated. Is there a method of managing different sessions where I can create additional sessions and destroy them without losing my initial session?

    Thanks, Don

    attached mail follows:


    > I'd like to register a session and create several session variables. In > another part of my site, I'd like to register another session again > creating > session variables. After a bit, I'd like to destroy this second > registered > session keeping the first intact. Thus far, whenever I issue: > > session_unset(); > session_destroy(); > > both sessions are obliterated. Is there a method of managing different > sessions where I can create additional sessions and destroy them without > losing my initial session?

    There is only one $_SESSION. What you can do, though, assuming you're using the latest version of PHP, is make $_SESSION a multi-dimensional array.

    So for one area of your site, you can assign variables to the session like this:

    $_SESSION['area_one']['value1'] = "This String"; $_SESSION['area_one']['value2'] = 10;

    Then, in another area, you can do the same thing, basically...

    $_SESSION['area_two']['value1'] = 'Something'; $_SESSION['area_two']['value2'] = 1000;

    Then...when you want to drop the session values for Area Two, you just do this:

    Unset($_SESSION['area_two']);

    ---John Holmes...

    attached mail follows:


    If anyone responds to this thanks a lot because this is a lot to ask. I've never coded anything for a paying customer.

    I'll be using Apache, MySQL and php of course.

    Or... how about this application already exists somewhere??

    Requirements/Design ------------------- 1. Any page requiring authentication should be in a secure directory. The login for the directory will be issued behind the scenes once the user is authenticated. This prevents anyone from by passing the login.

    2. Once you login once for a session all other pages requiring authentication become accessible to you (i.e record login in a cookie).

    2. If you do not yet have a username/password then you can click on register, where you enter the following:

    Name * Title Company * Address * Tel Fax Email * LicenseId * Username * Password * Confirm Password *

    * = required Username must be unique. LicenseId must exist in a table of currently active licenses maintained by KINESYS.

    3. If registration is successful then the account is stored in the database and the user continues to the originally requested page.

    4. On the login page there should be a "Forgotten password?" link. When you click it you have to enter your email address and if it exists in the database, the username and password is emailed to you.

    5. Each login with date and time should be recorded in the database linked to the Username. Ideally each download should also be recorded.

    6. The pages requiring authentication should be in a secure directory. The login for the directory will be issued behind the scenes. This prevents anyone from by passing the login.

    7. There must be an administration page in the secure directory that allows KINESYS to maintain the list of LicenseIds in the License table, and to view the user and event tables.

    Here is my take on the initial database schema.

    Table: License Primary Key: LicenseId

    Table: User Primary key: UserId (autoincrement) Required Unique Field: UserName Required Field: Password Required Field: Name Field: Title Required Field: Company Required Field: Address1 Required Field: Address2 Required Field: Address3 Required Field: Address4 Field: Tel Field: Fax Required Field: Email Required Foreign Key: LicenseId

    Table: Event Primary Key: EventId (autoincrement) Required Field: Timestamp Required Foreign Key: UserId Required Field: Description (e.g. "Login", "Downloaded ALPS LT 2.61.1")

    attached mail follows:


    I suggest you look at the article restricting page access by Kevin Yank on http://sitepoint.com... I used it for the basis of what I use on every site now, and it will give you a better understanding of sessions, logging in, registering, etc etc.

    Other comments included in your email below:

    on 02/08/02 5:56 AM, PHP mail (phpitab.com) wrote:

    > > If anyone responds to this thanks a lot because this is a lot to ask. I've > never coded anything for a paying customer. > > I'll be using Apache, MySQL and php of course. > > Or... how about this application already exists somewhere??

    see above

    > Requirements/Design > ------------------- > 1. Any page requiring authentication should be in a secure directory. The > login for the directory will be issued behind the scenes once the user is > authenticated. This prevents anyone from by passing the login.

    They don't need to be in a different directory. If you use Kevin's code as a base, all you'll have to do is include a single file at the top of any page you wish to make restricted.

    > 2. Once you login once for a session all other pages requiring > authentication become accessible to you (i.e record login in a cookie).

    Kevin's code uses sessions (the smart way to do this stuff), but unfortunately his code relies only cookies, not sessions in the URL.

    > 2. If you do not yet have a username/password then you can click on > register, where you enter the following: > > Name * > Title > Company * > Address * > Tel > Fax > Email * > LicenseId * > Username * > Password * > Confirm Password * > > * = required > Username must be unique. > LicenseId must exist in a table of currently active licenses maintained by > KINESYS.

    you'll have to modify kevin's code / table to acomodate you needs, as I have.

    > 3. If registration is successful then the account is stored in the database > and the user continues to the originally requested page.

    yup, all taken care of

    > 4. On the login page there should be a "Forgotten password?" link. When you > click it you have to enter your email address and if it exists in the > database, the username and password is emailed to you.

    not as easy, because Kevin (rightly so) encrypts passwords with MySQL's PASSWORD(), a one-way encryption.

    I built a password-resetting program instead, which generates a new password and emails it to the user if they forget the old one.

    ... or you could store the passwords in clear text, then emailing them would be possible.

    > 5. Each login with date and time should be recorded in the database linked > to the Username. Ideally each download should also be recorded.

    this would be an extension to the code, but reasonably straight forward. Downloads will take some time to nail, but everything else will be pretty straight forward.

    > 6. The pages requiring authentication should be in a secure directory. The > login for the directory will be issued behind the scenes. This prevents > anyone from by passing the login.

    it won't be needed with kev's code. the basic structure of his code is:

    check for existing user/session if yes, show page if no, show login form and a link to sign-up form

    if login form was submitted, validate everything, set a session, show the page, else show "sorry, invalid login"

    if a sign-up form was submitted, validate input, add to db, and send a confirmation email to the user (i think), and once confirmed, they'll be able to login.

    > 7. There must be an administration page in the secure directory that allows > KINESYS to maintain the list of LicenseIds in the License table, and to view > the user and event tables.

    I have an extra column in my users table which is called admin_clearance (1|0)... if they have admin clearance, it's noted in the session, and they're able to do more "stuff", and access admin-only pages (an extension to kev's code.

    > Here is my take on the initial database schema. > > Table: License > Primary Key: LicenseId > > Table: User > Primary key: UserId (autoincrement) > Required Unique Field: UserName > Required Field: Password > Required Field: Name > Field: Title > Required Field: Company > Required Field: Address1 > Required Field: Address2 > Required Field: Address3 > Required Field: Address4 > Field: Tel > Field: Fax > Required Field: Email > Required Foreign Key: LicenseId > > Table: Event > Primary Key: EventId (autoincrement) > Required Field: Timestamp > Required Foreign Key: UserId > Required Field: Description (e.g. "Login", "Downloaded ALPS LT 2.61.1")

    Suffice to say, this is a big project. If it's your first, be warned that there is a LOT of work here, especially if you're new to sessions, encryption, data validation, etc etc.

    But the good news is that kev's stuff will be a great start, and the tutorial/code was the basis for everything I know and do with sessions these days.

    The article was written b4 the new global arrays ($_SESSION etc) so the code has to be modified a little if you have register_globals off in your php.ini.

    You'll find that the code you write (essentially an include file at the top of any page you want to restrict, plus a few other scripts for sign-up, password reset, log-out, etc) will be highly portable. I just grab the code base from my library folder, and it plugs in to the new site with a simple config change of a few lines.

    This code is worth a lot, especially if it's done right. But if you think you can use it over and over and over, then perhaps the price you charge will not be proportionate to the hours you spent on the code.

    Let's say you spend 10 hours perfecting, tweaking and testing the shit out of the code. You could charge the client for 10 hours, but if you feel this is out of their budget, you could license the code to them at a fraction of your original cost (say 4 hours-ish), and by doing this with many clients, make a profit on the code library over the coming months.

    I guess what I'm trying to say is just quote them a price you think they'll accept, do it right, spend heaps of time on it, perfect it, and then re-use the code over and over with other clients to make your time back, and make a profit from it.

    Good luck,

    Justin French

    attached mail follows:


    Hi,

    I have having problems getting the session to automatically destroy itself after inactivity. Currently I am using the following code, just to test my setup before writing a bigger project.

    <? session_start(); ?> <html> <body> <? $_SESSION['count'] = $_SESSION['count']+1; echo "COUNT = " . $_SESSION['count']; echo "<br>Current Cache Expire = " . session_cache_expire(); // currently set to 1 in php.ini ?> </body> </html>

    my php.ini file has the following session settings:-

    [Session] session.save_handler = files session.use_cookies = 1 session.name = PHPSESSID session.auto_start = 0 session.cookie_lifetime = 0 session.cookie_path = / session.cookie_domain = session.serialize_handler = php session.gc_probability = 1 session.gc_maxlifetime = 1 session.referer_check = session.entropy_length = 0 session.entropy_file = ;session.entropy_length = 16 ;session.entropy_file = /dev/urandom session.cache_limiter = nocache session.cache_expire = 1 session.use_trans_sid = 1

    The server is running Apache 1.3.26, PHP4.2.1(apache module) on FreeBSD 4.6

    Can anyone help, cheers

    Lee

    attached mail follows:


    I have a for loop, and an if that checks something, and if true, it's supposed to add info to an array called $ra, but instead of adding it to the array it seems like it's overwriting it, currently I'm using $ra[$r] = "$r"; where $r is a number.. after the for } I put a print_r($ra); and it only prints the last thing that was added to the array. How do I solve this? Haven't used arrays much so I'm trying to learn, but it's not going very well :)

    Håkan

    attached mail follows:


    just assign the value to $ra[]

    "Hawk" <hw2kbarrysworld.com> wrote in message news:20020801210856.61486.qmailpb1.pair.com... > I have a for loop, and an if that checks something, and if true, it's > supposed to add info to an array called $ra, but instead of adding it to the > array it seems like it's overwriting it, currently I'm using $ra[$r] = > "$r"; where $r is a number.. > after the for } I put a print_r($ra); and it only prints the last thing that > was added to the array. How do I solve this? Haven't used arrays much so I'm > trying to learn, but it's not going very well :) > > Håkan > > >

    attached mail follows:


    Tried that now, and with the same results print_r($ra); still only shows the last info inserted in the array :/

    "Aaron" <aaron_otthotmail.com> skrev i meddelandet news:20020801211307.65119.qmailpb1.pair.com... > just assign the value to $ra[] > > > "Hawk" <hw2kbarrysworld.com> wrote in message > news:20020801210856.61486.qmailpb1.pair.com... > > I have a for loop, and an if that checks something, and if true, it's > > supposed to add info to an array called $ra, but instead of adding it to > the > > array it seems like it's overwriting it, currently I'm using $ra[$r] = > > "$r"; where $r is a number.. > > after the for } I put a print_r($ra); and it only prints the last thing > that > > was added to the array. How do I solve this? Haven't used arrays much so > I'm > > trying to learn, but it's not going very well :) > > > > Håkan > > > > > > > >

    attached mail follows:


    can we see the code?

    -aaron

    "Hawk" <hw2kbarrysworld.com> wrote in message news:20020801211825.68352.qmailpb1.pair.com... > Tried that now, and with the same results > print_r($ra); still only shows the last info inserted in the array :/ > > "Aaron" <aaron_otthotmail.com> skrev i meddelandet > news:20020801211307.65119.qmailpb1.pair.com... > > just assign the value to $ra[] > > > > > > "Hawk" <hw2kbarrysworld.com> wrote in message > > news:20020801210856.61486.qmailpb1.pair.com... > > > I have a for loop, and an if that checks something, and if true, it's > > > supposed to add info to an array called $ra, but instead of adding it to > > the > > > array it seems like it's overwriting it, currently I'm using $ra[$r] = > > > "$r"; where $r is a number.. > > > after the for } I put a print_r($ra); and it only prints the last thing > > that > > > was added to the array. How do I solve this? Haven't used arrays much so > > I'm > > > trying to learn, but it's not going very well :) > > > > > > Håkan > > > > > > > > > > > > > > >

    attached mail follows:


    It's all in the manual.. http://www.php.net

    Each one of these methods will assign two strings to the array and print the string, "mysecondvalue".

    --
    $ra = array ("myfirstvalue", "mysecondvalue");
    echo $ra[1];
    --
    $ra = array();
    $ra[] = "myfirstvalue";
    $ra[] = "mysecondvalue";
    echo $ra[1];
    --
    $ra[0] = "myfirstvalue";
    $ra[1] = "mysecondvalue";
    echo $ra[1];
    --
    $ra = array("a" => "myfirstvalue", "b" => "mysecondvalue");
    echo $rap[b];
    --
    $ra = array("myfirstvalue");
    array_push($ra, "mysecondvalue");
    echo $ra[1];
    --
    

    -Kevin

    ----- Original Message ----- From: "Hawk" <hw2kbarrysworld.com> To: <php-generallists.php.net> Sent: Thursday, August 01, 2002 3:17 PM Subject: [PHP] Re: adding info to an array?

    > Tried that now, and with the same results > print_r($ra); still only shows the last info inserted in the array :/ > > "Aaron" <aaron_otthotmail.com> skrev i meddelandet > news:20020801211307.65119.qmailpb1.pair.com... > > just assign the value to $ra[] > > > > > > "Hawk" <hw2kbarrysworld.com> wrote in message > > news:20020801210856.61486.qmailpb1.pair.com... > > > I have a for loop, and an if that checks something, and if true, it's > > > supposed to add info to an array called $ra, but instead of adding it to > > the > > > array it seems like it's overwriting it, currently I'm using $ra[$r] = > > > "$r"; where $r is a number.. > > > after the for } I put a print_r($ra); and it only prints the last thing > > that > > > was added to the array. How do I solve this? Haven't used arrays much so > > I'm > > > trying to learn, but it's not going very well :) > > > > > > Håkan > > > > > > > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    I'm a newbie at php, so dont tease me ;P first I have to input fields for $group and $amount and a textarea where you enter bla,blah,blabla etc

    $total = $amount*$group-1; $da = split (",", $textarea); for ($a = 1; $a <= $group; $a++) { print "<tr><td><table><tr><td>Group $a:<tr><td>"; for ($b = 1; $b <= $amount; $b++) {

    $ra = array(); $r = rand(0,$total); $check = in_array($r,$ra); if ($check == false) { $ra[] = "$r"; print "<center>$da[$r] - $r<br>"; } elseif ($check == true) $r = rand(0,$totalt); $b--; // }

    Maybe I'm doing completly wrong, but this is the way I was trying to solve it, just can't get it to work, even if I think it should :P

    "Aaron" <aaron_otthotmail.com> skrev i meddelandet news:20020801213216.74878.qmailpb1.pair.com... > can we see the code? > > -aaron > > "Hawk" <hw2kbarrysworld.com> wrote in message > news:20020801211825.68352.qmailpb1.pair.com... > > Tried that now, and with the same results > > print_r($ra); still only shows the last info inserted in the array :/ > > > > "Aaron" <aaron_otthotmail.com> skrev i meddelandet > > news:20020801211307.65119.qmailpb1.pair.com... > > > just assign the value to $ra[] > > > > > > > > > "Hawk" <hw2kbarrysworld.com> wrote in message > > > news:20020801210856.61486.qmailpb1.pair.com... > > > > I have a for loop, and an if that checks something, and if true, it's > > > > supposed to add info to an array called $ra, but instead of adding it > to > > > the > > > > array it seems like it's overwriting it, currently I'm using $ra[$r] > = > > > > "$r"; where $r is a number.. > > > > after the for } I put a print_r($ra); and it only prints the last > thing > > > that > > > > was added to the array. How do I solve this? Haven't used arrays much > so > > > I'm > > > > trying to learn, but it's not going very well :) > > > > > > > > Håkan > > > > > > > > > > > > > > > > > > > > > > > >

    attached mail follows:


    hahahaha, that was so stupid of me... should have put if (! $ra) { $ra = array(); } but I seemed to have missed this.. lol :P thanks for your help and sorry for being an idiot ;D

    "Hawk" <hw2kbarrysworld.com> skrev i meddelandet news:20020801214319.80796.qmailpb1.pair.com... > I'm a newbie at php, so dont tease me ;P > first I have to input fields for $group and $amount > and a textarea where you enter bla,blah,blabla etc > > $total = $amount*$group-1; > $da = split (",", $textarea); > for ($a = 1; $a <= $group; $a++) { > print "<tr><td><table><tr><td>Group $a:<tr><td>"; > for ($b = 1; $b <= $amount; $b++) { > > $ra = array(); > $r = rand(0,$total); > $check = in_array($r,$ra); > if ($check == false) { > $ra[] = "$r"; > print "<center>$da[$r] - $r<br>"; > } > elseif ($check == true) > $r = rand(0,$totalt); > $b--; // > } > > Maybe I'm doing completly wrong, but this is the way I was trying to solve > it, just can't get it to work, even if I think it should :P > > "Aaron" <aaron_otthotmail.com> skrev i meddelandet > news:20020801213216.74878.qmailpb1.pair.com... > > can we see the code? > > > > -aaron > > > > "Hawk" <hw2kbarrysworld.com> wrote in message > > news:20020801211825.68352.qmailpb1.pair.com... > > > Tried that now, and with the same results > > > print_r($ra); still only shows the last info inserted in the array :/ > > > > > > "Aaron" <aaron_otthotmail.com> skrev i meddelandet > > > news:20020801211307.65119.qmailpb1.pair.com... > > > > just assign the value to $ra[] > > > > > > > > > > > > "Hawk" <hw2kbarrysworld.com> wrote in message > > > > news:20020801210856.61486.qmailpb1.pair.com... > > > > > I have a for loop, and an if that checks something, and if true, > it's > > > > > supposed to add info to an array called $ra, but instead of adding > it > > to > > > > the > > > > > array it seems like it's overwriting it, currently I'm using > $ra[$r] > > = > > > > > "$r"; where $r is a number.. > > > > > after the for } I put a print_r($ra); and it only prints the last > > thing > > > > that > > > > > was added to the array. How do I solve this? Haven't used arrays > much > > so > > > > I'm > > > > > trying to learn, but it's not going very well :) > > > > > > > > > > Håkan > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >

    attached mail follows:


    On Friday 02 August 2002 06:30, Hawk wrote: > hahahaha, that was so stupid of me... should have put if (! $ra) { $ra = > array(); } but I seemed to have missed this.. lol :P > thanks for your help and sorry for being an idiot ;D

    It's better to initialise $ra outside of the for-loop.

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

    /* Save yourself! Reboot in 5 seconds! */

    attached mail follows:


    Besides using fOpen to save the output of a script to a file, What would be your best recommendation for a way to save the output of a PHP script to an HTML doc. Images will be included.

    Thanks gang. - NorthBayShane

    attached mail follows:


    You can wrap some output buffering around your PHP script. Then flush the buffer at the end to a variable and write it to a .html file.

    Full details in the manual, I'm sure...

    ---John Holmes...

    ----- Original Message ----- From: "Shane" <shanedelaplaine.com> To: <php-generallists.php.net> Sent: Thursday, August 01, 2002 6:48 PM Subject: [PHP] Best way to save?

    Besides using fOpen to save the output of a script to a file, What would be your best recommendation for a way to save the output of a PHP script to an HTML doc. Images will be included.

    Thanks gang. - NorthBayShane

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

    attached mail follows:


    Anyone have a favorite Calendar script out there they would like to share?

    - NorthBayShane

    attached mail follows:


    Is there any method to encrypt PHP files.

    Nyon

    attached mail follows:


    One option is the Zend Encoder

    Martin

    -----Original Message----- From: YC Nyon [mailto:ycnyonpd.jaring.my] Sent: Friday, August 02, 2002 2:59 AM To: php-generallists.php.net Subject: [PHP] Protect PHP coding

    Is there any method to encrypt PHP files.

    Nyon

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

    attached mail follows:


    And the server must install Zend Optimizer

    ----- Original Message ----- From: Martin Towell Sent: Friday, August 02, 2002 8:09 AM To: 'YC Nyon'; php-generallists.php.net Subject: RE: [PHP] Protect PHP coding

    One option is the Zend Encoder

    Martin

    -----Original Message----- From: YC Nyon [mailto:ycnyonpd.jaring.my] Sent: Friday, August 02, 2002 2:59 AM To: php-generallists.php.net Subject: [PHP] Protect PHP coding

    Is there any method to encrypt PHP files.

    Nyon

    -- 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.phpGet more from the Web. FREE MSN Explorer download : http://explorer.msn.com

    attached mail follows:


    Hello,

    On 08/01/2002 01:58 PM, Yc Nyon wrote: > Is there any method to encrypt PHP files.

    Use bcompiler which is free and is part of PEAR/PECL official PHP extensions repository:

    http://pear.php.net/package-info.php?pacid=95

    -- 
    

    Regards, Manuel Lemos

    attached mail follows:


    >Howdy List, > >Well, apparently we are no longer permitted to receive "personal" emails where I am working, so I'm afraid I'll have to part ways with the lot of you. It's unfortunate, considering I think this one of the best places to find information about PHP (and more!) on the internet. It sure as hell as taught me a lot about our craft. > >To those that I have helped, thank you for giving me the opportunity to do so. It has truly been MY pleasure. You can always contact me at this address if you're in a bind, and I'll do what I can :o) > >To those that have helped me, one HUGE THANK YOU!!! You all are the best of the best, and I'll always been grateful for the advice and knowledge that you all have shared with me. You are truly great people to be so generous. Thank you again! > >If anyone wants to contact me, you'll have to reply directly, as I'm unsubscribing after I send this last mail. Against my will, no doubt, but leaving just the same. Take care, everyone, and as always... > >Happy Coding! :o) > >Martin Clifford >Homepage: http://www.completesource.net >Developer's Forums: http://www.completesource.net/forums/ > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    Somebody actually told you this list has no value for the kind of work you do? If you do any kind of web applications then I find that hard to believe that this list wouldn't be considered an acceptable resource.

    attached mail follows:


    In article <200207311804.57143.php-generalgremlins.com.hk>, php-generalgremlins.com.hk (Jason Wong) wrote:

    > On Wednesday 31 July 2002 18:36, lallous wrote: > > Hello when I extended a class and overwrite a function, can i after > > overwriting that function call it so it does what it used to do? > > > > for example in Delphi I say: > > > > procedure TMyExtendedClass.Proc1; > > begin > > // do new stuff here > > inherited; // calls the TMyClass.Proc1; > > end; > > Yes.

    $answer.="http://www.php.net/manual/en/keyword.paamayim-nekudotayim.php";

    -- 
    CC
    

    attached mail follows:


    Hi to all,

    How could i decrypt the encrypted data in MYSQL? I've inserted values in mysql using the PASSWORD( $userpassword ) function to encrypt all user password. Example: Insert into Users_Table set Password_Field=PASSWORD('$userpassword');

    But i don't know how to select to view the $userpassword value.

    Is there anyone who could help? Thanks in advance.

    Mike

    attached mail follows:


    You can't view it anymore. You can compare a string with PASSWORD('string') to see if they match.

    --
    Julio Nobrega
    Pode acessar:
    http://www.inerciasensorial.com.br
    

    "Michael P. Carel" <mikecarelteamglac.com> escreveu na mensagem news:001101c239c1$541db6a0$4301a8c0teamglac.com... > Hi to all, > > How could i decrypt the encrypted data in MYSQL? > I've inserted values in mysql using the PASSWORD( $userpassword ) function > to encrypt all user password. > Example: > Insert into Users_Table set Password_Field=PASSWORD('$userpassword'); > > But i don't know how to select to view the $userpassword value. > > Is there anyone who could help? Thanks in advance. > > > Mike >

    attached mail follows:


    so you mean there's no way to decrypt that. I wan't to create a Password Reminder to my script, that would email them their password if ever they forgot it. Is there any suggestion/comments?

    >You can't view it anymore. You can compare a string with >PASSWORD('string') to see if they match.

    >Julio Nobrega >Pode acessar: >http://www.inerciasensorial.com.br > Hi to all, > > How could i decrypt the encrypted data in MYSQL? > I've inserted values in mysql using the PASSWORD( $userpassword ) function > to encrypt all user password. > Example: > Insert into Users_Table set Password_Field=PASSWORD('$userpassword'); > > But i don't know how to select to view the $userpassword value. > > Is there anyone who could help? Thanks in advance. > > > Mike >

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

    attached mail follows:


    on 02/08/02 11:44 AM, Michael P. Carel (mikecarelteamglac.com) wrote:

    > so you mean there's no way to decrypt that. I wan't to create a Password > Reminder to my script, that would email them their password if ever they > forgot it. > Is there any suggestion/comments?

    You can't! If you choose to encrypt the passwords on the way in (with either MySQL's PASSWORD() or PHP's md5(), [as you should for most sites] it's a one-way encryption.

    Hence, you can't do a password reminder.

    You can reset the password though (make a new password, and send it them via email).

    You can also try emailing them the password when they originally sign up, so they *might* keep the email handy when they need it.

    Sorry, what you've done can't be undone.... you just need to figure out what to do now...

    Justin

    attached mail follows:


    This was just discussed.

    Either you reset the password a new one, and email them the new password...

    or, you send them a web page to change their email address. If they don't want to change it, they don't have to. Along the same lines, you can email them a code to enter somewhere to change their password.

    The idea for the second one is that the system can't be abused as easily. Even if someone attempts to change the password of another user, the other user doesn't have to change the password if they don't want to...

    Just don't store it plain-text...

    ---John Holmes...

    ----- Original Message ----- From: "Michael P. Carel" <mikecarelteamglac.com> To: <php-generallists.php.net> Sent: Thursday, August 01, 2002 9:44 PM Subject: Re: [PHP] decrypting values in MYSQL

    > so you mean there's no way to decrypt that. I wan't to create a Password > Reminder to my script, that would email them their password if ever they > forgot it. > Is there any suggestion/comments? > > >You can't view it anymore. You can compare a string with > >PASSWORD('string') to see if they match. > > >Julio Nobrega > >Pode acessar: > >http://www.inerciasensorial.com.br > > Hi to all, > > > > How could i decrypt the encrypted data in MYSQL? > > I've inserted values in mysql using the PASSWORD( $userpassword ) function > > to encrypt all user password. > > Example: > > Insert into Users_Table set Password_Field=PASSWORD('$userpassword'); > > > > But i don't know how to select to view the $userpassword value. > > > > Is there anyone who could help? Thanks in advance. > > > > > > Mike > > > > > > -- > 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:


    for future you could use mysql's encode and decode functions. serves your purpose though not as secure. http://www.mysql.com/doc/M/i/Miscellaneous_functions.html

    --aaron

    "Michael P. Carel" <mikecarelteamglac.com> wrote in message news:001101c239c1$541db6a0$4301a8c0teamglac.com... > Hi to all, > > How could i decrypt the encrypted data in MYSQL? > I've inserted values in mysql using the PASSWORD( $userpassword ) function > to encrypt all user password. > Example: > Insert into Users_Table set Password_Field=PASSWORD('$userpassword'); > > But i don't know how to select to view the $userpassword value. > > Is there anyone who could help? Thanks in advance. > > > Mike >

    attached mail follows:


    I'm trying to read messages using php imap functions. I have emails that were sent as simple text but the line lengths are more than x characters.

    The orginal lines look like...

    F552322518200 29 000000002400600000000001 440020000300003000000000000000000 F552322518200 29 000000001800700000000002 440020000300003000000000000000000 F552322518200 29 000000003801100000000003 320020001700017000000000000000000

    and the messages look like....

    F552921885200 19 000000003001500000001001 290020002700021000000000000000000 F552921885200 29 000000001800500000000002 440020000200002000000000000000000 F552921885200 19 000000004001200000000003 290020002000020000000000000000000

    when I "read" them using the following code....

    echo "<p><h1>Headers in INBOX</h1>\n"; $headers = imap_headers ($mbox);

    if ($headers == false) { echo "Call failed<br>\n"; } else { while (list ($key,$val) = each ($headers)) { echo $key. "-". $val."<br>\n"; $msg_struct = imap_fetchstructure($mbox, $key+1);

    if( $msg_struct->type == TYPETEXT ) { $email_dump = imap_body( $mbox, $key+1 ); echo $email_dump. "<br>"; } } }

    What must I do to ensure the message looks like the orginal version (long lines) rather than the second version? Is there some method to modify the line length of the emails? Convert crlf characters? encoding method?

    Thanks, Jeff.

    --
    Jeff D. Hamann
    Hamann, Donald & Associates, Inc.
    PO Box 1421
    Corvallis, Oregon USA 97339-1421
    Bus. 541-753-7333
    Cell. 541-740-5988
    jeff_hamannhamanndonald.com
    www.hamanndonald.com
    

    attached mail follows:


    >Thanks, Tyler, I will if I have to, but is there someone out there who has >done this on Linux?

    There are a bunch of people (I use 1.3.26) because Apache 2 support is experimental. Grab the latest source of Apache from CVS and it should work.

    >cheers > >Kirk > >"Tyler Longren" <tylercaptainjack.com> wrote in message >news:20020731173507.7781ab8b.tylercaptainjack.com... >> Use apache 1.3.26 and it'll work. Just change the configure line: >> ./configure --with-mysql --with-apxs=/path/to/apxs >> >> Apache 2 is troublesome. >> >> tyler >> >> On Wed, 31 Jul 2002 17:27:30 -0500 >> "Kirk Babb" <kbcdworldnet.att.net> wrote: >> >> > Could somebody help me with this?.....I posted yesterday with only one >> > reply...please read the following and let me know where I'm going >> > wrong. THANKS!!! >> > >> > -Kirk >> > >> > BEGIN MESSAGE >> > >> > > >> > > Yes, I configured apache with mod_so enabled and the >> > > module is there. Still crashes on make. >> > > >> > >-Kirk >> > >> > You chose to compile PHP as a DSO this requires apache to have the >> > mod_so module, you can check this by doing a >> > httpd -l in your apache's bin directory. >> > > I'm attempting to compile php 4.2.2 and apache 2.0.39 (both of which >> > > I downloaded today) on mandrake 8.1. I've followed the generic >> > > unix directions on php.net and at these steps >> > > >> > > $root> ./configure --with-mysql --with-apxs2=/www/bin/apxs >> > > >> > > followed by >> > > >> > > $root> make >> > > >> > > the process crashes with errors at the end of the make: >> > > >> > > -DTHREAD=1 -g -O2 -pthread -DZTS -prefer-pic -c php_functions.c >> > > php_functions.c:93:27: missing binary operator before '!' >> > > make[3]: *** [php_functions.lo] Error 1 >> > > make[3]: Leaving directory `/usr/local/php-4.2.2/sapi/apache2filter' >> > > make[2]: *** [all-recursive] Error 1 >> > > make[2]: Leaving directory `/usr/local/php-4.2.2/sapi/apache2filter' >> > > make[1]: *** [all-recursive] Error 1 >> > > make[1]: Leaving directory `/usr/local/php-4.2.2/sapi' >> > > make: *** [all-recursive] Error 1 >> > > >> > > Can somebody point out what I need to do to correct this? It >> > > doesn't make sense that the code I downloaded from php.net would >> > > have a problem since that's a stable release. >> > > >> > > TIA! >> > > >> > > -Kirk >> > > >> > > -- >> > > K.B. BABB >> > > email: babbk10comcast.net >> > > >> > > -- >> > > PHP General Mailing List (http://www.php.net/) >> > > To unsubscribe, visit: http://www.php.net/unsub.php >> > > >> > >> > -Pushkar S. Pradhan >> > >> > >> > >> > >> > -- >> > 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 >