Ask a Question related to Dreamweaver AppDev, Design and Development.
-
ChrisHe #1
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
-
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... -
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... -
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)... -
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... -
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... -
Felix1 #2
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
-
David Powers #3
Re: php login behaviour shows errors
ChrisHe wrote:
The PHP User Authentication scripts in Dreamweaver MX 2004 use> Is there a problem with the Dreamweaver standard php behaviours? In particular
> the user login scripts?
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]
"Headers already sent" is a common problem for beginners. It means that> With php and MySQL error logging ON, i get the following:
> "Cannot modify header information, headers already sent"
> and
> "1 result set not freed..."
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 ?>.
A lot of experienced people don't like the PHP code in Dreamweaver. It's> 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?
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.
Yes, that's the deprecated code that I mentioned at the beginning. In a> P.S. I already picked up the following "error" - should use $_SESSION and not
> $_GLOBALS (which is deprecated by php)
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



Reply With Quote

