Adobe Dreamweaver Forums



Last 10 THreads :         RoboHelp & Knowledge Bases (Last Post : lmarden - Replies : 2 - Views : 3 )           »          catching errors from remotely invoked processes (Last Post : Amy Blankenship - Replies : 3 - Views : 4 )           »          A question for the gurus (Last Post : Amy Blankenship - Replies : 1 - Views : 2 )           »          Naming Layers CS4 Mac (Last Post : Type & Art - Replies : 0 - Views : 1 )           »          Flash CS4 on Windows 2003? (Last Post : Richard Morey - Replies : 0 - Views : 1 )           »          Where are the fonts located? (Last Post : Mike Blaustein - Replies : 1 - Views : 2 )           »          Help with Spry Paged View (Last Post : Skinwehr - Replies : 0 - Views : 1 )           »          ANN: Contact Form Solution Pack (Last Post : A.Translator - Replies : 8 - Views : 9 )           »          Help posting folder to server (Last Post : Alan - Replies : 1 - Views : 2 )           »          Screens get distorted (Last Post : Captiv8r - Replies : 4 - Views : 5 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Dreamweaver: Main > Dreamweaver Application Development
 
Tags: ,



Reply
  #11 (permalink)  
Old 09-01-2008, 07:02 PM
dfilchak
 
Posts: n/a
Diggs:
Default Re: redirect after insert

It seems that the standard way of including the connection script i.e.
virtual("/Connections/connScript.php") is at least, part of the problem. When I
use the require_once command, it allows me to get the login and stuff working.
But it also sort of breaks the behavior in DW. (Gives me the dreaded red
exclamation mark). It is not fixed ... but at least a measure of success.

Any ideas?

Dave

Reply With Quote
Sponsored Links
  #12 (permalink)  
Old 09-01-2008, 07:02 PM
David Powers
 
Posts: n/a
Diggs:
Default Re: redirect after insert

dfilchak wrote:
> I was hoping you were on to something with this but thhat preference is not
> checked so I do not believe this is the culprit. I assume that if this wwas
> checked, there would be something in the <head> section?


No, the Byte Order Mark is a hidden character, which is why it causes a
lot of people grief.

As Mark points out, you also need to check any include files. A common
cause is an extra line after the closing PHP tag of an include.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Reply With Quote


  #13 (permalink)  
Old 09-01-2008, 07:51 PM
dfilchak
 
Posts: n/a
Diggs:
Default Re: redirect after insert

[q]Originally posted by: Newsgroup User
dfilchak wrote:
> I was hoping you were on to something with this but thhat preference is not
> checked so I do not believe this is the culprit. I assume that if this wwas
> checked, there would be something in the <head> section?


As Mark points out, you also need to check any include files. A common
cause is an extra line after the closing PHP tag of an include.
--
[/q]
The only include file I have is with the dB connection script and I have
checked it to death. There are no extra lines spaces or <CR>.

There is definitely something with the use of virtual as opposed to require or
require_once. It seems to want to work using require or require_once. However,
using this breaks the DW code for record sets and insert/delete functions. It
never used to but seems to now.

Dave


Reply With Quote
  #14 (permalink)  
Old 09-01-2008, 08:53 PM
Mark A. Boyd
 
Posts: n/a
Diggs:
Default Re: redirect after insert

dfilchak posted in macromedia.dreamweaver.appdev:

> There is definitely something with the use of virtual as opposed
> to require or require_once. It seems to want to work using require
> or require_once. However, using this breaks the DW code for record
> sets and insert/delete functions. It never used to but seems to
> now.


'Fraid I'm not going to be much help from here. I don't know anything
about DW's DB behaviors. Sorry.

Out of curiosity, I ran an experiment on my DW8 box (simple recordset
with a repeat region) and it used require_once(). Perhaps virtual() is
new with CS3 (my CS3 box is taking today off). Again, this is the first
time I ever tried one of those behaviors.


--
Mark "bowing out" Boyd
Keep-On-Learnin'
Reply With Quote
  #15 (permalink)  
Old 09-01-2008, 10:41 PM
David Powers
 
Posts: n/a
Diggs:
Default Re: redirect after insert

Mark A. Boyd wrote:
> Out of curiosity, I ran an experiment on my DW8 box (simple recordset
> with a repeat region) and it used require_once(). Perhaps virtual() is
> new with CS3 (my CS3 box is taking today off).


Dreamweaver uses virtual() if your site definition uses links relative
to the site root. If you use links relative to the document (the DW
default), it uses require_once().

I don't know when Dreamweaver started using virtual() if you select
root-relative links, but it's generally a bad idea. The idea of
virtual() is that it permits root-relative links for include files.
However, it works only on Apache, and even the PHP manual advises
against using it.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Reply With Quote


  #16 (permalink)  
Old 09-01-2008, 11:39 PM
dfilchak
 
Posts: n/a
Diggs:
Default Re: redirect after insert

Yeah that was totally the problem. I can't remember eithher when DW started
using virtual but they should quit it!!! This is 3 days of my life I'll never
get back.

Anyway, setting the site to use document relative links solves this issue and
it still does not stop you from using site relative linking for your pages. You
just do not get it done automagically for you. It is just not good to do it
with your includes. Hummm ... I used to use something like <?php require_once
($_SERVER['DOCUMENT_ROOT'] . "/path_to_file/file.php") in the past. I wonder if
this will work under these conditions? Probably not as DW is really picky about
how the behavior is written in the code. For instance, if I try to clean up the
number of opening and closing PHP tags by combining everything into one block,
DW complains that it cannot find the connection. If I isolate the include block
inside its own opening and closing PHP tags, DW is happy. Very BIZARRE!!!

Anyway ... I want to say thanks to all who worked with me on this and
hopefully we've all learned a lesson .... get a life!!! ;-)

thanks again everyone.

Dave

Reply With Quote
  #17 (permalink)  
Old 09-02-2008, 05:00 AM
Mark A. Boyd
 
Posts: n/a
Diggs:
Default Re: redirect after insert

David Powers posted in macromedia.dreamweaver.appdev:

> Mark A. Boyd wrote:
>> Out of curiosity, I ran an experiment on my DW8 box (simple
>> recordset with a repeat region) and it used require_once().
>> Perhaps virtual() is new with CS3 (my CS3 box is taking today
>> off).

>
> Dreamweaver uses virtual() if your site definition uses links
> relative to the site root. If you use links relative to the
> document (the DW default), it uses require_once().


Thanks for the info. (Your new book arrived last week & I expect to get
more Powers gems from it soon

> I don't know when Dreamweaver started using virtual() if you
> select root-relative links, but it's generally a bad idea. The
> idea of virtual() is that it permits root-relative links for
> include files. However, it works only on Apache, and even the PHP
> manual advises against using it.


Wow. I was thinking about exploring those behaviors since today's
excercise was so easy. Any other gotcha's?

One thing holding me back was the fact that it placed that Connections
folder in the server document root - userID, password and all. Not a
practice I prefer.


--
Mark A. Boyd
Keep-On-Learnin'
Reply With Quote
  #18 (permalink)  
Old 09-02-2008, 05:00 AM
Mark A. Boyd
 
Posts: n/a
Diggs:
Default Re: redirect after insert

dfilchak posted in macromedia.dreamweaver.appdev:

> For instance, if I try to clean up the
> number of opening and closing PHP tags by combining everything
> into one block, DW complains that it cannot find the connection.
> If I isolate the include block inside its own opening and closing
> PHP tags, DW is happy. Very BIZARRE!!!


And one of the gotcha's that would likely bite me if I explore those
behaviors further. Thanks for the heads up.


--
Mark A. Boyd
Keep-On-Learnin'
Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 08:02 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk