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: Wed Jan 01 2003 - 23:42:38 CST

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

    php-general Digest 2 Jan 2003 05:42:38 -0000 Issue 1798

    Topics (messages 129855 through 129917):

    Re: Php 4.3.0 and Mail() function
            129855 by: Jason Wong
            129888 by: Rick Widmer

    Re: How To Delete Multiple Items Of Multiple Tables Using PHP and MySQL
            129856 by: Jason Wong

    Re: Securing areas of a web site with PHP
            129857 by: David Tandberg-Johansen
            129858 by: Jason Wong
            129859 by: Jason Wong
            129860 by: Jason Sheets
            129861 by: David Tandberg-Johansen
            129866 by: Mel Lester Jr.
            129877 by: Justin French
            129904 by: Jean-Christian Imbeault
            129905 by: Jean-Christian Imbeault

    Re: Shopping Cart Credit Card Verification
            129862 by: Jonathan Rosenberg \(Tabby's Place\)

    Bcc with mail....
            129863 by: Michael J. Pawlowsky
            129867 by: Jason Wong
            129881 by: Michael J. Pawlowsky

    Re: PHP & PostgreSQL
            129864 by: Vincent Oostindie

    Re: PHP 4.3.0 (Win32, zip) not bundled with PEAR?
            129865 by: nicos.php.net

    hyperlink
            129868 by: Ezequiel Sapoznik
            129871 by: Ezequiel Sapoznik
            129872 by: Joe LoMoglio
            129874 by: Ezequiel Sapoznik
            129875 by: Joe LoMoglio

    Hyperlink in DB
            129869 by: Ezequiel Sapoznik

    accelerator and Apache 2
            129870 by: Jochen Kaechelin
            129873 by: Timothy Hitchens \(HiTCHO\)

    How to get folders names in a dir
            129876 by: Alexander Guevara
            129878 by: John Nichel
            129880 by: Justin French
            129884 by: Alexander Guevara

    Using mail() for mailist list app
            129879 by: Monty
            129882 by: Justin French
            129886 by: Michael J. Pawlowsky
            129917 by: Mike Mannakee

    Session problem
            129883 by: Andrew Williams
            129885 by: Justin French
            129889 by: Andrew Williams
            129891 by: Michael J. Pawlowsky
            129893 by: Justin French
            129894 by: Michael J. Pawlowsky
            129895 by: Matt Sturtz
            129896 by: Justin French
            129897 by: Michael J. Pawlowsky
            129898 by: Michael J. Pawlowsky
            129899 by: Andrew Williams
            129900 by: Andrew Williams
            129901 by: Michael J. Pawlowsky
            129903 by: Andrew Williams
            129906 by: Michael J. Pawlowsky
            129908 by: Andrew Williams

    NFS session file issue?
            129887 by: Matt Sturtz

    func_get_args() and call-by-reference?
            129890 by: Atahualpa Jones

    Php 4.3 fails several XSLT tests
            129892 by: Alok K. Dhir

    PayFlow Pro on OS X
            129902 by: Sam

    Files into a variable...
            129907 by: Enu

    multiple select problem
            129909 by: Elaine Kwek
            129910 by: Jason k Larson
            129911 by: Tom Rogers

    PHP 4.3 & Apache 2
            129912 by: Scott Seidl
            129913 by: Rasmus Lerdorf
            129914 by: Tyler Longren

    PHP Insert Data Form
            129915 by: Edson Waite
            129916 by: Michael J. Pawlowsky

    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:


    On Thursday 02 January 2003 01:26, Carl Bélanger wrote:
    > Exactly!!
    >
    > "checking for sendmail... no"
    >
    > I've browsed the configure's help and I can't find an option to specify
    > the path to sendmail (which is not at a regular place as we run qmail).
    > Is the a "--with-sendmail-path" option or something like that?

    qmail comes with a wrapper called sendmail which emulates sendmail. I'm not
    sure where php's configure expects to find sendmail but you can try
    copying/linking the wrapper to /usr/lib and/or /usr/sbin.

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

    /* While my BRAINPAN is being refused service in BURGER KING, Jesuit priests are DATING CAREER DIPLOMATS!! */

    attached mail follows:


    At 02:07 AM 1/2/03 +0800, Jason Wong wrote: >On Thursday 02 January 2003 01:26, Carl Bélanger wrote: > > Exactly!! > > > > "checking for sendmail... no" > > > > I've browsed the configure's help and I can't find an option to specify > > the path to sendmail (which is not at a regular place as we run qmail). > > Is the a "--with-sendmail-path" option or something like that?

    I don't believe there is one. At the very least you can:

    touch /usr/sbin/sendmail

    which creates an empty file where ./configure expects to find sendmail.

    >qmail comes with a wrapper called sendmail which emulates sendmail. I'm not >sure where php's configure expects to find sendmail but you can try >copying/linking the wrapper to /usr/lib and/or /usr/sbin.

    This is best:

    ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail

    Now any program expecting to find sendmail in the default location will find the Qmail wrapper instead, and will work.

    Rick

    attached mail follows:


    On Wednesday 01 January 2003 20:14, superbus22attbi.com wrote: > Jason, thanks, but see if you can you read the initial question and try to > answer that one for me. You are a great help with resources when I need > them. Your help is always appreciated. The origial clip is as follows > (concentrate on the ending question):

    OK concentrating on the last paragraph ...

    > Is there a better way to delete multiple items > from multiple tables with one SQL string? I don't want to separate the two > DELETE functions and run them through two separate times because of > overhead concerns. I tried looking on the MySQL and PHP website for better > ways of using DELETE syntax on multiple tables, but I had no luck finding > anything useful with my version of MySQL. Any help would be greatly > appreciated.

    ..., unfortunately that's not possible. Each DELETE statement can only delete from a single table.

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

    /* "You show me an American who can keep his mouth shut and I'll eat him." -- Newspaperman from Frank Capra's _Meet_John_Doe_ */

    attached mail follows:


    [CUT]

    I am using SESSION on al my secure projects I use a file structur as this: (loginform) -> logincheck.php (if not ok->back2login | if ok (start an session)(forward to the secure pages))

    When the user logs out: (securepages)->logout.php: <?PHP //go through all the session array an unregister the varname foreach($_SESSION as $key=>$val){ session_unregister("$key"); } // We destroys the session session_destroy();

    //if there are an cookie vith the session name we have to unset it //so the browser doesn't hvae the information if(isset($_COOKIE[session_name()])){ // To delete the old cookie unset($_COOKIE[session_name()]); } //we starts an new session session_start(); //and we destroys it again session_destroy(); //Now there are an new session cookie in the browser, //and if the user try go back there are no data stored in the session

    //we forward the user to an unsecure public page header("Location: ./unsecurepublicpage.php"); ?>

    attached mail follows:


    On Wednesday 01 January 2003 19:24, Jean-Christian Imbeault wrote: > Tularis wrote: > > I adives to make sure the browser doesn't cache it *at all*. > > This can be done using (one, or more) of the following headers: > > > > // HTTP 1.1 compliant: > > header("Cache-Control: no-store, no-cache, must-revalidate"); > > header("Cache-Control: post-check=0, pre-check=0", false); > > // HTTP 1.0 compliant: > > header("Pragma: no-cache"); > > I'll try this out and see what I get. Though I have read that not all > browsers follow cache-control directives ...

    The cache-control directives are only supposed to be followed if the page was to be _explicitly_ reloaded or refreshed. The BACK button (as specified in the standards rfc XXXX something or another) is NOT supposed to reload or refresh a page -- it is supposed to redisplay the page from the cache. Buggy browsers like NN, IE & Mozilla etc reloads the page. Well behaved browsers like Opera redisplays from cache and hence your problem.

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

    /* It's important that people know what you stand for. It's more important that they know what you won't stand for. */

    attached mail follows:


    On Thursday 02 January 2003 01:56, David Tandberg-Johansen wrote: > [CUT] > > I am using SESSION on al my secure projects > I use a file structur as this: > (loginform) -> logincheck.php (if not ok->back2login | if ok (start an > session)(forward to the secure pages)) > > When the user logs out: > (securepages)->logout.php: > <?PHP > //go through all the session array an unregister the varname > foreach($_SESSION as $key=>$val){ > session_unregister("$key"); > } > // We destroys the session > session_destroy(); > > //if there are an cookie vith the session name we have to unset it > //so the browser doesn't hvae the information > if(isset($_COOKIE[session_name()])){ > // To delete the old cookie > unset($_COOKIE[session_name()]); > } > //we starts an new session > session_start(); > //and we destroys it again > session_destroy(); > //Now there are an new session cookie in the browser, > //and if the user try go back there are no data stored in the session > > //we forward the user to an unsecure public page > header("Location: ./unsecurepublicpage.php"); > ?>

    If you use Opera to access your application, does the BACK button allow you to see previously viewed 'secure' pages after being logged out?

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

    /* the AA battery in the wallclock sends magnetic interference */

    attached mail follows:


    Instead of doing a foreach to unset your session variables you can use session_unset(); which will unset all your session variables for you.

    Additionally if you are wanting to remove a cookie from a visitor's browser you should use setcookie, not unset $_COOKIE, $_COOKIE allows you to access the value of a cookie but not set or alter the contents of the actual cookie.

    The manual page for session_unset is http://www.php.net/manual/en/function.session-unset.php

    The manual page for setcookie is

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

    Also once you have executed session_destroy you have deleted the session information from the server, if you delete the sessionid cookie from the browser they will get a new session id the next time a session is started, there is no need to immediatly start and destroy another session.

    If you do not care if a user gets a new session id the next time they visit your site you do not necessarily have to worry about deleting the sessionid cookie as the data is already destroyed and the cookie will be deleted when they close their browser (if cookie life is 0) or when the cookie lifetime expires.

    Most if not all of this information is available from the PHP manual at http://www.php.net/manual

    Jason

    On Wed, 2003-01-01 at 10:56, David Tandberg-Johansen wrote: > [CUT] > > I am using SESSION on al my secure projects > I use a file structur as this: > (loginform) -> logincheck.php (if not ok->back2login | if ok (start an > session)(forward to the secure pages)) > > When the user logs out: > (securepages)->logout.php: > <?PHP > //go through all the session array an unregister the varname > foreach($_SESSION as $key=>$val){ > session_unregister("$key"); > } > // We destroys the session > session_destroy(); > > //if there are an cookie vith the session name we have to unset it > //so the browser doesn't hvae the information > if(isset($_COOKIE[session_name()])){ > // To delete the old cookie > unset($_COOKIE[session_name()]); > } > //we starts an new session > session_start(); > //and we destroys it again > session_destroy(); > //Now there are an new session cookie in the browser, > //and if the user try go back there are no data stored in the session > > //we forward the user to an unsecure public page > header("Location: ./unsecurepublicpage.php"); > ?> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    I have tested this with all kind of browsers on WIndows, and to make a clean cut I had to do so..

    "Jason Sheets" <jsheetsshadotech.com> wrote in message news:1041446298.288.21.cameldaemon.shadotech.biz... > Instead of doing a foreach to unset your session variables you can use > session_unset(); which will unset all your session variables for you. > > Additionally if you are wanting to remove a cookie from a visitor's > browser you should use setcookie, not unset $_COOKIE, $_COOKIE allows > you to access the value of a cookie but not set or alter the contents of > the actual cookie. > > The manual page for session_unset is > http://www.php.net/manual/en/function.session-unset.php > > The manual page for setcookie is > > http://www.php.net/manual/en/function.setcookie.php > > Also once you have executed session_destroy you have deleted the session > information from the server, if you delete the sessionid cookie from the > browser they will get a new session id the next time a session is > started, there is no need to immediatly start and destroy another > session. > > If you do not care if a user gets a new session id the next time they > visit your site you do not necessarily have to worry about deleting the > sessionid cookie as the data is already destroyed and the cookie will be > deleted when they close their browser (if cookie life is 0) or when the > cookie lifetime expires. > > Most if not all of this information is available from the PHP manual at > http://www.php.net/manual > > Jason > > On Wed, 2003-01-01 at 10:56, David Tandberg-Johansen wrote: > > [CUT] > > > > I am using SESSION on al my secure projects > > I use a file structur as this: > > (loginform) -> logincheck.php (if not ok->back2login | if ok (start an > > session)(forward to the secure pages)) > > > > When the user logs out: > > (securepages)->logout.php: > > <?PHP > > //go through all the session array an unregister the varname > > foreach($_SESSION as $key=>$val){ > > session_unregister("$key"); > > } > > // We destroys the session > > session_destroy(); > > > > //if there are an cookie vith the session name we have to unset it > > //so the browser doesn't hvae the information > > if(isset($_COOKIE[session_name()])){ > > // To delete the old cookie > > unset($_COOKIE[session_name()]); > > } > > //we starts an new session > > session_start(); > > //and we destroys it again > > session_destroy(); > > //Now there are an new session cookie in the browser, > > //and if the user try go back there are no data stored in the session > > > > //we forward the user to an unsecure public page > > header("Location: ./unsecurepublicpage.php"); > > ?> > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    You might consider using cookies that keep track of the user's login name and a bitwise status to control AAA (Authentication, Authorization, and Access0 controls instead of using session variables.

    -mel

    On Wed, 1 Jan 2003, Jean-Christian Imbeault wrote:

    > On my web site there are some areas that I want to make accessible only > after a user has logged in (for example when placing an order, etc ...) > I have been able to achieve this however I have the following problem: > > 1- user logs in > 2- user goes to restricted area > 3- user views pages, orders an item, changes his account settings, etc ... > 4- user logs out > 5- user is sent to log out page > 6- user hits back button ... > > And here my problems start ... even though the user has logged out, all > the "restricted" pages he saw are still cached by his browser and > accessible ... > > I have tried using a script that checks a session variable that > indicates if a user is logged in or not and take appropriate action at > the start of all "restricted" pages, but that doesn't work since when > the user hits the back button, the PHP script is not re-executed, the > page is simply loaded from the browser cache. > > What are some PHP techniques I could use so that a user can no longer > access/use pages once he has logged out? > > Basically I would like to have sort of state machine so I that I can > simply check where a user is coming from and his login "state" to decide > if a certain page should be presented or not (i.e. you can't get here > form there or you can't view that page with your current login status). > > But it seemed that creating a state machine is not the right way to go > about it since hitting the back button pretty much allows a user to > circumvent this ... > > Eventually the web site I will build will actually have many "areas", > each needing a separate/different login, (and you can be logged in to > multiple "areas" at once) so I would like to be able to generalize this > problem and understand how I can use PHP to implement the needed > functionality. > > Just as a simple example, once a user has placed an order, he should not > be able to go back to the "order placing/processing" pages ... > > Any tips, hints, or pointers to tutorials are appreciated! > > Thanks, > > Jc > >

    attached mail follows:


    A lot has been said on the issue already, so I'll attempt to keep mine brief.

    Cache control will help a little, but not all browsers support it. Yes, it will cause a little more traffic on your site, and yes it will "help" keep some people from clicking back, but it certainly won't FIX anything.

    Javascript can disable back buttons, but i've never used it, because a) I hate javascript b) you can't rely on javascript to be available c) i don't like forcing people to work a certain way d) there are always work-arounds

    I know it sounds simple, but try to analyse what other big sites are doing in this situation:

    - amazon.com doesn't seem to "break" when I disrupt my surfing with a login or logout... it just picks up the pieces and does what it can. last time I bought stuff there, I certainly didn't notice any caching issues, or that my back button was disabled.

    - my bank, the national bank (national.com.au) pops up the entire secure banking process in a new javascript window... essentially, this starts a new process for the user in a new window. when they log-out, the window is useless and is closed... there is NO clicking back if the window is closed :) I guess the national were concerned enough about back buttons and all that stuff to require javascript in order to use net banking... you'd have to make your own assessment of that.

    If there's a big issue with people clicking back, I'd suggest that there *may* be a problem with the logic of your site. Afterall, clicking "back" is what the web is about!! If the big sites can cope with it, I'm sure you can.

    In short my solution is that if you CAN'T live with people clicking back, then you should open the sensitive content in a new window which is auto-closed when the user logs out... this way there is no hope of clicking back. Yes it requires javascript, which means you have to think hard about ignoring a % of your users.

    Justin French

    attached mail follows:


    Justin French wrote: > > I know it sounds simple, but try to analyse what other big sites are doing > in this situation:

    That's exactly what I did, but I don't understand *how* they do it hence my question.

    I surfed some of the big sites and saw that they do not break when a user hits the back button in the middle of a "transaction" or when the user is viewing a "secure" part of a web site.

    > If there's a big issue with people clicking back, I'd suggest that > there *may* be a problem with the logic of your site. Afterall, > clicking "back" is what the web is about!! If the big sites can cope > with it, I'm sure you can.

    Exactly. It can be done, but how. What are the techniques that I can use? On amazon for example they didn't rely on javascript and it didn't seem like they had turned caching off or force and refreshes.

    From what I could tell, you could use the back button without any problems. *But* if you went back to a page and *then* clicked on something (a link, a button) then some kind of logic kicked and figured out that you where doing the same thing twice, or where doing something in an area you were not logged in to and acted accordingly.

    So I agree with you that it definitely boils down to a "logic of your site" thing.

    But what does that mean? How do I implement "logic" in my site? What are the ways to do this in PHP? What techniques do most PHP powered sites employ, what "patterns"?

    Sorry if these are "newbie" questions ... I'm programmer, and understand the PHP "language" but when it comes to site design/logic with PHP I don't really know where to start.

    Any help or pointers again very much appreciated!

    Jc

    attached mail follows:


    Jason Wong wrote: > > The cache-control directives are only supposed to be followed if the page was > to be _explicitly_ reloaded or refreshed. The BACK button (as specified in > the standards rfc XXXX something or another) is NOT supposed to reload or > refresh a page -- it is supposed to redisplay the page from the cache. Buggy > browsers like NN, IE & Mozilla etc reloads the page. Well behaved browsers > like Opera redisplays from cache and hence your problem.

    Ah ... so using cache control is *not* the way to solve my problem ...

    As Justin pointed it out I should be looking into solving this within my site "logic" then I guess ...

    Does anyone know of any good online references or even books where I could read up on on to build "logic" into my site.

    All the PHP books and references I have are great from a programming point of view but they hardly mention anything about site navigation/logic and how to implement it in PHP ...

    Thanks!

    Jc

    attached mail follows:


    The solution you choose for credit card verification depends on a number of things: - how much control you want over look & feel - whether you are rolling your own shopping cart

    I happen to use Authorize.Net, which allows you to control the entire process & maintain the look & feel you desire:

    http://www.authorize.net/

    But there are lots of other solutions. If you want to email me with more details of what you are looking for, I'd be glad to try to help.

    --
    JR
    

    > -----Original Message----- > From: Josiah Peters [mailto:halo_maniachotmail.com] > Sent: Tuesday, December 31, 2002 01:55 AM > To: php-generallists.php.net > Subject: [PHP] Shopping Cart Credit Card Verification > > > I sure hope this is the correct mailing list. I have been struggling with > this problem for quite some time. > Does anyone know a way to verify credit card information in real time with > your bank over the internet in say a shopping cart? > > Joey Peters > > _________________________________________________________________ > STOP MORE SPAM with the new MSN 8 and get 3 months FREE*. > http://join.msn.com/?page=features/junkmail&xAPID=42&PS=47575&PI=7324& DI=7474&SU= http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_stopmorespam_3m f

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

    attached mail follows:


    Has anyone successfully used BCC with mail... (on Linux with sendmail)

    If so are you using the header:

    "Bcc: My Name <myemail.com>\r\n"

    Thanks, Mike

    attached mail follows:


    On Thursday 02 January 2003 03:01, Michael J. Pawlowsky wrote: > Has anyone successfully used BCC with mail... (on Linux with sendmail) > > If so are you using the header: > > "Bcc: My Name <myemail.com>\r\n"

    For Bcc it would be pointless to include "My Name" as Bcc recipients are not displayed. Thus:

    "Bcc: myemail.com\r\n"

    would be adequate.

    If you really want to include a name with the email address then the correct format is:

    "Bcc: \"My Name\" <myemail.com>\r\n"

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

    /* "Language shapes the way we think, and determines what we can think about." -- B. L. Whorf */

    attached mail follows:


    Well something weird is going on here. Both my dev and prod machines are PHP 4.2.2 They might have some differences since they are not distributed from the same people. One RH8 the other is a network applicace called an InstaRak.

    At home on RH8 everything was fine... on the appliance I needed to remove the "\r" (was terminating all header lines with "\r\n") on the end of my header strings. Otherwise the To: mail was fine however the Bcc: mail was ignoring the headers and including them in the mail message.

    So just for archives sake... This is how it workes on an InstaRak.

    $toname = "Some Guy"; $tomail = "someguy.com";

    $subject ="My Subject."; $message .="My Message.\n\n";

    $headers = "Date: " . date("r", mktime ()) . "\n"; $headers .= "From: \"User Name\" <userabc.com>\n"; if ($_POST['cc']){ $headers .= "Bcc: user2def.com\n"; } $headers .= "Reply-To: \"User\" <userabc.com>\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "X-Mailer: MyWebMail v1.B\n"; $headers .= "Content-type: text/plain; charset=us-ascii\n"; $headers .= "X-Priority: 2\n"; $headers .= "X-MSMail-Priority: Medium\n";

    if (mail("\"$toname\" <$tomail>", $subject, $message, $headers)) { echo "<p>mail sent</p>"; }

    *********** REPLY SEPARATOR ***********

    On 02/01/2003 at 4:17 AM Jason Wong wrote:

    >On Thursday 02 January 2003 03:01, Michael J. Pawlowsky wrote: >> Has anyone successfully used BCC with mail... (on Linux with sendmail) >> >> If so are you using the header: >> >> "Bcc: My Name <myemail.com>\r\n" > >For Bcc it would be pointless to include "My Name" as Bcc recipients are >not >displayed. Thus: > > "Bcc: myemail.com\r\n" > >would be adequate. > >If you really want to include a name with the email address then the >correct >format is: > > "Bcc: \"My Name\" <myemail.com>\r\n" > >-- >Jason Wong -> Gremlins Associates -> www.gremlins.biz >Open Source Software Systems Integrators >* Web Design & Hosting * Internet & Intranet Applications Development * > >/* >"Language shapes the way we think, and determines what we can think about." >-- B. L. Whorf >*/ > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    Michael Sims wrote: >>o Changing database structure is harder. With PG, I usually found it >> easier to dump, edit, then reload the database to make changes I did >> in MySQL with ALTER TABLE. > > True, changing schema is a major PITA with Postgres. My only real > complaint about it, in fact...

    Have you installed the recent PostgreSQL version 7.3 already? This new version allows the use of ALTER TABLE much like you'd want it.

    Vincent

    attached mail follows:


    Yes it's a bug and it will be fixed for 4.3.1 and probably CVS in few days.

    --
    Regards.
    M.CHAILLAN Nicolas
    nicosphp.net
    www.WorldAKT.com Hébergement de sites internets.
    

    "Tobias Schlitt" <tobyphp.net> a écrit dans le message de news: 20030101031533.482.qmailpb1.pair.com... > Hi PHP-lovers! Happy new year! > > I just downloaded the PHP 4.3.0 binaries (Win32, zip) and saw, > that no PEAR related stuff is included... is that right or is > there a mistake in it? I thought, PEAR would be integral part > of PHP since some versions... > > Regards! > Toby > -- > <?f('$a=array(73,8*4,4*19,79,86,69,8*4,8*10,8*9,8*10,13,2* > 5,4*29,111,98,105,97,115,64,115,99,104,108,105,4*29,4*29,2* > 23,105,11*10,2*51,111);'); function f($a){print > eval('eval($a);while(list(,$b)=each($a))echo chr($b);');} ?>

    attached mail follows:


    Hi! I have to say that I'm new in PHP and I'm very glad of being part of it.

    I apologize for the questions that I am gonna make, but anyone with patience will be appreciate.

    I have a DB with 4 rows, one is the indez, the second is an hyperlink to an image and the other 2 are texts.

    I made an PHP code to receive the information of the DB:

    <?php $db = mysql_connect("localhost", user , password); mysql_select_db(efemerides,$db);

    $response = mysql_query("select * from biografias", $db); while($row = ql_fetch_array($response)){ echo("<br>");

    print($row["banner_nombre"] ."<br>\n");

    print($row["nombre"] ."<br>\n"); print($row["texto"] ."<br>\n");

    }

    I need that the hyperlink (banner_nombre) brings the hyperlink and not a text. With the code I receive the text. If anyone want to check the page, is located at www.historiadelpais.com.ar/test.php

    Thank you for your help.

    Ezequiel

    attached mail follows:


    Sorry!! This message was duplicated!

    Ezequiel

    "Ezequiel Sapoznik" <ezequielmibbva.com.ar> escribió en el mensaje news:20030101210933.31696.qmailpb1.pair.com... > Hi! I have to say that I'm new in PHP and I'm very glad of being part of it. > > I apologize for the questions that I am gonna make, but anyone with patience > will be appreciate. > > I have a DB with 4 rows, one is the indez, the second is an hyperlink to an > image and the other 2 are texts. > > I made an PHP code to receive the information of the DB: > > <?php > $db = mysql_connect("localhost", user , password); > mysql_select_db(efemerides,$db); > > $response = mysql_query("select * from biografias", $db); > while($row = > fetch_array($response)){ > echo("<br>"); > > print($row["banner_nombre"] ."<br>\n"); > > print($row["nombre"] ."<br>\n"); > > print($row["texto"] ."<br>\n"); > > } > > I need that the hyperlink (banner_nombre) brings the hyperlink and not a text. With the code I receive the text. If anyone want to check the page, is located at www.historiadelpais.com.ar/test.php > > Thank you for your help. > > Ezequiel > > >

    attached mail follows:


    On Wednesday, January 1, 2003, at 02:06 PM, Ezequiel Sapoznik wrote:

    > print($row["banner_nombre"] ."<br>\n");

    Try this:

    print "<a href=\" " . $row["banner_nombre"] . " \">"; print ($row["banner_nombre"] ."<br>\n"); print "</a>";

    Joe

    attached mail follows:


    Thanks for your help!

    I try, but if you check at http://www.historiadelpais.com.ar/test.php, you can see that I still have the link but what I need is that the php shows the jpg image.

    Thanks!

    Ezequiel

    "Joe Lomoglio" <joejlcreative.net> escribió en el mensaje news:8EEDB661-1DD0-11D7-9A94-000393AE745Ajlcreative.net... > > On Wednesday, January 1, 2003, at 02:06 PM, Ezequiel Sapoznik wrote: > > > print($row["banner_nombre"] ."<br>\n"); > > > Try this: > > print "<a href=\" " . $row["banner_nombre"] . " \">"; > print ($row["banner_nombre"] ."<br>\n"); > print "</a>"; > > Joe >

    attached mail follows:


    Ok, now I see what you are trying to do. try this instead:

    print "<img src=\" " . $row["banner_nombre"] . " \">";

    You can get rid of the [ print "<a href=\" " . $row["banner_nombre"] . " \">"; ] and the [ print "</a>"; ] code.

    This will display the image. I misunderstood before and thought you wanted the link to go to a page. But for displaying an image. The above code should do the trick.

    Joe

    On Wednesday, January 1, 2003, at 03:10 PM, Ezequiel Sapoznik wrote:

    > Thanks for your help! > > I try, but if you check at http://www.historiadelpais.com.ar/test.php, > you > can see that I still have the link but what I need is that the php > shows the > jpg image. > > Thanks! > > Ezequiel > > > "Joe Lomoglio" <joejlcreative.net> escribió en el mensaje > news:8EEDB661-1DD0-11D7-9A94-000393AE745Ajlcreative.net... >> >> On Wednesday, January 1, 2003, at 02:06 PM, Ezequiel Sapoznik wrote: >> >>> print($row["banner_nombre"] ."<br>\n"); >> >> >> Try this: >> >> print "<a href=\" " . $row["banner_nombre"] . " \">"; >> print ($row["banner_nombre"] ."<br>\n"); >> print "</a>"; >> >> Joe >> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    Hi! I have to say that I'm new in PHP and I'm very glad of being part of it.

    I apologize for the questions that I am gonna make, but anyone with patience will be appreciate.

    I have a DB with 4 rows, one is the indez, the second is an hyperlink to an image and the other 2 are texts.

    I made an PHP code to receive the information of the DB:

    <?php $db = mysql_connect("localhost", user , password); mysql_select_db(efemerides,$db);

    $response = mysql_query("select * from biografias", $db); while($row = ql_fetch_array($response)){ echo("<br>");

    print($row["banner_nombre"] ."<br>\n");

    print($row["nombre"] ."<br>\n"); print($row["texto"] ."<br>\n");

    }

    I need that the hyperlink (banner_nombre) brings the hyperlink and not a text. With the code I receive the text. If anyone want to check the page, is located at www.historiadelpais.com.ar/test.php

    Thank you for your help.

    Ezequiel

    attached mail follows:


    Is there a free php accelerator out there which runs under Apache 2?

    -- 
    Jochen Kaechelin 
    jklinux.amsjk.de
    

    attached mail follows:


    Acceleration in what sense .. caching or memory kept precompiled code??

    Timothy Hitchens (HiTCHO) timhitcho.com.au

    HiTCHO | Open Platform Web Development Consulting - Outsourcing - Training - Support

    ----- Original Message ----- From: "Jochen Kaechelin" <jklinux.amsjk.de> To: <php-generallists.php.net> Sent: Thursday, January 02, 2003 7:26 AM Subject: [PHP] accelerator and Apache 2

    > Is there a free php accelerator out there which runs under Apache 2? > > -- > Jochen Kaechelin > jklinux.amsjk.de > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    i need to get in a select box all the dirs inside a folder.. how can i do that?

    attached mail follows:


    http://www.php.net/manual/en/ref.dir.php http://www.php.net/manual/en/function.is-dir.php

    Alexander Guevara wrote: > i need to get in a select box all the dirs inside a folder.. how can i do > that? > > > >

    -- 
    By-Tor.com
    It's all about the Rush
    http://www.by-tor.com
    

    attached mail follows:


    on 02/01/03 9:36 AM, Alexander Guevara (alexanderguevarahotmail.com) wrote:

    > i need to get in a select box all the dirs inside a folder.. how can i do > that?

    Give this a whirl. Please note, this code is very much slapped together... it works, and i've tested it, but there's nearly ZERO error checking.

    <? // a function for your library function getFilesInDir($thedir) { chdir($thedir); $dir = opendir('.'); while (($myfile = readdir($dir)) !==false) { if ($myfile != '.' && $myfile != '..' && is_file($myfile) ) { $files[] = $myfile; } } closedir($dir); chdir('../'); return $files; } // get the files in an array $files = getFilesInDir('../preshrunk/inc/');

    // spit out a select box echo "<form><select name='files'>"; foreach($files as $key => $value) { echo "<option value='{$value}'>{$value}</option>"; } echo "</select></form>"; ?>

    Cheers,

    Justin

    attached mail follows:


    THX "John Nichel" <jnichelby-tor.com> wrote in message news:3E136F87.8020804by-tor.com... > http://www.php.net/manual/en/ref.dir.php > http://www.php.net/manual/en/function.is-dir.php > > > Alexander Guevara wrote: > > i need to get in a select box all the dirs inside a folder.. how can i do > > that? > > > > > > > > > > > -- > By-Tor.com > It's all about the Rush > http://www.by-tor.com >

    attached mail follows:


    Happy New Year everyone!

    Is the PHP mail() command robust enough to use in a little mailing list app? The app will basically send an HTML or Text e-mail to the member database of about 6,000 people. I'm using RedHat Linux 7.2 with PHP 4.2.2, by the way. I'm concerned I'll bog down my server if I issue the mail() command 6,000 times on our server, but, maybe it won't be a problem?

    Also, although I'm sending HTML e-mail, I'm not including attachments or inline graphics (only direct hotlinks to graphics on a web server). Will mail() still work okay for this, or do I need to use one of the various PHP e-mail classes available to send HTML e-mail?

    Any recommendations for online tutorials about building a mailing list manager using PHP would be much appreciated!

    Thanks!

    Monty

    attached mail follows:


    Check the archives... mail() tends to "break" pretty quickly... sometimes on less than 100 personalised emails... The issue ISN'T mail() itself, but things like server timeouts, script timeouts, etc etc. The issue also isn't really HTML mail, but more the fact that each email has to be sent to the mail que, and this is a slow-ish process, so the script timesout.

    So another option is Bcc'ing the email to everyone in a non-personalised manner... you can squeeze a lot more emails out of mail() before the script times out, but you will run into other issues like:

    a) Bcc'd mails of more than 100 recipients can't be sent on most shared hosts, because it looks like spam -- check with your ISP b) some mail programs and servers treat mass Bcc emails as spam, I hear

    At the moment, I've only got mailing lists that deals with 50-300 people, so I'm just Bcc'ing them in batches of 20 people... a trade off between lots of emails to timeout the script, and lots of people in the Bcc list.

    I think for 6000 though, you will really need to look at a class like Manuel's at PHPclasses.org (I think called mimeMail) which has various work-arounds, none of which I've tried.

    Cheers,

    Justin

    on 02/01/03 9:46 AM, Monty (monty3hotmail.com) wrote:

    > Happy New Year everyone! > > Is the PHP mail() command robust enough to use in a little mailing list app? > The app will basically send an HTML or Text e-mail to the member database of > about 6,000 people. I'm using RedHat Linux 7.2 with PHP 4.2.2, by the way. > I'm concerned I'll bog down my server if I issue the mail() command 6,000 > times on our server, but, maybe it won't be a problem? > > Also, although I'm sending HTML e-mail, I'm not including attachments or > inline graphics (only direct hotlinks to graphics on a web server). Will > mail() still work okay for this, or do I need to use one of the various PHP > e-mail classes available to send HTML e-mail? > > Any recommendations for online tutorials about building a mailing list > manager using PHP would be much appreciated! > > Thanks! > > Monty > > > >

    attached mail follows:


    Personally I simply get the e-mail addresses spit out to me from the database and then I input them into a application made just for bulk mailingt. You can also easily write a quick perl or shell script to send it out from a file of names and this way you can "nice" the process so as not to bog down the machine.

    *********** REPLY SEPARATOR ***********

    On 02/01/2003 at 9:58 AM Justin French wrote:

    >Check the archives... mail() tends to "break" pretty quickly... sometimes >on >less than 100 personalised emails... The issue ISN'T mail() itself, but >things like server timeouts, script timeouts, etc etc. The issue also >isn't >really HTML mail, but more the fact that each email has to be sent to the >mail que, and this is a slow-ish process, so the script timesout. > >So another option is Bcc'ing the email to everyone in a non-personalised >manner... you can squeeze a lot more emails out of mail() before the script >times out, but you will run into other issues like: > >a) Bcc'd mails of more than 100 recipients can't be sent on most shared >hosts, because it looks like spam -- check with your ISP >b) some mail programs and servers treat mass Bcc emails as spam, I hear > > >At the moment, I've only got mailing lists that deals with 50-300 people, >so >I'm just Bcc'ing them in batches of 20 people... a trade off between lots >of >emails to timeout the script, and lots of people in the Bcc list. > > >I think for 6000 though, you will really need to look at a class like >Manuel's at PHPclasses.org (I think called mimeMail) which has various >work-arounds, none of which I've tried. > > > >Cheers, > >Justin > > > > >on 02/01/03 9:46 AM, Monty (monty3hotmail.com) wrote: > >> Happy New Year everyone! >> >> Is the PHP mail() command robust enough to use in a little mailing list >app? >> The app will basically send an HTML or Text e-mail to the member >database of >> about 6,000 people. I'm using RedHat Linux 7.2 with PHP 4.2.2, by the >way. >> I'm concerned I'll bog down my server if I issue the mail() command 6,000 >> times on our server, but, maybe it won't be a problem? >> >> Also, although I'm sending HTML e-mail, I'm not including attachments or >> inline graphics (only direct hotlinks to graphics on a web server). Will >> mail() still work okay for this, or do I need to use one of the various >PHP >> e-mail classes available to send HTML e-mail? >> >> Any recommendations for online tutorials about building a mailing list >> manager using PHP would be much appreciated! >> >> Thanks! >> >> Monty >> >> >> >> > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    I've got a newsletter that's now reached 5000 and continues to grow. I use PHP's mail() function, personalized with unsubscribe info and first names and it works just fine. I just set the timeout to 5 minutes, but it's never yet even taken 1 minute to complete.

    Works fine.

    Mike

    "Monty" <monty3hotmail.com> wrote in message news:BA38DA09.16F98%monty3hotmail.com... > Happy New Year everyone! > > Is the PHP mail() command robust enough to use in a little mailing list app? > The app will basically send an HTML or Text e-mail to the member database of > about 6,000 people. I'm using RedHat Linux 7.2 with PHP 4.2.2, by the way. > I'm concerned I'll bog down my server if I issue the mail() command 6,000 > times on our server, but, maybe it won't be a problem? > > Also, although I'm sending HTML e-mail, I'm not including attachments or > inline graphics (only direct hotlinks to graphics on a web server). Will > mail() still work okay for this, or do I need to use one of the various PHP > e-mail classes available to send HTML e-mail? > > Any recommendations for online tutorials about building a mailing list > manager using PHP would be much appreciated! > > Thanks! > > Monty > > > >

    attached mail follows:


    Hi, I am new to the list so be kind. I have been messing with PHP 4 on a windows 2000 machine using apache and am having trouble getting sessions to run. Even in their basic form, everything I have read is very involved and all I am trying to do is the basics but it doesn't work. Can any one give me any hints. I have been through a tutorial and these are the basic scripts. session_register_var.php <? // set up a session session_start(); // declare a variable and give it a value $my_favourite_colour="blue"; // register the variable to the session session_register("my_favourite_colour"); // show a hyperlink to get to the next page echo "<A HREF='show_session_var.php'>Click here to go to the next page</A>"; ?> and show_session_var.php <? // continue using the session session_start(); // show the variable's value echo "My favourite colour is ... ".$my_favourite_colour; ?> My php.ini file session section looks like this [Session] ; Handler used to store/retrieve data. session.save_handler = files ; Argument passed to save_handler. In the case of files, this is the path ; where data files are stored. Note: Windows users have to change this ; variable in order to use PHP's session functions. session.save_path = c:/temp ; Whether to use cookies. session.use_cookies = 1

    ; Name of the session (used as cookie name). session.name = PHPSESSID ; Initialize session on request startup. session.auto_start = 0 ; Lifetime in seconds of cookie or, if 0, until browser is restarted. session.cookie_lifetime = 0 ; The path for which the cookie is valid. session.cookie_path = c:\tmp ; The domain for which the cookie is valid. session.cookie_domain = ; Handler used to serialize data. php is the standard serializer of PHP. session.serialize_handler = php ; Percentual probability that the 'garbage collection' process is started ; on every session initialization. session.gc_probability = 1 ; After this number of seconds, stored data will be seen as 'garbage' and ; cleaned up by the garbage collection process. session.gc_maxlifetime = 1440 ; Check HTTP Referer to invalidate externally stored URLs containing ids. ; HTTP_REFERER has to contain this substring for the session to be ; considered as valid. session.referer_check = ; How many bytes to read from the file. session.entropy_length = 0 ; Specified here to create the session id. session.entropy_file = ;session.entropy_length = 16 ;session.entropy_file = /dev/urandom ; Set to {nocache,private,public} to determine HTTP caching aspects. session.cache_limiter = nocache ; Document expires after n minutes. session.cache_expire = 180 ; trans sid support is disabled by default. ; Use of trans sid may risk your users security. ; Use this option with caution. ; - User may send URL contains active session ID ; to other person via. email/irc/etc. ; - URL that contains active session ID may be stored ; in publically accessible computer. ; - User may access your site with the same session ID ; always using URL stored in browser's history or bookmarks. session.use_trans_sid = 0 url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"

    Andrew Williams Sales Engineer people telecom

    Contacts: mailto:andrew.williamspeopletelecom.com.au <mailto:andrew.williamspeopletelecom.com.au> Direct Tel: (02) 9458 5861 Mobile: 0403 479 990 Reception: (02) 9458 5888 Facsimile: (02) 9458 5858 Customer Service: 1300 55 88 88 www.peopletelecom.com.au

    talk to people

    This e-mail and any attachments are confidential and may contain copyright material of people telecom Ltd or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. people telecom Ltd does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of people telecom Ltd.

    attached mail follows:


    on 02/01/03 9:46 AM, Andrew Williams (andrew.williamspeopletelecom.com.au) wrote:

    > I have been messing with PHP 4 on a windows 2000 machine using apache and am > having trouble getting sessions to run.

    I'm going to assume PHP > 4.1 ???? I'm also going to assume you're allowing cookies on your browser???

    > session_register_var.php

    change your script to:

    <? // set up a session session_start();

    // register the variable to the session $_SESSION['my_favourite_colour'] = "blue";

    // show a hyperlink to get to the next page echo "<A HREF='show_session_var.php'>Click here to go to the next page</A>"; ?>

    > and > show_session_var.php

    change this script to:

    <? // continue using the session session_start();

    // show the variable's value echo "My favourite colour is... ".$_SESSION['my_favourite_colour']; ?>

    lemme know how you go

    Justin French

    attached mail follows:


    Hi, Justin has made some suggestions below. But it still doesn't work, I have noticed that in the c:/temp directory session files have been created. Does anyone have any other suggestions as to why this is not working Apache is version Apache/2.0.39 (Win32) Internet explorer 6.0.2800.1106 Andrew >Try this code: >test.php >--- ><? >session_start(); >if (!isset($_SESSION['count'])) { >$_SESSION['count'] = 0; >} else { >$_SESSION['count']++; >} >?> >Hello visitor, you have seen this page <?=$_SESSION['count']?> times.<p> >To continue, <A HREF="<?=$_SERVER['PHP_SELF']?>">click here</A> >--- >Each time you click "click here", the counter should increase by 1. This >code is lifted straight from the manual, and I've tested it on my machine. Tried this no banana! > Does your browser accept cookies? Privacy settings set to Medium, allowed IP address of machine to except all cookies > I'm going to assume PHP > 4.1 ???? PHP 4.2.2 >I'm also going to assume you're allowing cookies on your browser??? Allowed > session_register_var.php >change your script to: ><? >// set up a session >session_start(); >// register the variable to the session >$_SESSION['my_favourite_colour'] = "blue"; >// show a hyperlink to get to the next page >echo "<A HREF='show_session_var.php'>Click here to go to the next page</A>"; >?> > and > show_session_var.php >change this script to: ><? >// continue using the session >session_start(); >// show the variable's value >echo "My favourite colour is... ".$_SESSION['my_favourite_colour']; >?>

    Changed all of this still not happy.

    Thanks

    Andrew

    Andrew Williams Sales Engineer people telecom

    Contacts: mailto:andrew.williamspeopletelecom.com.au <mailto:andrew.williamspeopletelecom.com.au> Direct Tel: (02) 9458 5861 Mobile: 0403 479 990 Reception: (02) 9458 5888 Facsimile: (02) 9458 5858 Customer Service: 1300 55 88 88 www.peopletelecom.com.au

    talk to people

    This e-mail and any attachments are confidential and may contain copyright material of people telecom Ltd or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. people telecom Ltd does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of people telecom Ltd.

    attached mail follows:


    You don't need to accept cookies for sessions. That's the beauty of it. PHP automatically appends ?PHPSESSID=$sessid to URLs.

    If you do header("Location: abc") however you will need to add the seession ID to the URL.

    You cannot read a session var on the same page that you set it I found.

    To get around this I personally register the sessions vars and also set $_SESSION['whatever'] = 1; That way the next time I call the function I can still look for it under the same name.

    I use a auth.php include file on eachprotected page. It basically looks to see if you have a session... if not asks you to log in and creates the session for you. If you have a session it just skips all the checking.

    You will have to tweak this... especiallu since I use my own class for db stuff... but here it is... enjoy.

    session_start(); $sessid = session_id(); // DEBUGGING $debug=false;

    if(!(session_is_registered("mysession"))){ // Are we coming from the form? if (isset($authaction) && $authaction == 1 ) { require_once("/lib/util.php"); // Lets clean up the email var $email = strtolower(trim($_POST['email']));

    // Create an SQL object $sql = new MySQL_class; $sql->Create("rconline_ca");

    // Let see if we have this person as a registered user $sql->QueryRow("Select unum, pw, cur_member, pref_lang from user where lower(email) like '$email'"); if ($sql->rows == 0) { ErrorMsg("Incorrect e-mail or password."); exit(); }

    // Compare passwords $row = $sql->data; if (strcmp($_POST['pw'], $row['pw']) != 0 ) { ErrorMsg("Incorrect e-mail or password."); exit(); } // Everything matches up lets register our vars $mysession = array ("unum" => $row['unum'], "email" => "$email", "lang" => $row['pref_lang']); setcookie ("email", "", time() - 7776000, "/", ".rconline.ca", 0); setcookie ("email", "$email", time() + 7776000, "/", ".rconline.ca", 0); session_register("mysession"); $_SESSION['mysession']['unum'] = $row['unum'];

    // update there last login $sql->Update("UPDATE user SET last_login = now() WHERE unum = " . $row['unum']); } else { if (isset($HTTP_COOKIE_VARS['email'])){ $email = $HTTP_COOKIE_VARS['email']; } else { $email =""; } echo "<HTML>\n"; echo "<HEAD>\n"; echo "<TITLE>$tags[title]</TITLE>\n"; echo "$tags[style]\n"; echo "</HEAD>\n\n"; echo "$tags[body]\n\n";

    echo "<center>\n"; echo "<form method=\"POST\" action=\"$_SERVER[REQUEST_URI]\">\n\n"; echo "<table border=\"0\" align=\"center\" width=\"100%\">\n"; echo "<tr><td align=\"center\" valign=\"middle\" width=\"100%\" height=\"100%\">\n"; echo "<table border=\"0\" align=\"center\">\n";

    echo "<tr><td colspan=\"2\" align=\"center\">\n<h3>Please log in to use this feature.<br>"; echo "<i>Seuls les membres authentifiés peuvent continuer.</i></h3><br /></td></tr>\n"; echo "<tr><td align=\"center\">"; // Start of inner table echo "<table border=\"0\">"; echo "<tr>\n\n"; echo "<td valign=\"bottom\"> E-Mail: <br><i>Courriel:</i></td><td valign=\"bottom\"><input type=\"TEXT\" name=\"email\" size=\"32\" value=\""; echo $email; echo "\"></td>\n"; echo "</tr><tr>\n"; echo "<td valign=\"bottom\">Password: <br><i>Mot-de-passe:</i></td><td valign=\"bottom\"><input type=\"password\" name=\"pw\">"; echo "</td></tr>\n"; echo "<tr><td colspan=\"2\" align=\"center\">\n"; echo "<input type=\"hidden\" name=\"authaction\" value=\"1\">\n"; echo "<input type=\"submit\" value=\"Login\">"; echo "</td></tr></table>"; // End of innner table echo "</td></tr><tr><td>"; echo "&nbsp;"; echo "</td></tr><tr><td>"; echo "<p>If you are not a registered user please go to our \n <a href=\"/reg/member_reg.php\">registration page</a>.<br>\n"; echo "Please note, you do not have to be a club member to register for the site.</p>\n"; // echo "<p>Si vous n'etes pas \n <a href=\"/reg/member_reg.php\">registration page</a>.<br>\n"; // echo "Please note, you do not have to be a club member to register for the site.</p>\n"; echo "<p>If you forgot your password <a href=\"/lostpw.php\">click here</a> to retrieve it.</p>\n"; echo "</td></tr>\n"; echo "</table>\n"; echo "</form>";

    echo "</td></tr></table>"; echo "</center>\n"; echo "</BODY>\n"; echo "</HTML>\n"; if($debug) { echo "<pre>\n\n\n"; print_r($_SESSION); echo "</pre>\n"; } exit(); } } ?>

    *********** REPLY SEPARATOR ***********

    On 02/01/2003 at 11:14 AM Andrew Williams wrote:

    >Hi, > >Justin has made some suggestions below. > >But it still doesn't work, I have noticed that in the c:/temp directory >session files have been created. > >Does anyone have any other suggestions as to why this is not working > >Apache is version Apache/2.0.39 (Win32) >Internet explorer 6.0.2800.1106 > >Andrew > > > >>Try this code: >>test.php >>--- >><? >>session_start(); >>if (!isset($_SESSION['count'])) { >>$_SESSION['count'] = 0; >>} else { >>$_SESSION['count']++; >>} >>?> >>Hello visitor, you have seen this page <?=$_SESSION['count']?> times.<p> >>To continue, <A HREF="<?=$_SERVER['PHP_SELF']?>">click here</A> >>--- >>Each time you click "click here", the counter should increase by 1. This >>code is lifted straight from the manual, and I've tested it on my machine. > >Tried this no banana! > > >> Does your browser accept cookies? >Privacy settings set to Medium, allowed IP address of machine to except all >cookies > >> I'm going to assume PHP > 4.1 ???? >PHP 4.2.2 >>I'm also going to assume you're allowing cookies on your browser??? >Allowed > >> session_register_var.php >>change your script to: >><? >>// set up a session >>session_start(); >>// register the variable to the session >>$_SESSION['my_favourite_colour'] = "blue"; >>// show a hyperlink to get to the next page >>echo "<A HREF='show_session_var.php'>Click here to go to the next >page</A>"; >>?> > >> and >> show_session_var.php >>change this script to: >><? >>// continue using the session >>session_start(); >>// show the variable's value >>echo "My favourite colour is... ".$_SESSION['my_favourite_colour']; >>?> > >Changed all of this still not happy. > > > >Thanks > > > >Andrew > >Andrew Williams >Sales Engineer >people telecom > >Contacts: >mailto:andrew.williamspeopletelecom.com.au ><mailto:andrew.williamspeopletelecom.com.au> >Direct Tel: (02) 9458 5861 >Mobile: 0403 479 990 >Reception: (02) 9458 5888 >Facsimile: (02) 9458 5858 >Customer Service: 1300 55 88 88 >www.peopletelecom.com.au > >talk to people > > > >This e-mail and any attachments are confidential and may contain copyright >material of people telecom Ltd or third parties. If you are not the >intended >recipient of this email you should not read, print, re-transmit, store or >act in reliance on this e-mail or any attachments, and should destroy all >copies of them. people telecom Ltd does not guarantee the integrity of any >emails or any attached files. The views or opinions expressed are the >author's own and may not reflect the views or opinions of people telecom >Ltd.

    attached mail follows:


    on 02/01/03 11:42 AM, Michael J. Pawlowsky (mikejpvideotron.ca) wrote:

    > You don't need to accept cookies for sessions. That's the beauty of it. > PHP automatically appends ?PHPSESSID=$sessid to URLs.

    only if you compile with trans_sid (he didn't) or if you physically add the SID to each LINK (which he hasn't so far).

    > You will have to tweak this... especiallu since I use my own class for db > stuff... but here it is... enjoy.

    eeek, that's a whole lotta code for him to learn just to try and get sessions working, don't you think??

    [mega snip]

    Justin

    attached mail follows:


    > >eeek, that's a whole lotta code for him to learn just to try and get >sessions working, don't you think?? > >[mega snip] > >Justin

    Most it is HTML output... But If I'm not mistaken... and I might be... but wasn't this a thread that started about securing web pages? So basically I gave him my solution to it. And I didn't charge the $150/hr consulting fee! :-)

    . Cheers and HAPPY NEW YEAR! Mike

    attached mail follows:


    > My php.ini file session section looks like this

    [snip]

    > ; The path for which the cookie is valid. > session.cookie_path = c:\tmp

    On our system, this is /... This is not what you think it is-- this is the WEB path the cookie is valid for... That is, on our system, the browser will send the cookie for all pages under / (IE everything). If you only want the cookie sent back for pages under, say, /secure_directory, you would set this accordingly...

    It could be PHP is sending the cookie, but your browser isn't sending it back because your "view" page isn't in the right directory from the browser's point of view...

    Just a thought, hope it helps...

    -Matt Sturtz-

    attached mail follows:


    on 02/01/03 11:55 AM, Michael J. Pawlowsky (mikejpvideotron.ca) wrote:

    > Most it is HTML output... But If I'm not mistaken... and I might be... but > wasn't this a thread that started about securing web pages? > So basically I gave him my solution to it. And I didn't charge the $150/hr > consulting fee! :-)

    Wrong thread I think :)

    "securing areas of a site with PHP" was the other thread.

    Justin

    attached mail follows:


    OK let me give him something simpler to start with.... No Cookies needed.. Just to test... Make sure you have session.name set to PHPSESSID. Look at phpinfo() output to make sure.

    Lets have two pages....

    Page 1 start (page1.php)

    ___________________________________________________________________

    <?php

    session_start(); $sessid = session_id();

    $theSess = "This is my session";

    session_register("theSess");

    echo "<a href=\"page2.php?PHPSESSID=$sessid\"> Next Page <a>";

    ?>

    ------------------------------------------------------------------------------------------- Page 1 END

    Page 2 start (page2.php) ___________________________________________________________________

    <?php

    session_start();

    print_r($_SESSION);

    ?>

    attached mail follows:


    Just so I know.... who started this thread, is he even still in this thread, or is this just amongst ourselves now.

    :-)

    Hey sorry, what do you expect on the 1st of January.

    Cheers, Mike

    attached mail follows:


    I started it and yes I am still here and listing to your comments.

    Thanks Justin for keeping things simple for this simpleton.

    Ill try your suggestion in a little while Mike, I also at work at the moment and need to slip some of this stuff in whilst I am working.

    I will keep you posted as to the outcome.

    By the way its the 2nd of January here!

    Andrew

    Just so I know.... who started this thread, is he even still in this thread, or is this just amongst ourselves now.

    :-)

    Hey sorry, what do you expect on the 1st of January.

    Cheers, Mike

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

    attached mail follows:


    Mike,

    This the result

    Array ( [theSess] => This is my session )

    Andrew

    -----Original Message----- From: Michael J. Pawlowsky [mailto:mikejpvideotron.ca] Sent: Thursday, 2 January 2003 12:07 To: php-generallists.php.net Subject: Re: [PHP] Session Problem

    OK let me give him something simpler to start with.... No Cookies needed.. Just to test... Make sure you have session.name set to PHPSESSID. Look at phpinfo() output to make sure.

    Lets have two pages....

    Page 1 start (page1.php)

    ___________________________________________________________________

    <?php

    session_start(); $sessid = session_id();

    $theSess = "This is my session";

    session_register("theSess");

    echo "<a href=\"page2.php?PHPSESSID=$sessid\"> Next Page <a>";

    ?>

    ---------------------------------------------------------------------------- --------------- Page 1 END

    Page 2 start (page2.php) ___________________________________________________________________

    <?php

    session_start();

    print_r($_SESSION);

    ?>

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

    attached mail follows:


    OK so sessions are working... cool...

    So now you need to track down a your cookie problem.

    Start of by setting your browser to ask you to accept all cookies. EVEN session cookies. In IE it would be Internet Options->Privacy Tab Advanced... Prompt and override defaults...

    The take away the ?PHPSESSID=$sessid from the a href in page1.

    Post the cookie details here.

    *********** REPLY SEPARATOR ***********

    On 02/01/2003 at 12:32 PM Andrew Williams wrote:

    >Mike, > >This the result > >Array ( [theSess] => This is my session ) > >Andrew > >

    attached mail follows:


    Mike,

    results are

    Array ( )

    Andrew

    *********** REPLY SEPARATOR ***********

    OK so sessions are working... cool...

    So now you need to track down a your cookie problem.

    Start of by setting your browser to ask you to accept all cookies. EVEN session cookies. In IE it would be Internet Options->Privacy Tab Advanced... Prompt and override defaults...

    The take away the ?PHPSESSID=$sessid from the a href in page1.

    Post the cookie details here.

    *********** REPLY SEPARATOR ***********

    On 02/01/2003 at 12:32 PM Andrew Williams wrote:

    >Mike, > >This the result > >Array ( [theSess] => This is my session ) > >Andrew > >

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

    attached mail follows:


    OK But did your browser ask you if it was ok to set a cookie? (You did do the changes in privacy)

    IE or Netsape (what version)?

    Start with a fresh browser.. meaning close all browser windows and the start up your browser again.

    We need to see if the problem is setting the cookie or reading it.

    Mike

    *********** REPLY SEPARATOR ***********

    On 02/01/2003 at 12:56 PM Andrew Williams wrote:

    >Mike, > > results are > >Array ( ) > >Andrew >

    attached mail follows:


    It appears that it is a problem with the Browser, I did as you suggested and changed the Privacy Settings Advanced to Override Automatic Cookie Handling and selected Prompt for both First and third party cookies.

    Restarted the browser ie closed all browser windows and restarted IE 6 version 6.0.2800.1106, Cipher strength 128bit.

    I get no prompt to se the cookie.

    Session files are still being created in the temp directory.

    Andrew

    *********** REPLY SEPARATOR *********** OK But did your browser ask you if it was ok to set a cookie? (You did do the changes in privacy)

    IE or Netsape (what version)?

    Start with a fresh browser.. meaning close all browser windows and the start up your browser again.

    We need to see if the problem is setting the cookie or reading it.

    Mike

    *********** REPLY SEPARATOR ***********

    On 02/01/2003 at 12:56 PM Andrew Williams wrote:

    >Mike, > > results are > >Array ( ) > >Andrew >

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

    attached mail follows:


    Hello--

    We run several web servers (PHP 4.2.2, Apache 1.3.27 on RedHat 6.2/i386) behind a load balancer... All the servers have their session.save_path set to an NFS-mounted directory.

    It seems that session files are removed by the GC 1 hour (session.gc_maxlifetime = 3600) after being created, instead of one hour after being updated, even though they're being changed on every click... I can't explain why, but the problem goes away if I touch the session file every 60 seconds.

    Is there a known issue with using NFS for session files?

    Thanks,

    -Matt Sturtz-

    attached mail follows:


    Hi,

    I try to do a function called unicode_enc() which takes a number of parameters that differ between calls. It should encode all parameters to unicode using utf8_encode($arglist[$i]). I am using Variable-length argument lists as described in the manual and tried to call the function this way: unicode_enc(&$text); but to no success.

    Is call-by-reference possible when using func_get_args?

    TIA, Ata

    attached mail follows:


    After compiling php 4.3 configured as follows:

    # ./configure --with-java --with-pdflib=/usr/local --with-gd --with-ttf --enable-trans-sid --with-curl --with-openssl --enable-sysvsem --enable-sysvshm --with-zlib --with-mysql=/usr/local/mysql --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-gettext --with-imap --with-imap-ssl --with-ldap --with-kerberos --enable-ftp --with-iodbc=/usr --with-oci8 --with-imagick --enable-xslt --with-xslt-sablot=/usr/local --with-expat-dir=/usr

    The new 'make test' routine fails several of the XSLT test. I've pasted all the XSLT test results below - note that many are failures.

    Is this expected behavior? If not, can anyone provide hints as to what might be the problem? Some of these tests seem to point to non-existent functions (xslt_set_object) so perhaps these tests are irrelevant?

    Thanks

    PASS Pass long string to 'file' argument, bug #17791 [ext/xslt/tests/bug17791.phpt] PASS Pass object for xslt_error_handler, bug #17931 [ext/xslt/tests/bug17931.phpt] FAIL Relative and absolute arg handling [ext/xslt/tests/bug20177.phpt] FAIL Don't override xslt_set_base (bug #20518) [ext/xslt/tests/bug20518.phpt] PASS Memoryleak in error printing [ext/xslt/tests/xslt-001.phpt] PASS Check for xslt presence [ext/xslt/tests/xslt.phpt] PASS xslt_backend_info: examples for detection of backend features [ext/xslt/tests/xslt_backend_info.phpt] PASS xslt_getopt function [ext/xslt/tests/xslt_getopt.phpt] FAIL Various ways to provide xml and xslt arguments and params [ext/xslt/tests/xslt_process-001.phpt] FAIL Crash xslt_process with reused handler (this test may take a while) [ext/xslt/tests/xslt_process-002.phpt] FAIL xslt_set_object function [ext/xslt/tests/xslt_set_object.phpt] FAIL Set a non-existing scheme handler [ext/xslt/tests/xslt_set_scheme_handlers-001.phpt] FAIL Override Sablotron file handler [ext/xslt/tests/xslt_set_scheme_handlers-002.phpt] FAIL Core dump when returning FALSE in a handler [ext/xslt/tests/xslt_set_scheme_handlers-003.phpt] FAIL xslt_setopt function and public entities [ext/xslt/tests/xslt_setopt.phpt]

    attached mail follows:


    Following the instructions on www.php.net/manual/en/ref.pfpro.php: " Copy the header file pfpro.h to /usr/local/include and the library file libpfpro.so to /usr/local/lib. AND These functions are only available if PHP has been compiled with the --with-pfpro[=DIR] option. "

    So I: # ./configure --with-pfpro=/usr/local

    If barfs:

    checking for Verisign Payflow Pro support... yes checking for pfproInit in -lpfpro... no checking for PNInit in -lpfpro... no configure: error: The pfpro extension requires version 2 or 3 of the SDK

    I'm using the FreeBSD SDK. The # perl Makefile.PL Warning: -L./lib changed to -L/Users/sams/freebsd/perl/./lib Warning: -L. changed to -L/Users/sam/freebsd/perl/. Note (probably harmless): No library found for -lpfpro Note (probably harmless): No library found for -lMSVCRT Writing Makefile for PFProAPI

    make and then finally it all goes very badly at:

    [ns:/freebsd/perl] root# make test PERL_DL_NONLAZY=1 LD_LIBRARY_PATH= /usr/bin/perl -Iblib/arch -Iblib/lib -I/System/Library/Perl/darwin -I/System/Library/Perl test.pl 1..2 dyld: /usr/bin/perl Undefined symbols: blah...blah

    Endlessly searching google turns up something about OS X doesn't do XSUBS or dynamic library something or other.

    Has anyone survived this? Any tips?

    Thanks, Sam

    attached mail follows:


    I have a function (a preg_replace) to modify a PHP or HTML page with a few things. Right now, the only way I can do this flawlessly is with a wrapper page:

    I have a page, called disp.php, that takes a file variable. When you type in disp.php?file=index.php, it loads the file with file_get_contents and uses preg_replace to replace the SQL queries (which is what I'm trying to do) and all of the relative links (i.e. /dir/page.php -> disp.php?file="/dir/page.php").

    I thought that there might be an easier way to do this using the prepend and append directives in php.ini. Here's what I can do:

    <!-- top.inc --> <? $contents = <<<EOD ?>

    <!-- bottom.inc --> <? EOD; echo eval(preg_replace("Hello","Goodbye",$contents)); ?>

    <!-- wraptest.php --> <? include("top.inc"); ?> <html> <body> Hello! <? $string="you"; echo "<br>How are $string today?"; ?> </body> </html> <? include("bottom.inc"); ?>

    The script seems to work perfectly (it displays "Goodbye!", and on the next line, "How are you today?"), except it says there's a parse error on the last line of front.inc! Since the script works otherwise, is there any way to suppress the error? Will this method work with top.inc and bottom.inc in the auto_prepend_file and auto_append_file directives instead of at the top and bottom of the page? I won't have access to a php.ini file for a week, so I can't truly test it, but the documentation said that those directives work like include statements.

    Thanks for the help!

    -Enu

    attached mail follows:


    i am now facing a problem in multiple select. This is my example code in html. <select name="destList" MULTIPLE size="6"> <option value=4>123</option> <option value=5>234</option> <option value=6>345</option> </select> i select all the value and pass to php...it should be a array. but when i display the destList value, it just show the "6" the last value... where goes wrong?

    Elaine Kwek

    attached mail follows:


    What about if you use this instead:

    <select name="destList[]" MULTIPLE size="6">

    HTH, Jason k Larson

    Elaine Kwek wrote: > i am now facing a problem in multiple select. > This is my example code in html. > <select name="destList" MULTIPLE size="6"> > <option value=4>123</option> > <option value=5>234</option> > <option value=6>345</option> > </select> > i select all the value and pass to php...it should be a array. > but when i display the destList value, it just show the "6" the last > value... > where goes wrong? > > > Elaine Kwek

    attached mail follows:


    Hi,

    Thursday, January 2, 2003, 12:39:46 PM, you wrote: EK> i am now facing a problem in multiple select. EK> This is my example code in html. EK> <select name="destList" MULTIPLE size="6"> EK> <option value=4>123</option> EK> <option value=5>234</option> EK> <option value=6>345</option> EK> </select> EK> i select all the value and pass to php...it should be a array. EK> but when i display the destList value, it just show the "6" the last EK> value... EK> where goes wrong?

    EK> Elaine Kwek

    You need to call your select name as name="destlist[]"

    Then php will know to expect an array list

    -- 
    regards,
    Tom
    

    attached mail follows:


    Does the new release of PHP 4.3 have official support with Apache 2.x or is it still considered developmental?

    Thanks

    attached mail follows:


    It is still experimental.

    On Wed, 1 Jan 2003, Scott Seidl wrote:

    > Does the new release of PHP 4.3 have official support with Apache 2.x or is > it still considered developmental? > > Thanks > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Yup, still experimental. But from what I've experienced, they work just fine together. I run Apache 2.0.43 and PHP 4.3.0 together without any problems what so ever. When you compile php with apache 2, remember to: ./configure --with-axps2 instead of ./configure --with-apxs

    tyler

    ----- Original Message ----- From: "Rasmus Lerdorf" <rasmuslerdorf.ca> To: "Scott Seidl" <smseidlworldnet.att.net> Cc: <php-generallists.php.net> Sent: Wednesday, January 01, 2003 10:59 PM Subject: Re: [PHP] PHP 4.3 & Apache 2

    > It is still experimental. > > On Wed, 1 Jan 2003, Scott Seidl wrote: > > > Does the new release of PHP 4.3 have official support with Apache 2.x or is > > it still considered developmental? > > > > Thanks > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    Hi All,

    Hope everyone had a safe and happy New Year, I am still having trouble getting an insert data form to work. Below is the code. I was also wondering if anyone could tell me the PHP Configuration settings necessary to allow a form to insert data into a MySQL database.

    To view this page, http://www.airforcemuseum.com/newentry.htm

    <html> <head> <title>Test Form Entry Results</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head>

    <body> <h1>Entry Results</h1> <? if (!$firstName || !$lastName) { echo "You have not entered the required details.<br>" ."Please go back and try again."; exit; }

    $firstName = addslashes($firstName); $lastName = addslashes($lastName);

    $dbcnx = mysql_pconnect("localhost", "username", "password");

    if ($db) { echo "ERROR: Could not connect to database. Please try again later,"; exit; } mysql_select_db("testform"); $query = "insert into testform values ('".$firstName."', '".$lastName."')"; $result = mysql_query($query); if ($result) echo mysql_affected_rows()." record inserted into database."; ?> </body> </html>

    Thanks in advance, Ed Waite

    attached mail follows:


    Here's what I suggest. go to http://www.vtwebwizard.com/tutorials/mysql/

    This guys has a really nice tutorial along with a nice class for MySQL that makes inserting data nice and easy.

    Cheers, Mike

    *********** REPLY SEPARATOR ***********

    On 01/01/2003 at 11:35 PM Edson Waite wrote:

    >Hi All, > >Hope everyone had a safe and happy New Year, I am still having trouble >getting an insert data form to work. Below is the code. I was also >wondering >if anyone could tell me the PHP Configuration settings necessary to allow a >form to insert data into a MySQL database. > >To view this page, http://www.airforcemuseum.com/newentry.htm > > >Thanks in advance, >Ed Waite