php login behaviour shows errors

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default php login behaviour shows errors

    Is there a problem with the Dreamweaver standard php behaviours? In particular
    the user login scripts?

    e.g. I have tried with both the "Newland Tours" demo (php_users), and just
    inserting the login php "behaviour" into my own pages.

    With php and MySQL error logging ON, i get the following:
    "Cannot modify header information, headers already sent"
    and
    "1 result set not freed..."

    altho the script does seem to work.

    Is the standard php code from Dreamweaver just not very good - it certainly
    seems to be complex to me, as a newbie, so I can't see what is wrong, but
    perhaps some more experienced person knows about this?
    And are the other behaviours just as flaky? (assuming it's not my fault
    somehow!)
    I'm a newbie to this, but feeling very cautious about Dreamweaver now..
    Thanks
    Chris

    P.S. I already picked up the following "error" - should use $_SESSION and not
    $_GLOBALS (which is deprecated by php)
    I'm using php 4.3.10, DWMX2004, Mysql 4.0.20d


    ChrisHe Guest

  2. Similar Questions and Discussions

    1. Add clause to the login behaviour....how?
      I want to add some more criteria to a user logging in other that correct username and password. I want to base it on a specific date and...
    2. CFML Session settings affecting DW Login Behaviour?
      Hi everyone - I think I am going a little stir crazy. I've been using Dreamweaver / Ultradev since DW1/UD1/Drumbeat and have used the login...
    3. I edited the login behaviour to use 2 tables (not working please take a look)
      I inserted the login behaviour but edited it so that is would check a username and an email address for a valid login (the user may have either)...
    4. Login user behaviour
      I inserted the login behaviour but edited it so that is would check a username and an email address for a valid login (the user may have either) and...
    5. supress errors at the page level? Undefined index errors.
      I'm creating a simple reply form, and if a form item isn't answered I get an error: "Notice: Undefined index: rb_amntspent in...
  3. #2

    Default Re: php login behaviour shows errors

    Probably you have a white space after the connection string or some other
    interruption. Remove it. <?php require_once(...............); ?> <-- just
    here Is nothing wrong with the DW's Login User. Felix

    Felix1 Guest

  4. #3

    Default Re: php login behaviour shows errors

    ChrisHe wrote:
    > Is there a problem with the Dreamweaver standard php behaviours? In particular
    > the user login scripts?
    The PHP User Authentication scripts in Dreamweaver MX 2004 use
    deprecated code. I have written a detailed analysis (together with the
    solution) here:

    [url]http://friendsofed.infopop.net/2/OpenTopic?a=tpc&s=989094322&f=8033053165&m=3241024 21&r=324102421#324102421[/url]
    > With php and MySQL error logging ON, i get the following:
    > "Cannot modify header information, headers already sent"
    > and
    > "1 result set not freed..."
    "Headers already sent" is a common problem for beginners. It means that
    there is whitespace outside the PHP tags before the script gets to
    session_start(). Felix has shown you one possible place this may be. The
    other very important place to look is in your Connections file. There
    must be no extra lines after the closing ?> tag on the page. Switch on
    line numbering in Code view. If you can see any numbers after the final
    tag, that's where your problem lies. Put your cursor as far down the
    page that it will go, and use backspace to delete all the whitespace
    right up to the closing ?>.
    > Is the standard php code from Dreamweaver just not very good - it certainly
    > seems to be complex to me, as a newbie, so I can't see what is wrong, but
    > perhaps some more experienced person knows about this?
    A lot of experienced people don't like the PHP code in Dreamweaver. It's
    not so much that it's bad, but that it is very verbose. The reason is
    because the Macromedia development team has had to second-guess just
    about everything that someone is likely to use or enter in an online
    form. It's catch-all code, rather than the lean, clean code that you
    should eventually start writing when you get more experienced and don't
    need to rely on DW for everything.

    One thing the DW code is very good for is rapid development of a
    prototype. You can rustle up a quick (albeit simple) database-driven
    site with DW in an hour or so (once you're reasonably proficient). That
    will show you or a client the basic outline of what a site will look
    like. Then you get down to the detailed coding, most of which has to be
    done by hand.
    > P.S. I already picked up the following "error" - should use $_SESSION and not
    > $_GLOBALS (which is deprecated by php)
    Yes, that's the deprecated code that I mentioned at the beginning. In a
    lot of recent setups, it now fails completely. It's a bug, but one that
    MM has not yet corrected.

    --
    David Powers
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    Co-author "PHP Web Development with DW MX 2004" (Apress)
    [url]http://computerbookshelf.com[/url]
    David Powers Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139