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 Aug 02 2002 - 12:02:18 CDT

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

    php-general Digest 2 Aug 2002 17:02:18 -0000 Issue 1501

    Topics (messages 110771 through 110846):

    Re: Undefined function: dbmopen() in loaded Windows binaries of PHP 4.2.1
            110771 by: Bob Lockie

    Re: decrypting values in MYSQL
            110772 by: Glenn Sieb

    Need help to choose hosting!
            110773 by: Mantas Kriauciunas
            110774 by: Justin French
            110776 by: Peter Houchin
            110778 by: Mantas Kriauciunas
            110779 by: Mantas Kriauciunas
            110781 by: 1LT John W. Holmes
            110792 by: JJ Harrison
            110800 by: lallous
            110805 by: Andrey Hristov
            110809 by: Daniel Kushner

    Re: problems with random again
            110775 by: Tom Rogers

    Re: Why Protect PHP coding?
            110777 by: php . banana
            110785 by: Manuel Lemos
            110843 by: Nick Oostveen

    Re: still need help with crash on make
            110780 by: EdwardSPL.ita.org.mo

    authorize.net
            110782 by: ed

    Re: passing arrays between pages with serialize
            110783 by: DoL
            110784 by: DoL

    Can somebody explain this scripts to me?
            110786 by: L.Jacquiline
            110791 by: Jason Wong
            110793 by: 1LT John W. Holmes

    How to Popup a Window Using PHP Code
            110787 by: Hakkan Lui
            110790 by: René Moonen

    Reg- array_unique
            110788 by: SenthilVelavan
            110789 by: Andrey Hristov

    ODBC under linux + PHP + Apache problem.
            110794 by: Jose Morales

    StripSlashes Problem
            110795 by: Mark Colvin
            110798 by: 1LT John W. Holmes
            110801 by: Mark Colvin
            110802 by: 1LT John W. Holmes
            110803 by: Petre
            110804 by: Mark Colvin

    htaccess
            110796 by: Theo Richel
            110799 by: Alexander Kuznetsov

    Some suggestions
            110797 by: Saci

    Why do i get this Notice Message?
            110806 by: Jürgen
            110807 by: lallous
            110808 by: 1LT John W. Holmes
            110814 by: lallous

    Undefined Index
            110810 by: Jürgen
            110813 by: Lars Olsson
            110815 by: lallous
            110819 by: Chris Hewitt

    Date Stuff...
            110811 by: Brian McGarvie
            110816 by: Stas Maximov
            110818 by: Chris Boget
            110826 by: Brian McGarvie

    mktime() question
            110812 by: Jay Blanchard

    include hassle
            110817 by: lallous
            110824 by: Reuben D. Budiardja
            110828 by: lallous
            110841 by: CC Zona

    Re: Protect PHP coding
            110820 by: lallous
            110823 by: Matt Schroebel

    Re: Favorite Calendar Anyone?
            110821 by: lallous

    PHP Hosting
            110822 by: Matt Babineau
            110830 by: 1LT John W. Holmes
            110831 by: Danny Shepherd
            110845 by: Andrew Brampton

    question about references
            110825 by: Jesse Vitrone
            110829 by: lallous

    Re: Dynamically check radio buttons
            110827 by: Shew
            110835 by: Mark Middleton
            110840 by: Shew

    isset($var) && !empty($var) same time!
            110832 by: lallous
            110836 by: Analysis & Solutions
            110846 by: Jürgen

    Re: Problem with "<?xml ....>" inside the PHP code, due to "?"
            110833 by: Brinkman, Theodore

    Re: mktime() question - SOLVED
            110834 by: Jay Blanchard

    .htaccess
            110837 by: Oliver Witt
            110838 by: Andrey Hristov
            110842 by: Andrew Brampton

    Problems with HTML forms and PHP. Please Help !!
            110839 by: Sebastian Tomasino

    FATAL: emalloc(): Unable to allocate -83128 bytes
            110844 by: Klaus Svarre

    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:


    >Hello.
    >
    >Say me pls, are there method to enable DBM support in loaded Windows binaries of PHP 4.2.1?
    >
    >I have "Fatal error: Call to undefined function: dbmopen() in ..." my .php file... :((

    I thought DBM files were only available on Unix.
    Recompile from source.

    attached mail follows:


    At 09:44 AM 8/2/2002 +0800, Michael P. Carel posted the following...
    >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, instead, have it email to the address-of-record a new password,
    generated randomly.

    Check out http://www.dacode.org -- it's how it handles forgotten passwords.

    :)

    Glenn

    ---
    The original portions of this message are the copyright of the author
    (c)1998-2002 Glenn E. Sieb.    ICQ UIN: 300395    IRC Nick: Rainbear
    "All acts of Love and Pleasure are Her rituals"-Charge of the Goddess
    

    attached mail follows:


    Hey php-general,

    i want to buy hosting. but i can't find good one for me. maybe someone could point some links. but this is what i need!

    Storage up to 100MB normal transfer limit(best would be without) CGI/Perl/PHP/ASP/SSI/SSL MySQL database (can be only 1) some pop3 mailboxes free domain transfer (maybe free domain if i pay for 1 year ahead) FTP access SSH access Shell capability up to 3 background processes

    if anyone know combination like that i would appreaciate your help! thanks

    -- 
    Best regards,
     Mantas                          
    

    Contacts: Mantuksattbi.com

    attached mail follows:


    Aside from shell, ssh & background processes, i can recommend experthost.com

    How do you expect to get ASP (assuming you mean microsoft's Active Server Pages) on a Unix box?

    Sure, PHP could be on a Windows box, but I think your chances of finding a solid host that supports ASP AND PHP on the one server is about zero.

    Justin French

    on 02/08/02 4:31 PM, Mantas Kriauciunas (Mantuksattbi.com) wrote:

    > Hey php-general, > > i want to buy hosting. but i can't find good one for me. maybe > someone could point some links. but this is what i need! > > Storage up to 100MB > normal transfer limit(best would be without) > CGI/Perl/PHP/ASP/SSI/SSL > MySQL database (can be only 1) > some pop3 mailboxes > free domain transfer (maybe free domain if i pay for 1 year ahead) > FTP access > SSH access > Shell capability > up to 3 background processes > > if anyone know combination like that i would appreaciate your help! > thanks

    attached mail follows:


    > > How do you expect to get ASP (assuming you mean microsoft's Active Server > Pages) on a Unix box? > Justin,

    you can use ChilliSoft, http://www.chillisoft.com, by Sun Microsystems that is a ASP plugin that works with Apache as well as other browsers such as IBM's Websphere, and many others as well

    Cheers Peter

    attached mail follows:


    Hello Justin,

    heh... sorry about that ASP thing... i copied from one hosting site and just paste it hare. forgot about ASP :) i'll check out that experthost.com :) thanks

    JF> Aside from shell, ssh & background processes, i can recommend experthost.com

    JF> How do you expect to get ASP (assuming you mean microsoft's Active Server JF> Pages) on a Unix box?

    JF> Sure, PHP could be on a Windows box, but I think your chances of finding a JF> solid host that supports ASP AND PHP on the one server is about zero.

    JF> Justin French

    JF> on 02/08/02 4:31 PM, Mantas Kriauciunas (Mantuksattbi.com) wrote:

    >> Hey php-general, >> >> i want to buy hosting. but i can't find good one for me. maybe >> someone could point some links. but this is what i need! >> >> Storage up to 100MB >> normal transfer limit(best would be without) >> CGI/Perl/PHP/ASP/SSI/SSL >> MySQL database (can be only 1) >> some pop3 mailboxes >> free domain transfer (maybe free domain if i pay for 1 year ahead) >> FTP access >> SSH access >> Shell capability >> up to 3 background processes >> >> if anyone know combination like that i would appreaciate your help! >> thanks

    -- 
    Best regards,
     Mantas                            mailto:Mantuksattbi.com
    

    attached mail follows:


    Hello Justin,

    >> Hey php-general, >> >> i want to buy hosting. but i can't find good one for me. maybe >> someone could point some links. but this is what i need! >> >> Storage up to 100MB >> normal transfer limit(best would be without) >> CGI/Perl/PHP/SSI/SSL >> MySQL database (can be only 1) >> some pop3 mailboxes >> free domain transfer (maybe free domain if i pay for 1 year ahead) >> FTP access >> SSH access >> Shell capability >> up to 3 background processes >> >> if anyone know combination like that i would appreaciate your help! >> thanks

    sorry about the confusion but i dont need ASP but i realy do need SSH access (shell) and up to 3 background processes. i can find 2 diferent hosting. one website and one shell hosting. but i need 2 in one :) thanks again

    -- 
    Best regards,
     Mantas                            mailto:Mantuksattbi.com
    

    attached mail follows:


    Why not get your own box? Then you can have whatever you want. I think you can get them from rackshack.com for $99.

    ---John Holmes...

    ----- Original Message ----- From: "Mantas Kriauciunas" <Mantuksattbi.com> To: <php-generallists.php.net> Sent: Friday, August 02, 2002 3:00 AM Subject: Re[2]: [PHP] Need help to choose hosting!

    > Hello Justin, > > >> Hey php-general, > >> > >> i want to buy hosting. but i can't find good one for me. maybe > >> someone could point some links. but this is what i need! > >> > >> Storage up to 100MB > >> normal transfer limit(best would be without) > >> CGI/Perl/PHP/SSI/SSL > >> MySQL database (can be only 1) > >> some pop3 mailboxes > >> free domain transfer (maybe free domain if i pay for 1 year ahead) > >> FTP access > >> SSH access > >> Shell capability > >> up to 3 background processes > >> > >> if anyone know combination like that i would appreaciate your help! > >> thanks > > sorry about the confusion but i dont need ASP but i realy do need SSH > access (shell) and up to 3 background processes. i can find 2 diferent > hosting. one website and one shell hosting. but i need 2 in one :) > thanks again > > -- > Best regards, > Mantas mailto:Mantuksattbi.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    I would recommend Infinology Smart Consumers: http://smartconsumers.infinology.com/

    You should look at them. I use them and I am very pleased with their service. Their servers have very fast response times and the give you plentiful features.

    --
    JJ Harrison
    webmastertececo.com
    www.tececo.com
    

    "Mantas Kriauciunas" <Mantuksattbi.com> wrote in message news:6815716540.20020801233126attbi.com... > Hey php-general, > > i want to buy hosting. but i can't find good one for me. maybe > someone could point some links. but this is what i need! > > Storage up to 100MB > normal transfer limit(best would be without) > CGI/Perl/PHP/ASP/SSI/SSL > MySQL database (can be only 1) > some pop3 mailboxes > free domain transfer (maybe free domain if i pay for 1 year ahead) > FTP access > SSH access > Shell capability > up to 3 background processes > > if anyone know combination like that i would appreaciate your help! > thanks > > -- > Best regards, > Mantas > > Contacts: > Mantuksattbi.com >

    attached mail follows:


    have you tried:

    http://www.hostrix.com

    ?

    //Elias "Mantas Kriauciunas" <Mantuksattbi.com> wrote in message news:6815716540.20020801233126attbi.com... > Hey php-general, > > i want to buy hosting. but i can't find good one for me. maybe > someone could point some links. but this is what i need! > > Storage up to 100MB > normal transfer limit(best would be without) > CGI/Perl/PHP/ASP/SSI/SSL > MySQL database (can be only 1) > some pop3 mailboxes > free domain transfer (maybe free domain if i pay for 1 year ahead) > FTP access > SSH access > Shell capability > up to 3 background processes > > if anyone know combination like that i would appreaciate your help! > thanks > > -- > Best regards, > Mantas > > Contacts: > Mantuksattbi.com >

    attached mail follows:


    http://ispcheck.com is the place. Listing of many webhostings. Go and see.

    Regards, Andrey

    > > Hey php-general, > > > > i want to buy hosting. but i can't find good one for me. maybe > > someone could point some links. but this is what i need! > > > > Storage up to 100MB > > normal transfer limit(best would be without) > > CGI/Perl/PHP/ASP/SSI/SSL > > MySQL database (can be only 1) > > some pop3 mailboxes > > free domain transfer (maybe free domain if i pay for 1 year ahead) > > FTP access > > SSH access > > Shell capability > > up to 3 background processes > > > > if anyone know combination like that i would appreaciate your help! > > thanks > > > > -- > > Best regards, > > Mantas > > > > Contacts: > > Mantuksattbi.com > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    You should check out The Hosting Company http://www.thehostingcompany.us/

    The PHP config comes with many flavors: http://www.thehostingcompany.us/info.php

    --Daniel

    > -----Original Message----- > From: Mantas Kriauciunas [mailto:Mantuksattbi.com] > Sent: Friday, August 02, 2002 2:31 AM > To: php-generallists.php.net > Subject: [PHP] Need help to choose hosting! > > > Hey php-general, > > i want to buy hosting. but i can't find good one for me. maybe > someone could point some links. but this is what i need! > > Storage up to 100MB > normal transfer limit(best would be without) > CGI/Perl/PHP/ASP/SSI/SSL > MySQL database (can be only 1) > some pop3 mailboxes > free domain transfer (maybe free domain if i pay for 1 year ahead) > FTP access > SSH access > Shell capability > up to 3 background processes > > if anyone know combination like that i would appreaciate your help! > thanks > > -- > Best regards, > Mantas > > Contacts: > Mantuksattbi.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    Hi,

    Friday, August 2, 2002, 5:03:19 AM, you wrote: H> Is there some easy way to make rand() only use each number once in a loop, H> to avoid getting the same values more than once?

    H> Håkan

    Have a look at shuffle() it may do what you want

    -- 
    regards,
    Tom
    

    attached mail follows:


    Just out of curiosity when and why?

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

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

    attached mail follows:


    Hello,

    On 08/02/2002 01:47 AM, Php Banana wrote: > Just out of curiosity when and why?

    When you want to sell your PHP applications or otherwise do not want to disclosed the knowledged embedded in the code.

    >>Is there any method to encrypt PHP files.

    -- 
    

    Regards, Manuel Lemos

    attached mail follows:


    Check out the Zend Encoder at http://www.zend.com to generate encoded php files. It is, however, a bit pricey.

    At 12:47 AM 8/2/2002 -0400, php banana wrote: >Just out of curiosity when and why? > > >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 > > > > >________________________--__-______-______________ >eat pasta >type fasta > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    Yes, there are many users they recommend to use apache 1.3.26 and php 4.2.2 ! What useful of CVS ?

    Bob Lockie wrote:

    > >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.

    attached mail follows:


    Hey all. I have an app that I need to integrate with an online payment service. I read an article here http://www.devshed.com/Server_Side/Administration/CREDIT/page4.html that uses authorize.net as the example and suggests that you don't need an account to test your app with their service. Does anyone know if this is true? The article is over a year old so the info might be outdated. I tried modifying the code from the example to work for me, but I kept getting error messages back from authorize.net's servers. Stuff like "Cannot process this request." .. I tried emailing their tech support but haven't heard back from them. Does anyone know of any payment services that I can use for free just for testing my app with it? Can you suggest any php libraries out there that will make life easier?

    tia, --ed

    __________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com

    attached mail follows:


    Thanks, I found the problem was with the creation of the 2-di array. ----- Original Message ----- From: "Martin Towell" <martin.towellworld.net> To: "'DoL'" <dwylaunetvigator.com>; <php-generallists.php.net> Sent: Wednesday, July 31, 2002 12:21 PM Subject: RE: [PHP] passing arrays between pages with serialize

    > Can you post/send the results of doing a print_r() on the first page (the > one that's serialising) and the results of the serialize()? > > -----Original Message----- > From: DoL [mailto:dwylaunetvigator.com] > Sent: Wednesday, July 31, 2002 2:21 PM > To: php-generallists.php.net > Subject: [PHP] passing arrays between pages with serialize > > > Hi > > I would like to pass three arrays, two of them are two dimensional arrays, > to another page (or to the same page just submit to itself) using hidden > field and the function serialize. > > (this is a two dimensional array) > page-1 > $s_array1 = serialize($array1); > > <INPUT type="HIDDEN" name="h_array1" value="<?php echo urlencode($s_array1); > ?>"> > > page-2 > $array1= unserialize(urldecode(stripslashes($_POST['h_array1']))); > > it seems to work except there appears to be one NULL record added to the > beginning of the array. > it affects the following :- > count(array_keys($array1) ) returns actual_no_of_keys + 1 > foreach () echo with one NULL record at the beginning > reset($array1) erase the array completely !! > > and it doesn't help to use rawurl(en|de)code, and with | without > stripslashes! > > PLEASE HELP! if you can resolve this, or has a better ways to pass arrays > between pages. > > Many Thanks > /dl > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    Hi Valeri Thanks for your advise. I am new to php and have never used $_SESSION, is this the one that I need to session_register the variables/arrays?

    Thanks again. Dominic ----- Original Message ----- From: "Valeri Felberg" <felbergtrimfab.com> To: "DoL" <dwylaunetvigator.com> Cc: <php-generallists.php.net> Sent: Wednesday, July 31, 2002 4:57 PM Subject: Re: [PHP] passing arrays between pages with serialize

    > Hallo DoL, > > it worked when i didn't use urldecode(), just stripslashes(): > > page-1 > $s_array1 = urlencode(serialize($array1)); > > header("Location: page-2?h_array1=$s_array1"); > > page-2 > $array1 = unserialize(stripslashes($_GET["h_array1"])); > > > The other way that worked was passing arrays in $_SESSION. You don't need > even serialize them in that case. > > D> Hi > > D> I would like to pass three arrays, two of them are two dimensional arrays, > D> to another page (or to the same page just submit to itself) using hidden > D> field and the function serialize. > > D> (this is a two dimensional array) > D> page-1 > D> $s_array1 = serialize($array1); > > D> <INPUT type="HIDDEN" name="h_array1" value="<?php echo urlencode($s_array1); > ?>>"> > > D> page-2 > D> $array1= unserialize(urldecode(stripslashes($_POST['h_array1']))); > > D> it seems to work except there appears to be one NULL record added to the > D> beginning of the array. > D> it affects the following :- > D> count(array_keys($array1) ) returns actual_no_of_keys + 1 > D> foreach () echo with one NULL record at the beginning > D> reset($array1) erase the array completely !! > > D> and it doesn't help to use rawurl(en|de)code, and with | without > D> stripslashes! > > D> PLEASE HELP! if you can resolve this, or has a better ways to pass arrays > D> between pages. > > D> Many Thanks > D> /dl > > > > > > > -- > Mit freundlichen Grüssen > Valeri Felberg > [Web developer] > > trimfab - internet mediagroup > ------------------------------------------ > our mission: innovative business solutions > > > www.trimfab.com > mailto:felbergtrimfab.com > > CZEMINSKI-STR. 1A > 10829 BERLIN > GERMANY > > FON: +49(0)30 - 768 033 93 > FAX: +49(0)30 - 768 033 94 > > >

    attached mail follows:


    I have attached.

    begin 666 grab.txt M/#]P:' -"T*)'5R;" ](")H='1P.B\O=W=W+F-N;BYC;VTO5$5#2"\B.PT* M#0HD9F0](&9R96%D*&9O<&5N*"1U<FPL(G(B*2P,3 P,# P*3L-"T*:68 M*"$D9F0I('L-"T*96-H;R B0V%N)W09F5T8V0TY.(&YE=W,B.V5X:70[ M#0H-"GUE;'-E>PT*#0H(" )'-T87)T/2!S=')P;W,H)&9D+" G/'-P86X M8VQA<W,](DAE861E<C(B/E1/4"!35$]22453/"]S<&%N/B<I.PT*(" (",D M9FEN:7-H/2!S=')P;W,H)&9D+" G/'-P86X8VQA<W,](DAE861E<C(B/D59 M12!34%D\+W-P86X^/&)R/B<I.PT*(" ("1F:6YI<V]('-T<G!O<RD9F0L M("<\+W-P86X^/&)R/B<I.PT*(" ("1L96YG=&]("1F:6YI<VM)'-T87)T M.PT*(" ("1C;VYT96YT<SU3=6)S='(H)&9D+" D<W1A<G0L("1L96YG=&I M.PT*#0IP<F5G7VUA=&-H7V%L;" H)R\\82!H<F5F/2(H+BH_*2(^*"XJ/RD\ M7"]A/B\G+" D8V]N=&5N=',L("1M871C:&5S*3L-"T*9F]R("D:3TP.R D M:3P8V]U;G0H)&UA=&-H97-;,%TI.R D:2LK*2![#0HD=7)L(" /2 B:'1T M<#HO+W=W=RYC;FXN8V]M(BXD;6%T8VAE<ULQ75LD:5T[#0HD=&ET;&4/2 D M;6%T8VAE<ULR75LD:5T[#0HD;W5T("X]("(\;&D^(#QA(&AR968])'5R;"!T M87)G970]8FQA;FL^)'1I=&QE/"]A/CQB<CXB.PT*?0T*#0IE8VAO("(-"CQH L,SY#3DX5$5#2"!.97=S.CPO:#,^#0HD;W5T#0HB.PT*#0I]#0H-"T*/SX` ` end

    attached mail follows:


    On Friday 02 August 2002 14:58, L.Jacquiline wrote: > I have attached.

    If you seriously want people to look at it please resend it again as inline text and not as an attachment.

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

    /* "Of all the tyrannies that affect mankind, tyranny in religion is the worst." - Thomas Paine */

    attached mail follows:


    > On Friday 02 August 2002 14:58, L.Jacquiline wrote: > > I have attached.

    Looks like someone trying to steal stuff off of CNN.

    ---John Holmes...

    attached mail follows:


    Dear all,

    As the title state, is there any method to popup a window (like "window.open" in Javascript), using PHP code?

    Thanks for your help.

    Regards, Hakkan Lui

    attached mail follows:


    Hakkan Lui wrote:

    >Dear all, > >As the title state, is there any method to popup a window (like >"window.open" in Javascript), using PHP code? > >Thanks for your help. > > >Regards, >Hakkan Lui > > > > > Yep there is:

    <?php echo "<SCRIPT LANGUAGE='JavaScript'>window.open();</SCRIPT>" ?>

    But I suppose it is not what you had in mind. ;-)

    <set mode=serious>

    You can do anything in PHP as long as your actions are on the server. Javascript runs on the client and PHP is not in control than. So if you need to open a new window you will need PHP to produce HTML code that does just that. That HTML can include Javascripts.

    René

    attached mail follows:


    Hello All,

    I tried a program using array_unique.It shows different outputs in PHP4.06 and PHP4.22

    Program :

    <?php $employee[0]='snp'; $employee[1]='snp'; $employee[2]='snp'; $yee=array_unique($employee); while(list($i,$c)=each($yee)) { echo "Index ".$i." Content".$c; } ?>

    Output :

    PHP4.06 Index 0 Content snp PHP4.22 Index 2 Content snp

    Why the index is differed in two version? Whether the function array_unique is handled in a different way in PHP4.22. Any help is appreciated.

    Advance thanks and regards, SenthilVelavan.P

    attached mail follows:


    Post that on php-devlists.php.net

    Andrey

    ----- Original Message ----- From: "SenthilVelavan" <senthilvellangmx.net> To: <php-generallists.php.net> Sent: Friday, August 02, 2002 10:54 AM Subject: [PHP] Reg- array_unique

    Hello All,

    I tried a program using array_unique.It shows different outputs in PHP4.06 and PHP4.22

    Program :

    <?php $employee[0]='snp'; $employee[1]='snp'; $employee[2]='snp'; $yee=array_unique($employee); while(list($i,$c)=each($yee)) { echo "Index ".$i." Content".$c; } ?>

    Output :

    PHP4.06 Index 0 Content snp PHP4.22 Index 2 Content snp

    Why the index is differed in two version? Whether the function array_unique is handled in a different way in PHP4.22. Any help is appreciated.

    Advance thanks and regards, SenthilVelavan.P

    attached mail follows:


    I write a few days ago to the list with a problem trying to find my ODBC DSN under linux debian. Well, i solve the problem, now i can find my dsn from PHP code, but its seems like it crash when i do a odbc_connect(...)

    I know that unixodbc works becouse i test it with isql.

    I have no warnings trying to find DSN, but now nothing happens. I suppose that it finds dsn but there is another error somewhere. But there is no logs, there is no output in the browser... i dont know what to do, i have no information to try to resolve the error.

    somebody can help me?

    this is the reply from the browser; The following error was encountered: Zero Sized Reply Squid did not receive any data for this request.

    this is my code: <html>^M <title>REGISTRO DE LLAMADAS</title>^M <body >^M <?php putenv("ODBCINSTINI=/etc/odbcinst.ini"); putenv("ODBCINI=/etc/odbc.ini"); if(!extension_loaded('odbc')) { if(!dl("odbc.so")){ exit; } } echo "dl odbc loaded ok<br>"; $cx=odbc_pconnect("cdr2","mylogin","mypasswd",""); echo "connected"; ?> </body> </html>

    thanks in advance!

    attached mail follows:


    I use the following php code to build a dynamic table retrieving values from a MySQL databases that have been inserted with slashes added -

    echo "<td width='100'><input name='descr' type='text' size='45' maxlength='20' readonly value='".StripSlashes(mysql_result($badgedetails, $i, 'descr'))."' tabindex='1'/></td>";

    The problem is, if the value to be displayed is for example O'Neill, then the output will look something like -

    <td width='100'><input name='descr' type='text' size='45' maxlength='20' readonly value='O'Neill' tabindex='1'/></td>

    Quite correctly, when this page is rendered, all that will be displayed is O as the apostrophe after the O will be treated as a closing parenthesis. I understand AddSlashes and StripSlashes but how can I utilise them to resolve this issue.

    **************************************************** This e-mail is intended for the recipient only and may contain confidential information. If you are not the intended recipient then you should reply to the sender and take no further ation based upon the content of the message. Internet e-mails are not necessarily secure and CCM Limited does not accept any responsibility for changes made to this message. Although checks have been made to ensure this message and any attchments are free from viruses the recipient should ensure that this is the case. ****************************************************

    attached mail follows:


    > I use the following php code to build a dynamic table retrieving values from > a MySQL databases that have been inserted with slashes added - > > echo "<td width='100'><input name='descr' type='text' size='45' > maxlength='20' readonly value='".StripSlashes(mysql_result($badgedetails, > $i, 'descr'))."' tabindex='1'/></td>"; > > The problem is, if the value to be displayed is for example O'Neill, then > the output will look something like - > > <td width='100'><input name='descr' type='text' size='45' maxlength='20' > readonly value='O'Neill' tabindex='1'/></td> > > Quite correctly, when this page is rendered, all that will be displayed is O > as the apostrophe after the O will be treated as a closing parenthesis. I > understand AddSlashes and StripSlashes but how can I utilise them to resolve > this issue.

    HTML doesn't understand that a slash means to escape a character. What you need to do is use htmlentities() or htmlspecialchars() on the data before you place it between your quotes.

    echo "<td width='100'><input name='descr' type='text' size='45' maxlength='20' readonly value='".htmlentities(mysql_result($badgedetails, $i, 'descr'))."' tabindex='1'/></td>";

    Note: You should not have to be doing stripslashes() on data coming from your database unless magic_quotes_runtime is ON. If your data is coming out with slashes in it, or you can SEE the slashes in the actual data in the database, then you are calling addslashes() twice on your data somehow.

    I also kind of question why you have mysql_result in there. It's faster to use the mysql_fetch_* functions...

    ---John Holmes...

    attached mail follows:


    John,

    Thank you for your reply. My magic_quotes_runtime is set to 'Off'. As you said, I shouldn't have to use StripSlashes but would I still need to use AddSlashes when inserting/updating? I can see the slashes in the database when I look at the tables but I am fairly sure that I do not add slashes twice? Are they being added automatically somewhere as a result of a setting in the php.ini file? With regards to my use of mysql_result as opposed to mysql_fetch_* functions, I was ignorant of the performance hit and I will now re think around my database code.

    **************************************************** This e-mail is intended for the recipient only and may contain confidential information. If you are not the intended recipient then you should reply to the sender and take no further ation based upon the content of the message. Internet e-mails are not necessarily secure and CCM Limited does not accept any responsibility for changes made to this message. Although checks have been made to ensure this message and any attchments are free from viruses the recipient should ensure that this is the case. ****************************************************

    attached mail follows:


    If magic_quotes_gpc is ON, then the data is getting addslashes() automatically on a form submission. If you are doing it again, that's where the problem is.

    ---John Holmes...

    ----- Original Message ----- From: "Mark Colvin" <mark.colvinccmltd.co.uk> To: "'1LT John W. Holmes'" <holmes072000charter.net> Cc: "Php (E-mail)" <php-generallists.php.net> Sent: Friday, August 02, 2002 6:37 AM Subject: RE: [PHP] StripSlashes Problem

    > John, > > Thank you for your reply. My magic_quotes_runtime is set to 'Off'. As you > said, I shouldn't have to use StripSlashes but would I still need to use > AddSlashes when inserting/updating? I can see the slashes in the database > when I look at the tables but I am fairly sure that I do not add slashes > twice? Are they being added automatically somewhere as a result of a setting > in the php.ini file? > With regards to my use of mysql_result as opposed to mysql_fetch_* > functions, I was ignorant of the performance hit and I will now re think > around my database code. > > > > **************************************************** > This e-mail is intended for the recipient only and > may contain confidential information. If you are > not the intended recipient then you should reply > to the sender and take no further ation based > upon the content of the message. > Internet e-mails are not necessarily secure and > CCM Limited does not accept any responsibility > for changes made to this message. > Although checks have been made to ensure this > message and any attchments are free from viruses > the recipient should ensure that this is the case. > ****************************************************

    attached mail follows:


    I would suggest you rather do the following ( over and above the htmlentities as already suggested )

    In stead of doing echo " <html with single='quotes'>"; to rather echo '<html with double="quotes">';

    The reason is; there is a difference between echo 'stuff' ; and echo "stuff"; The first (single quotes) is treated as literal content, ie, PHP justs echo's, does no parsing, while the double-quotes means PHP will look at the content between the quotes and parse any variables etc. So, if you are not echoing anything that needs to be parsed, use single quotes.

    eg. <?php $var = 'testing'; echo '$var<br>'; echo "$var<br>"; ?> produses:

    $var testing

    It just saves on overhead, and in your case, you would not have run into this problem...

    Mark Colvin wrote:

    >John, > >Thank you for your reply. My magic_quotes_runtime is set to 'Off'. As you >said, I shouldn't have to use StripSlashes but would I still need to use >AddSlashes when inserting/updating? I can see the slashes in the database >when I look at the tables but I am fairly sure that I do not add slashes >twice? Are they being added automatically somewhere as a result of a setting >in the php.ini file? >With regards to my use of mysql_result as opposed to mysql_fetch_* >functions, I was ignorant of the performance hit and I will now re think >around my database code. > > > >**************************************************** >This e-mail is intended for the recipient only and >may contain confidential information. If you are >not the intended recipient then you should reply >to the sender and take no further ation based >upon the content of the message. >Internet e-mails are not necessarily secure and >CCM Limited does not accept any responsibility >for changes made to this message. >Although checks have been made to ensure this >message and any attchments are free from viruses >the recipient should ensure that this is the case. >**************************************************** >

    attached mail follows:


    John,

    Thank you. This solves the problem.

    Petre,

    Thank you for your reply. I wasn't aware of the difference and will bear this in mind.

    **************************************************** This e-mail is intended for the recipient only and may contain confidential information. If you are not the intended recipient then you should reply to the sender and take no further ation based upon the content of the message. Internet e-mails are not necessarily secure and CCM Limited does not accept any responsibility for changes made to this message. Although checks have been made to ensure this message and any attchments are free from viruses the recipient should ensure that this is the case. ****************************************************

    attached mail follows:


    Hi,

    I am told that I should edit my .htaccess file because I want to include a file during the execution of a script, but apparently I do something wrong because I keep getting error messages like these:

    Warning: Failed opening 'header.html' for inclusion (include_path='.:/var/www/html/brokenlink/login') in /home/virtual/site161/fst/var/www/html/brokenlink/login/index.php3 on line 32

    There was no improvement when I added this line to the .htaccess file: php_value include_path ".:/var/www/html/brokenlink/login"

    Can anyone tell me what I should put in?

    I thank you very much in advance.

    Theo Richel

    attached mail follows:


    Hello Theo,

    Friday, August 02, 2002, 1:11:32 PM, you wrote: TR> I am told that I should edit my .htaccess file because I want to include TR> a file during the execution of a script, but apparently I do something TR> wrong because I keep getting error messages like these:

    TR> Warning: Failed opening 'header.html' for inclusion TR> (include_path='.:/var/www/html/brokenlink/login') in TR> /home/virtual/site161/fst/var/www/html/brokenlink/login/index.php3 on TR> line 32

    TR> There was no improvement when I added this line to the .htaccess file: TR> php_value include_path ".:/var/www/html/brokenlink/login"

    TR> Can anyone tell me what I should put in?

    try to set include_path from / directory, like this

    php_value include_path ".:/home/virtual/site161/fst/var/www/html/brokenlink/login"

    -- 
    Best regards,
    Alexander Kuznetsov
    

    attached mail follows:


    If you want a serius one , not the cheaper one try pair.com

    I use they services for more than 5 years and are very happy, the main issue is reliability.

    If you are more interested on price try dreamhost.com

    attached mail follows:


    Hello!

    Could someone please tell me why i get the following Notice Message

    Notice: Undefined variable: PHP_SELF in g:\apache_web\intern\looney\index.php on line 101

    Code affected:

    function WriteNewArticle() { Line 100: $smarty = new Smarty; Line 101: $smarty->assign("PHPSELF", $PHP_SELF); // etc.....

    Thanks alot in advance for your time, Jürgen

    attached mail follows:


    In your function do this: > function WriteNewArticle() > { GLOBAL $PHP_SELF;

    ... }

    //Elias

    "JüRgen" <uochello.at> wrote in message news:20020802120059.94036.qmailpb1.pair.com... > Hello! > > Could someone please tell me why i get the following Notice Message > > Notice: Undefined variable: PHP_SELF in > g:\apache_web\intern\looney\index.php on line 101 > > Code affected: > > function WriteNewArticle() > { > Line 100: $smarty = new Smarty; > Line 101: $smarty->assign("PHPSELF", $PHP_SELF); > // etc..... > > Thanks alot in advance for your time, > Jürgen > > >

    attached mail follows:


    > Could someone please tell me why i get the following Notice Message > > Notice: Undefined variable: PHP_SELF in > g:\apache_web\intern\looney\index.php on line 101 > > Code affected: > > function WriteNewArticle() > { > Line 100: $smarty = new Smarty; > Line 101: $smarty->assign("PHPSELF", $PHP_SELF); > // etc.....

    Why? Because $PHP_SELF is an undefined variable. There is nothing assigned to it and you're trying to use it in a function.

    But, you say, $PHP_SELF is supposed to be the current page. Yes, normally it would with register_globals ON, but you are inside of a function, so it is a whole new variable now.

    So, like someone else suggested, make it global inside your function

    Global $PHP_SELF;

    Or, if you're on a new version, just use $_SERVER['PHP_SELF'] and you don’t have to worry about global.

    ---John Holmes...

    attached mail follows:


    even on old versions of PHP, he can then just use: $GLOBALS['PHP_SELF'] w/o worrying about the Global keyword!

    Elias "John Holmes" <holmes072000charter.net> wrote in message news:001001c23a1e$601f5050$b402a8c0mango... > Could someone please tell me why i get the following Notice Message > > Notice: Undefined variable: PHP_SELF in > g:\apache_web\intern\looney\index.php on line 101 > > Code affected: > > function WriteNewArticle() > { > Line 100: $smarty = new Smarty; > Line 101: $smarty->assign("PHPSELF", $PHP_SELF); > // etc.....

    Why? Because $PHP_SELF is an undefined variable. There is nothing assigned to it and you're trying to use it in a function.

    But, you say, $PHP_SELF is supposed to be the current page. Yes, normally it would with register_globals ON, but you are inside of a function, so it is a whole new variable now.

    So, like someone else suggested, make it global inside your function

    Global $PHP_SELF;

    Or, if you're on a new version, just use $_SERVER['PHP_SELF'] and you don't have to worry about global.

    ---John Holmes...

    attached mail follows:


    It's me again, i don't mean to be a bugger, but i really like to learn as much as possible, that's why i ask (or will ask so many questions).

    Consider the following (i shortened this a lot, but it will do the trick)

    $op = $_GET['op']; switch ( $op ) { case "admin": DoLogin(); break;

    default: ShowHomepage(); break; }

    PHP shoots a Notice Message telling me that there is an undefined index Undefined index: act in g:\apache_web\intern\looney\index.php on line 177

    This accects the code shown above.

    Ok, am i correct in assuming that it pops this message because $op is not defined as anything yet?

    If so,should i always just do this

    $_POST['op'] = ''; $op = $_GET['op']; switch ( $op ) { //Code here }

    Or would it be better and more space efficient to do this $op = isset($_GET['op']); switch ( $op ) { //Code here } Cause if i do that the Notice Message dissapears for some reason i yet fail to grab. I would really appreciate if somebody could explain to me why the Notice dissapears when using isset(), and also what is the best method to use rather then the two shown above? How do you guys&girls handle this?

    Thanks a lot in advance for your time and patience!

    Best regards from Vienna, Jürgen

    attached mail follows:


    Hi!

    JüRgen wrote: > It's me again, i don't mean to be a bugger, but i really like to learn as > much as possible, that's why i ask (or will ask so many questions). > > Consider the following (i shortened this a lot, but it will do the trick) > > $op = $_GET['op']; > switch ( $op ) > { > case "admin": > DoLogin(); > break; > > default: > ShowHomepage(); > break; > } > > PHP shoots a Notice Message telling me that there is an undefined index > Undefined index: act in g:\apache_web\intern\looney\index.php on line 177

    You get this error message whenever $_GET doesn't contain anything.

    > This accects the code shown above. > > Ok, am i correct in assuming that it pops this message because $op is not > defined as anything yet? > > If so,should i always just do this > > $_POST['op'] = ''; > $op = $_GET['op']; > switch ( $op ) > { > //Code here > } > > Or would it be better and more space efficient to do this > $op = isset($_GET['op']); > switch ( $op ) > { > //Code here > } > Cause if i do that the Notice Message dissapears for some reason i yet fail > to grab.

    This doesn't work since the result of isset($_GET['op']) is either true or false, not a string value. You need to write it like this:

    if (isset($_GET['op']) { $op = $_GET['op'];

    switch ($op) { //Code here } }

    > I would really appreciate if somebody could explain to me why the Notice > dissapears when using isset(), and also what is the best method to use > rather then the two shown above? > How do you guys&girls handle this? > > Thanks a lot in advance for your time and patience! > > Best regards from Vienna, > Jürgen > > >

    Hope this helps!

    /lasso (lassolassoweb.nu)

    attached mail follows:


    do this:

    $op = isset($_GET['op']) && !empty($_GET['op']) ? $_GET['op'] : '';

    "JüRgen" <uochello.at> wrote in message news:20020802123613.26400.qmailpb1.pair.com... > It's me again, i don't mean to be a bugger, but i really like to learn as > much as possible, that's why i ask (or will ask so many questions). > > Consider the following (i shortened this a lot, but it will do the trick) > > $op = $_GET['op']; > switch ( $op ) > { > case "admin": > DoLogin(); > break; > > default: > ShowHomepage(); > break; > } > > PHP shoots a Notice Message telling me that there is an undefined index > Undefined index: act in g:\apache_web\intern\looney\index.php on line 177 > > This accects the code shown above. > > Ok, am i correct in assuming that it pops this message because $op is not > defined as anything yet? > > If so,should i always just do this > > $_POST['op'] = ''; > $op = $_GET['op']; > switch ( $op ) > { > //Code here > } > > Or would it be better and more space efficient to do this > $op = isset($_GET['op']); > switch ( $op ) > { > //Code here > } > Cause if i do that the Notice Message dissapears for some reason i yet fail > to grab. > I would really appreciate if somebody could explain to me why the Notice > dissapears when using isset(), and also what is the best method to use > rather then the two shown above? > How do you guys&girls handle this? > > Thanks a lot in advance for your time and patience! > > Best regards from Vienna, > Jürgen > > >

    attached mail follows:


    Jrgen wrote:

    > >$op = $_GET['op']; >switch ( $op ) > >PHP shoots a Notice Message telling me that there is an undefined index >Undefined index: act in g:\apache_web\intern\looney\index.php on line 177 > If there is not a get variable in the url you will get the warning.

    >Ok, am i correct in assuming that it pops this message because $op is not >defined as anything yet? > Yes,

    > >If so,should i always just do this > >$_POST['op'] = ''; >$op = $_GET['op']; >switch ( $op ) >{ > //Code here >} > If there is not a get variable callled "op" you should still get the warning.

    >$op = isset($_GET['op']); >switch ( $op ) >{ > //Code here >} > Now $op will be a boolean assigned the value true (if there is a get variable called "op" in the url) or false if not. As $op will have a value then there is no warning.

    What I tend to do when I have an optional item of data is:

    if (isset($_GET["op"])) [ $op = $_GET["op"]; } else { $op = "no value"; // set to something you can test for in your switch statement. } though there may be a better way.

    > >Best regards from Vienna, >Jrgen > .. thanks, and best regards to you from Essex, England.

    HTH Chris

    attached mail follows:


    Given a date.... how would you work out number of months elapsed between DateInPast and DateNow?

    attached mail follows:


    (YearsDifference*12)+FullMonthsDifference :)

    Regards, Stas.

    ----- Original Message ----- From: "Brian McGarvie" <brian.mcgarvieanypurposeloans.co.uk> To: <php-generallists.php.net> Sent: Friday, August 02, 2002 1:50 PM Subject: [PHP] Date Stuff...

    > Given a date.... how would you work out number of months elapsed between > DateInPast and DateNow? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    > Given a date.... how would you work out number of months elapsed > between DateInPast and DateNow?

    ( $monthTo - $monthFrom ) + (( $yearTo - $yearFrom ) * 12 )

    I believe that's the correct equation for figuring out the number of months.

    Chris

    attached mail follows:


    ta guys...

    works fine :)

    had a brain-freeze :)

    "Brian McGarvie" <brian.mcgarvieanypurposeloans.co.uk> wrote in message news:20020802124903.34280.qmailpb1.pair.com... > Given a date.... how would you work out number of months elapsed between > DateInPast and DateNow? > >

    attached mail follows:


    Good morning!

    I need to subtract months by their abbreviated month name, so shouldn't this work?

    print(date("M", mktime(date("M")-$i));

    and if I loop;

    Aug Jul Jun May ........

    Thanks!

    Jay

    What if the hokie pokie really is what it is all about

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

    attached mail follows:


    I have this:

    //file1.php <? include('../libs/lib1.php'); .. .. .. ?>

    now lib1.php: <? include ('helper.php'); ?>

    If i run file1.php ->includes lib1.php -> fails to include helper.php ! !

    how can i solve that?

    p.s: currently, i'm chdir()ing to the ../libs path, then i return to current dir... my code cannot make use of Apache's help. (like setting the include path inside .htaccess)

    thank you, Elias

    attached mail follows:


    On Friday 02 August 2002 10:02 am, lallous wrote: > I have this: > //file1.php > <? > include('../libs/lib1.php'); > ?> > now lib1.php: > <? > include ('helper.php'); > ?> > If i run file1.php ->includes lib1.php -> fails to include helper.php ! ! > how can i solve that?

    We need more information that this. What's the error message? what do you mean fails? In anycase, you should be able to run lib1.php first without error, before trying file1.php. If the former causes error, resolve that first.

    rdb

    > > p.s: currently, i'm chdir()ing to the ../libs path, then i return to > current dir... > my code cannot make use of Apache's help. (like setting the include path > inside .htaccess) > > thank you, > Elias

    attached mail follows:


    I mean this:

    i have this tree:

    ./libs/*.php ./user/file1.php

    now i'm in ./user/ directory i run file1.php it includes ../libs/lib1.php which in turn will include helper.php (./users/helper.php) <-- will fail!

    how can i programmatically set the include path?

    Elias

    "Reuben D. Budiardja" <reubendbinnovativethought.com> wrote in message news:200208020937.19956.reubendbinnovativethought.com... On Friday 02 August 2002 10:02 am, lallous wrote: > I have this: > //file1.php > <? > include('../libs/lib1.php'); > ?> > now lib1.php: > <? > include ('helper.php'); > ?> > If i run file1.php ->includes lib1.php -> fails to include helper.php ! ! > how can i solve that?

    We need more information that this. What's the error message? what do you mean fails? In anycase, you should be able to run lib1.php first without error, before trying file1.php. If the former causes error, resolve that first.

    rdb

    > > p.s: currently, i'm chdir()ing to the ../libs path, then i return to > current dir... > my code cannot make use of Apache's help. (like setting the include path > inside .htaccess) > > thank you, > Elias

    attached mail follows:


    In article <20020802133946.83045.qmailpb1.pair.com>, phplistlgwm.org (Lallous) wrote:

    > how can i programmatically set the include path?

    http://php.net/ini-set

    -- 
    CC
    

    attached mail follows:


    So... Is this equivalent to Zend Encoder?

    Elias "Manuel Lemos" <mlemosacm.org> wrote in message news:3D49DD13.6040901acm.org... > 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:


    > From: YC Nyon [mailto:ycnyonpd.jaring.my] > Sent: Thursday, August 01, 2002 12:59 PM > Subject: [PHP] Protect PHP coding

    There is the PHP Obfuscator/Obscurer: http://pobs.mywalhalla.net/

    attached mail follows:


    have you searched hotscripts.com ?

    "Shane" <shanedelaplaine.com> wrote in message news:CD44D03584C7A249A3F86891B24EB8EA01EC712Dexch003intermedia.net... Anyone have a favorite Calendar script out there they would like to share?

    - NorthBayShane

    attached mail follows:


    If any PHP hosts are out there I have a question: How do you keep users from erasing / altering files out side of their web folder with PHP? Doesn't PHP run in the system user context? Is is possible to prevent a user from using PHP to alter anything but in their Web folder? Matt Babineau MCWD / CCFD ----------------------------------------- e: <mailto:mattcriticalcode.com> mattcriticalcode.com p: 603.943.4237 w: <http://www.criticalcode.com/> http://www.criticalcode.com PO BOX 601 Manchester, NH 03105

    attached mail follows:


    Safe_mode = ON

    Open_basedir restrictions

    Use PHP in CGI mode and each runs as it's own user with access to only it's own file (may require separate Apache's, too...)

    ---John Holmes...

    > -----Original Message----- > From: Matt Babineau [mailto:mattcriticalcode.com] > Sent: Friday, August 02, 2002 9:04 AM > To: php-generallists.php.net > Subject: [PHP] PHP Hosting > > If any PHP hosts are out there I have a question: > > How do you keep users from erasing / altering files out side of their > web folder with PHP? Doesn't PHP run in the system user context? Is is > possible to prevent a user from using PHP to alter anything but in their > Web folder? > > Matt Babineau > MCWD / CCFD > ----------------------------------------- > e: <mailto:mattcriticalcode.com> mattcriticalcode.com > p: 603.943.4237 > w: <http://www.criticalcode.com/> http://www.criticalcode.com > PO BOX 601 > Manchester, NH 03105 >

    attached mail follows:


    Take a look at this directive : http://www.php.net/manual/en/configuration.php#ini.open-basedir

    Danny.

    ----- Original Message ----- From: "Matt Babineau" <mattcriticalcode.com> To: <php-generallists.php.net> Sent: Friday, August 02, 2002 2:04 PM Subject: [PHP] PHP Hosting

    > If any PHP hosts are out there I have a question: > > How do you keep users from erasing / altering files out side of their > web folder with PHP? Doesn't PHP run in the system user context? Is is > possible to prevent a user from using PHP to alter anything but in their > Web folder? > > Matt Babineau > MCWD / CCFD > ----------------------------------------- > e: <mailto:mattcriticalcode.com> mattcriticalcode.com > p: 603.943.4237 > w: <http://www.criticalcode.com/> http://www.criticalcode.com > PO BOX 601 > Manchester, NH 03105 > >

    attached mail follows:


    This has been discussed in great detail before.. but the simplist solution is running PHP in safe mode, it does limit the user to certain things, but it stops them bringing the server down or altering others files

    andrew ----- Original Message ----- From: "Matt Babineau" <mattcriticalcode.com> To: <php-generallists.php.net> Sent: Friday, August 02, 2002 2:04 PM Subject: [PHP] PHP Hosting

    > If any PHP hosts are out there I have a question: > > How do you keep users from erasing / altering files out side of their > web folder with PHP? Doesn't PHP run in the system user context? Is is > possible to prevent a user from using PHP to alter anything but in their > Web folder? > > Matt Babineau > MCWD / CCFD > ----------------------------------------- > e: <mailto:mattcriticalcode.com> mattcriticalcode.com > p: 603.943.4237 > w: <http://www.criticalcode.com/> http://www.criticalcode.com > PO BOX 601 > Manchester, NH 03105 > >

    attached mail follows:


    Tried to post this to the news group before, but I'm having trouble getting to my news server from work - hopefully I'm not posting a duplicate.

    I think I'm seeing the problem I'm seeing because I'm getting a copy of a var instead of a reference to it, but I'm not sure the best we to get around this problem.

    In my little sample script, I've got an array of objects. When I use foreach to loop through the array and make a change to an item, it doesn't change the object in the array, just the var that I have while I'm in the foreach loop.

    What's the right way to loop through this array if I really want to change homer's name to marge in this example? The way it is now, I see my echo saying that I'm changing the name, but when I do the second var_dump, it's the same as the first var_dump.

    Thanks in advance, Jesse

    <?php

    class Name { var $firstName; var $lastName;

    function Name($first, $last) { $this->firstName = $first; $this->lastName = $last; } }

    $names[] = new Name("joe", "shmo"); $names[] = new Name("billy", "bob"); $names[] = new Name("homer", "simpson");

    ?>

    <html> <body> <?php echo var_dump($names) ?> <br> <?php foreach ($names as $name) { if (strcmp($name->firstName, "homer") == 0) { echo "changing homer to marge<br>"; $name->firstName = "marge"; break; } } ?> <?php echo var_dump($names) ?>

    <br> </body> </html>

    attached mail follows:


    yes, true!

    try this patch: > if (strcmp($name->firstName, "homer") == 0) { > echo "changing homer to marge<br>"; > $name->firstName = "marge"; $names[key($names)]->firstName = "marge";

    good luck,

    Elias

    "Jesse Vitrone" <jessevitronevitalworks.com> wrote in message news:LNENLMCBPCIEDFNDGIMHOEIJCAAA.jessevitronevitalworks.com... > Tried to post this to the news group before, but I'm having trouble getting > to my news server from work - hopefully I'm not posting a duplicate. > > > I think I'm seeing the problem I'm seeing because I'm getting a copy of a > var instead of a reference to it, but I'm not sure the best we to get around > this problem. > > In my little sample script, I've got an array of objects. When I use > foreach to loop through the array and make a change to an item, it doesn't > change the object in the array, just the var that I have while I'm in the > foreach loop. > > What's the right way to loop through this array if I really want to change > homer's name to marge in this example? The way it is now, I see my echo > saying that I'm changing the name, but when I do the second var_dump, it's > the same as the first var_dump. > > Thanks in advance, > Jesse > > <?php > > class Name { > var $firstName; > var $lastName; > > function Name($first, $last) { > $this->firstName = $first; > $this->lastName = $last; > } > } > > $names[] = new Name("joe", "shmo"); > $names[] = new Name("billy", "bob"); > $names[] = new Name("homer", "simpson"); > > ?> > > <html> > <body> > <?php echo var_dump($names) ?> > <br> > <?php > foreach ($names as $name) { > if (strcmp($name->firstName, "homer") == 0) { > echo "changing homer to marge<br>"; > $name->firstName = "marge"; > break; > } > } > ?> > <?php echo var_dump($names) ?> > > <br> > </body> > </html> >

    attached mail follows:


    Hey Mark,

    Thanks. I understand. I'm actually a Cold Fusion programmer.

    I've tried what you suggested but can't seem to get it work - code attached. However, I can display the radio button if I use the $_POST function.

    I'm not sure if it's the version of php I'm using. Stats - windows 2000 Sp1, Apache 2.039, php 4.2.2.

    Thanks for taking the time!!

    "Mark Middleton" <markwhirledweb.com> wrote in message news:IIENKMDDPOIJLLNHPJGJGEGFCEAA.markwhirledweb.com... > It looks like your code could use "variable variables" to help you out. > > ::::::::::: OLD CODE :::::::::::::::: > > > > for ($GameIdx = 1; $GameIdx <= 17; $GameIdx++) { > > > /* instead "hardcoding each radio button name - just do it > > programmatically > > > by concatenating / creating the name */ > > > $frmGame = "Game" + $GameIdx; > > > if ($frmGame) { > > ::::::: END OF OLD CODE ::::::::::::: > > ** this check will always be true - because you just set $frmGame equal to a > value... *** > What you want to do at this point is use variable variables (where the > variable name is actually > a variable itself. > > ::::::::: NEW CODE ::::::::::: > > > > $var_frmGame = "Game" + $GameIdx; > > > $frmGame = $$var_frmGame; // The "$$" is used for variable variables > > > if ($frmGame) { > > :::::: END OF NEW CODE ::::::: > > ** the above snippett is was I wrote to show the results of the dynamic > (looped-through) variable $Game1, $Game2, ... > > I use this method when the number of form elements is variable. Instead of > hardcoding the number "17" you might make a variable in the incoming form > with the count of form elements (simply increment a variable with each > printing of the form variable... then at the end of the form make <input > type="hidden" name="elementcount" value="$count">) > > Then you can make the above for-statement look like this: > > > > for ($GameIdx = 1; $GameIdx <= $elementcount; $GameIdx++) { > > Does any of this make sense or help in any way? > > -Mark > >

    begin 666 InsertPicks3.php M/"%$3T-465!%($A434P4%5"3$E#("(M+R]7,T,O+T141"!(5$U,(#0N,"!4 M<F%N<VET:6]N86PO+T5.(CX-"CQH=&UL/T*/&AE860^#0H)/'1I=&QE/E!I M8VMS(2$A/"]T:71L93X-"CQ-151!(&AT=' M97%U:78](D-O;G1E;G0M5'EP M92(8V]N=&5N=#TB=&5X="]H=&UL.R!C:&%R<V5T/6ES;RTX.#4Y+3$B/D- M"CPO:&5A9#X-"CQB;V1Y/T*/%1!0DQ%/T*/'1R/T*"3QT9#Y0:6-K(%1H M:7,\+W1D/T*/"]T<CX-"CPO5$%"3$4^#0H\/W!H< T*:68*"1C;VYT:6YU M92 ]/2 B8V]N=&EN=64B*7L#0H('!R:6YT(")(96QL;RP)&=A;64Q(CL M#0I]( T*/SX-"CQ404),13X-"CQ&3U)-($Y!344](G!I8VLB($%#5$E/3CTB M26YS97)T4&EC:W,S+G!H<"(34542$]$/2)03U-4(CX-"CPA+2T/$9/4DT M3D%-13TB<&EC:R(04-424]./2)497-T+G!H<"(34542$]$/2)03U-4(B ^ M("TM/T*/'1R/T*"3QT9#Y38W)E=R!5/"]T9#X-"D\=&0^#0H)"3QI;G!U M="!T>7!E/2)R861I;R(;F%M93TB9V%M93$B('9A;'5E/2(Q(CXF;F)S<#M9 M15,-"D)/&EN<'5T('1Y<&4](G)A9&EO(B!N86UE/2)G86UE,2(=F%L=64] M(C(B/B9N8G-P.TY/#0H)/"]T9#X-"CPO='(^#0H\(2TM($-/3E1)3E5%($)5 M5%1/3B M+3X-"CQT<B!H96EG:'0](C<B/T*"3QT9"!H96EG:'0](C<B(&-O M;'-P86X](C,B(&%L:6=N/2)C96YT97(B/T*"0D\:6YP=70='EP93TB<W5B M;6ET(B!N86UE/2)#;VYT:6YU92(=F%L=64](D-O;G1I;G5E(CX\+VEN<'5T M/T*"3PO=&0^#0H\+W1R/T*/"]&3U)-/T*/"]404),13X-"CP_<&AP#0HO M*B -"D-H96-K(&5A8V;V8=&AE(&=A;65S(&9R;VT;6%K95]P:6-K<RYP M:' =&\9&5T97)M:6YE('=H870=&5A;7,=V5R92!P:6-K9609F]R(&5A M8V9V%M92X-"DYO=&4;6%X(&]F(#$W(&=A;65S(0T*("HO#0H-"B\J(&-H M96-K('1O(&UA:V4<W5R92 ("HO#0HO+R1G86UE,3$/2 B,3$B.PT*:68 M*"1?4$]35%LG9V%M93$G72D>PT*"7!R:6YT(")G86UE,2 ]("(*R D7U!/ M4U1;)V=A;64Q)UT*R B/$)2/B([('T-"D-"B\O(" D=F%R7V9R;4=A;64 M/2 B1V%M92(*R D1V%M94ED>#L-"B\O(" D9G)M1V%M92 ]("0D=F%R7V9R M;4=A;64[(" +R\5&AE("(D)"(:7,=7-E9"!F;W(=F%R:6%B;&4=F%R M:6%B;&5S#0HO+R :68*"1F<FU'86UE*2![#0H)#0IF;W(*"1'86UE261X M(#T,3L)$=A;65)9'/#T,3<[("1'86UE261X*RLI('L-"DO*B!I;G-T M96%D(")H87)D8V]D:6YG(&5A8V<F%D:6\8G5T=&]N(&YA;64+2!J=7-T M(&1O(&ET('!R;V=R86UM871I8V%L;'D8GD8V]N8V%T96YA=&EN9R O(&-R M96%T:6YG('1H92!N86UE("HO#0H))'9A<E]F<FU'86UE(#T(D=A;64B("L M)$=A;65)9'[#0H))&9R;4=A;64/2 D)'9A<E]F<FU'86UE.R ("\O(%1H M92 B)"0B(&ES('5S9609F]R('9A<FEA8FQE('9A<FEA8FQE<PT*"21,96YG M=&/2!S=')L96XH)&9R;4=A;64I.PT*"7!R:6YT("),3T]0("1'86UE261X M(#T)&9R;4=A;64+2 D=F%R7V9R;4=A;64+2!L96YG=&;V89G)M1V%M M93T)$QE;F=T:" \0E(^(CL-"T*+R\))&9R;4=A;64/2 B9V%M921'86UE M261X(CL-"EI9B H)%]03U-46R=F<FU'86UE)UTI('L-"D)+RH52!W86YT M('1O(&-H96-K(&EF('1H92!L96YG=&:7,-2!O<B V(&)Y=&5S(&)E8V%U M<V4:708V]U;&08F4(F=A;64Q(B!O<B B9V%M93$T(B J+PT*"0DD3&5N M9W1H(#T<W1R;&5N*"1F<FU'86UE*3L-"D):68*"1,96YG=&/3T-2D M>PT*"0D))$=E=$YU;6)E<B ](#$[( T*"0E]#0H)"65L<V4>PT*"0D))$=E M=$YU;6)E<B ](#([( T*"0E]#0H)#0H)"21'86UE240/2!I;G1V86PH<W5B M<W1R*"1F<FU'86UE+" D3&5N9W1H("T)$=E=$YU;6)E<BP)$=E=$YU;6)E M<BDI.PT*"0EP<FEN=" B1V%M92 M+2T^("1'86UE261X("T)&9R;4=A;64 M+2 D1V5T3G5M8F5R("T)$=A;65)1" \0E(^(CL-"B ( EI9B H)$=A;65) M1" ]/2 D1V%M94ED>"D>PT*"0D)<')I;G0(EEE8636%T8V+2 D1V%M M94E$(#T)$=A;65)9'/$)2/B([#0H)"0DO*B!/2RP:&5R92!I<R!W:&5R M92!5('=A;G0=&\9&\=&AE(&%C='5A;"!I;G-E<G0*B\-"D)?0T*"7T M+RH)&9R;4=A;6496YD:68*B\-"GT-"T*/SX-"CPO8F]D>3X-"CPO:'1M ";#X` ` end

    attached mail follows:


    Shew,

    http://www.whirledweb.com/phptest/InsertPicks3.php

    It looks like the issue here is Capitalization. PHP is very capitalization sensative. (which I believe that Cold Fusion is less picky about) And your code looks great, save a couple little issues that may have made it even more confusing. :-)

    1. the concatenation character in PHP is the "." not "+", so line 45 or so was having issues (it was literally adding "Game" to the contents of the variable... so it gave odd output results.) This also messed up your concatenation at about line 54.

    2. (this is pretty arbitrary) The HTML input tag doesn't need a closing tag. I do think however, you can make it XML compliant by writing it this way: <input type="text" name="name" value="value" /> The closing slash shows that there is no closing tag needed. (not sure why one would need to make it XML compliant...) I'm not an expert in this specific little area, so somebody with a bigger brain on this list might clear that up.

    3. Then, there are several capitalization inconsistencies. The variable name in your form is "game1" but then you were checking for "Game1"... except in your $_POST function, where you went back to all lower case. I cleaned that up, and it seems to work great now.

    I hope some of this helps! -Mark

    > > Thanks. I understand. I'm actually a Cold Fusion programmer. > > I've tried what you suggested but can't seem to get it work - > code attached. > However, I can display the radio button if I use the $_POST function. > > I'm not sure if it's the version of php I'm using. Stats - > windows 2000 Sp1, > Apache 2.039, php 4.2.2. > > Thanks for taking the time!! > > "Mark Middleton" <markwhirledweb.com> wrote in message > news:IIENKMDDPOIJLLNHPJGJGEGFCEAA.markwhirledweb.com... > > It looks like your code could use "variable variables" to help you out. > > > > ::::::::::: OLD CODE :::::::::::::::: > > > > > > for ($GameIdx = 1; $GameIdx <= 17; $GameIdx++) { > > > > /* instead "hardcoding each radio button name - just do it > > > programmatically > > > > by concatenating / creating the name */ > > > > $frmGame = "Game" + $GameIdx; > > > > if ($frmGame) { > > > > ::::::: END OF OLD CODE ::::::::::::: > > > > ** this check will always be true - because you just set > $frmGame equal to > a > > value... *** > > What you want to do at this point is use variable variables (where the > > variable name is actually > > a variable itself. > > > > ::::::::: NEW CODE ::::::::::: > > > > > > $var_frmGame = "Game" + $GameIdx; > > > > $frmGame = $$var_frmGame; // The "$$" is used for variable > variables > > > > if ($frmGame) { > > > > :::::: END OF NEW CODE ::::::: > > > > ** the above snippett is was I wrote to show the results of the dynamic > > (looped-through) variable $Game1, $Game2, ... > > > > I use this method when the number of form elements is variable. Instead > of > > hardcoding the number "17" you might make a variable in the > incoming form > > with the count of form elements (simply increment a variable with each > > printing of the form variable... then at the end of the form make <input > > type="hidden" name="elementcount" value="$count">) > > > > Then you can make the above for-statement look like this: > > > > > > for ($GameIdx = 1; $GameIdx <= $elementcount; $GameIdx++) { > > > > Does any of this make sense or help in any way? > > > > -Mark > > > > > > >

    attached mail follows:


    Hi Kirk,

    Thanks. Never knew you could do that. I'll try it out.

    Shew

    "Kirk Johnson" <kjohnsonzootweb.com> wrote in message news:01A4B59FD1EBD311838100A0C98BE0D9023C49D1chef... > If you made an array for your buttons, then you could use PHP's looping > constructs to process the array. Write the input tag like this: > > <INPUT NAME=Game[1] VALUE=1>Chicago > > The processing code will then have access to the array $Game indexed by the > game number, e.g., $Game[1]. > > Good luck! > > Kirk > > > > -----Original Message----- > > From: Shew [mailto:babydragon4excite.com] > > Sent: Thursday, August 01, 2002 9:19 AM > > To: php-generallists.php.net > > Subject: [PHP] Re: Dynamically check radio buttons > > > > > > OK, changed the subject to what I think it should be about. > > > > Anybody? > > > > "Shew" <babydragon4excite.com> wrote in message > > news:20020731141657.80369.qmailpb1.pair.com... > > > Hi - I'm a TOTAL php NEWBIE - my 1st bit of code!!!. > > > > > > Basically the input form page has 17 sets of radio buttons, each > > > representing one game with 2 options - team 1 and team 2. > > What I want to > > do > > > is a better way of checking each radio button value instead > > of using an if > > > statement for each. This code doesn't really work - it > > finds that vars > > > ALWAYS exist. > > > > > > IE: > > > > > > <INPUT NAME=Game1 VALUE=1>Chicago > > > <INPUT NAME=Game1 VALUE=2>whatever > > > > > > <INPUT NAME=Game2 VALUE=3>Minny > > > <INPUT NAME=Game2 VALUE=1>Nobody > > > > > > Code above is processed by the following code: > > > > > > for ($GameIdx = 1; $GameIdx <= 17; $GameIdx++) { > > > /* instead "hardcoding each radio button name - just do it > > programmatically > > > by concatenating / creating the name */ > > > $frmGame = "Game" + $GameIdx; > > > if ($frmGame) { > > > /* U want to check if the length is 5 or 6 bytes because > > it could be > > > "game1" or "game14" */ > > > $Length = strlen($frmGame); > > > if ($Length == 5) { > > > $GetNumber = 1; > > > } > > > else { > > > $GetNumber = 2; > > > } > > > > > > $GameID = intval(substr($frmGame, $Length - $GetNumber, > > $GetNumber)); > > > print "Game ---> $GameIdx - $frmGame - $GetNumber - $GameID <BR>"; > > > if ($GameID == $GameIdx) { > > > print "Yeah Match - $GameID = $GameIdx <BR>"; > > > /* OK, here is where U want to do the actual insert */ > > > } > > > } /* $frmGame endif */ > > > } > > > > > > ?> > > > > > > > > > Thanks > > > > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    I have wrote this function:

    function issne($var) { return isset($var) && !empty($var) ? true : false; }

    which can be called as: if (issne(&$mightbeundefinedvariable)) echo "using this variable";

    is there is any builtin function that does that? (one function call).

    //Elias

    attached mail follows:


    On Fri, Aug 02, 2002 at 04:48:17PM +0200, lallous wrote: > > function issne($var) > { > return isset($var) && !empty($var) ? true : false; > } > > is there is any builtin function that does that? (one function call).

    Yes. Just use empty(). It automatically checks if the variable is: not set null an empty string zero

    If any of them are true, the empty() function returns true. You don't need your function at all.

    --Dan

    -- 
                   PHP classes that make web design easier
            SQL Solution  |   Layout Solution   |  Form Solution
        sqlsolution.info  | layoutsolution.info |  formsolution.info
     T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
     4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409
    

    attached mail follows:


    But if this is true what you say, that empty() checks for not set null an empty string zero

    Why would i ever want to use isset() then?

    If i understood you correctly, would the following

    op = isset($_GET['op']) && !empty($_GET['op']) ? $_GET['op'] : '';

    be the same as

    op = !empty($_GET['op']) ? $_GET['op'] : '';

    ?

    *confused*

    "Analysis & Solutions" <danielcanalysisandsolutions.com> wrote in message news:20020802141158.GA27625panix.com... > On Fri, Aug 02, 2002 at 04:48:17PM +0200, lallous wrote: > > > > function issne($var) > > { > > return isset($var) && !empty($var) ? true : false; > > } > > > > is there is any builtin function that does that? (one function call). > > Yes. Just use empty(). It automatically checks if the variable is: > not set > null > an empty string > zero > > If any of them are true, the empty() function returns true. You don't > need your function at all. > > --Dan > > -- > PHP classes that make web design easier > SQL Solution | Layout Solution | Form Solution > sqlsolution.info | layoutsolution.info | formsolution.info > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

    attached mail follows:


    Turn off the short tag option in the PHP ini file, and always use '<?php' as your php start tag. When short tags are enabled, PHP sees the '<?' in '<?xml', and assumes it is a start tag.

    - Theo

    -----Original Message----- From: Scott Fletcher [mailto:scottabcoa.com] Sent: Thursday, August 01, 2002 1:03 PM To: php-generallists.php.net Subject: Re: [PHP] Problem with "<?xml ....>" inside the PHP code, due to "?"

    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:


    [snip] I need to subtract months by their abbreviated month name, so shouldn't this work?

    print(date("M", mktime(date("M")-$i));

    and if I loop;

    Aug Jul Jun May ........ [/snip]

    Apparently not. But you can subtract by total hours in a given period, so for an average I chose 30 days * 24 hours (720);

    $i = 36; $h = 720; while($i > 0){ print(date("M", mktime(date("M")-$h)));print(date("Y"));print("<br>"); $i--; $h = $h + 720; }

    which results in

    Jul2002 Jun2002 May2002 Apr2002 Mar2002 Feb2002 Jan2002 Dec2002 Nov2002 Oct2002 Sep2002 Aug2002 Jul2002 Jun2002 May2002

    So now all I have to do is sove the year rollover, which I think I can do the same way. It'd be so much easier if mktime worked as the documentation said, but after many iterations of different things this is what I was able to come up with.

    Jay

    Carpe Ductum - Sieze the tape

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

    attached mail follows:


    Hi! Using an .htaccess file to limit access to some web files, is there a way to get the name and password into a variable used by a user to log on? Kind regards, Oliver

    attached mail follows:


    The password that user used is available in some var var_dump($HTTP_SERVER_VARS); or var_dump($GLOBALS);

    Andrey ----- Original Message ----- From: "Oliver Witt" <oliverwittt-online.de> To: <php-generallists.php.net> Sent: Friday, August 02, 2002 5:21 PM Subject: [PHP] .htaccess

    > Hi! > Using an .htaccess file to limit access to some web files, is there a > way to get the name and password into a variable used by a user to log > on? > Kind regards, > Oliver > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    place a phpInfo() page behind the .htaccess and you will see what varibles php has :) I'm pretty sure there is ones contianing the username/password that was entered

    Andrew ----- Original Message ----- From: "Oliver Witt" <oliverwittt-online.de> To: <php-generallists.php.net> Sent: Friday, August 02, 2002 3:21 PM Subject: [PHP] .htaccess

    > Hi! > Using an .htaccess file to limit access to some web files, is there a > way to get the name and password into a variable used by a user to log > on? > Kind regards, > Oliver > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    Hi! i have instaled PHP 4.2.2 in a slack 8.1 running apache 2.0.39. i have a proble with a very basic script (pass variables to a php script). Is seems not recieve variables, because print somthing like this:

    Your first name is . Your last name is . Your E-mail address is . This is what you had to say:

    In the server log say the variables appear don´t exist. Here i send this windows files (i try in XP with iis 5.1 and PJP 4.2.2 and is the same problem) to help you to help me :) ah! php is working because i test the <? phpinfo(); ?> stuff and works !!!

    Tanks

    attached mail follows:


    I get the error msg mentioned above when I use the ereg() function. What is it, that I don't know? Best regards Klaus