Dreamweaver CS5.5 template PHP file path bug

I have a template that I am using for my website, it is a PHP template and for some reason whenever I have some links within the PHP code blocks that include other .php files. My code is:
<?php
//Code In template
include('../scripts/MySqlConnection.php');
include('../scripts/login.php');
?>
The code is just including some files, but when I update all the pages that use this Template they dont put the right links on them, like so:
<?php
//Code That Appears On Child Page
include('scripts/MySqlConnection.php');
include('../scripts/login.php');
?>
For some reason the first link is correct since this document is in the root of the site instead of in the Templates folder like my template is, but the second "include" statement has the wrong link inside of it. Even if I switch them around its always the very first include statement that is correct and the 2nd is always wrong.
Also the links are all relative to the document and not site root in the "Manage Sites..." dialog.
Is there anyway to fix this? I heard that this was a quirk/bug in Dreamweaver 8 or something but is it still not fixed in this version?
Thanks

Yes I guess that I am gonna have to use one of those solutions, but it still is weird that this is happening within the code though. I found one thread where the solution was to put the include tags into a seperate PHP block like this:
//Template
<?php include('../scripts/MySqlConnection.php'); ?>
<?php include('../scripts/login.php'); ?>
And it actually outputted the correct links on the child page which is really weird but this was from like Dreamweaver 8 or MX or something because the thread was from like 2007 which is weird that they hadn't fixed this bug yet considering its 2012 and Dreamweaver CS5.5 still has the bug.

Similar Messages

  • ANN: Dreamweaver CS5 with PHP: Training from the Source - Rough Cuts

    If you would like to get early access to my next book "Adobe Dreamweaver CS5 with PHP:  Training from the Source", the first six chapters (of 12) are now  available as Rough Cuts in Safari  Books Online.
    If you have a Safari Library subscription, you can  view the chapters free of charge, and see new ones as they're added.  Without a subscription, you can get access to the book in PDF format for  $34.99, including the finished ebook version when the book is complete.  You can also opt for the Rough Cuts PDF and Print bundle for $67.48.  The print version is expected to be released in early August.

    FIXED!!
    1)
    i finally did get the message problem was with:
    $mailhost='ssl://mail.domain.com';
    ssl:// was just nonsense and been removed
    2)
    'auth' => 'true' was changed to 'auth' => 'login'
    3)
    for bluehost i got information that it was tls secure connection protocol not ssl
    'ssl' => 'tls'
    4)
    port used '25' not 465.
    Didnt still tried 26 and 465 maybe they would work too.

  • Dreamweaver CS5 using PHP to connect to Postgres

    Started learning Dreamweaver using PHP to connect to mySql and dynamically load data into a table on my web page.  Dreamweaver worked great as I didn't have to enter any PHP.  Now trying to use PHP to connect to a Postgres DB.   Does Dreamweaver CS5 support PHP connection to Postgres like it did mySql?   Or do I need to enter the PHP commands  to connect and access the Postgres myself rather than rely on Dreamweaver (which I did for mySql)?

    PHP/Postgres is not a supported server model in DW. You'll need to code by hand, or try to find an extension. Try posting over at the Postgressql forums.

  • Dreamweaver CS5 for Mac - Files within the whole panel minimize

    I'm working in Dreamweaver CS5 for Mac.  Dreamweaver is active and open with the Panel open with files, CSS styles etc tabs open.  I want to add an image to the my Image folder within the Files tab.  Well when I click the Finder icon, it takes focus off Dreamweaver and then the Panel disappears.  This makes it difficult to add pictures to my current site I'm working on.  Then when I click the Dreamweaver screen again this Panel reappears.
    Is there a setting to keep this whole Panel from minimizing or disappearing when Dreamweaver is not on focus?
    Thank you.
    CC

    Assuming you have defined a LOCAL SITE within DW, use INSERT > IMAGE (browse to the image on your local HD or DW Local Site folder)
    If image is not already in the DW Local Site Folder, you will get a prompt to copy the image there. Hit YES and tell DW where to put the image within your local site.
    Or maybe I'm missing something....
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Dreamweaver cs5.5 opening files after searching for text code

    This just occured this afternoon.  I was working on a page and when I went to search for text in the code (ie "/head") dreamweaver would open a previously opened page.  In other words I was working on "walk.php" and when I did the search for "/head", dreamweaver opens "add_rsurvey_data.txt".  I know what the 2nd file is but I haven't opened it in months.  It's just a temp data file that my partner sent me.
    I'm using cs5.5
    Adobe will not help me.
    Thanks
    Glenn

    We don't get attachments from email replies here.  You would need to use the Camera icon in the actual web forum to a post screen shot.
    If this began yesterday, try deleting your Cache & restarting DW.
    http://forums.adobe.com/thread/494811
    Nancy O.

  • Dreamweaver CS5 Templates

    How can I change the template that is attached to a file.  I'm translating a page into another language so I will need an English version and a Mandarin version.  I need a different template with the new language on it.  I made changes to the original English index.html file (this uses template main.dwt), renaming it index-ch.html.  Now I need to have the new translated template (main-ch.dwt) linked to the index-ch.html file intead of the original one.
    Is there a quick way to switch templates?  Thanks.
    kcelsi

    A Dreamweaver template is used for styles, not language.
    Here is a perfect example of the use of a Dreamweaver template in a multi-lingual website: Pac Newington Rental Hall
    As you can see on the page, you have three flags denoting three different languages, English, Spansh and Polish. Since the main website is in English, I have defined just the main content <div> as in Spanish and Polish, but one could also build a template to use other languages for everything, including the sidebar the navigation and every other element.
    The main thing that you want to do is to either define the <body> element as being the wrapper with the particular language or the particular div in question.
    In my example, I have the following code in the main content div:
    <div lang="pl">
    This identifies the main content area as being in Polish. Language-aware browsers (like Google's Chrome) will ask you if you want a translation if you have your primary language set as English.
    Since you can nest a <div> inside of a <div> and it will carry all of the same characteristics of its parent by default, defining a <div> just on the basis of a language is really simple.
    For navigation, I chose to use English, the parent language of the website, as well as for the sidebar and the photos. A polish-American club in the United States will tend to have sufficient English knowledge in its membership to not make navigation a problem. But you could create navigation as an editable part of your template:
    <!-- InstanceBeginEditable name="nav" -->
    put your navigation here
    <!-- InstanceEndEditable -->
    Prolem with this is that navigation changes (a big reason why I template websites using Dreamweaver) won't change if you change the template.
    There is a way around this: Do your templates in html pages that are called by php (assuming you do have php on your server):
    <?php include 'nav.html'; ?>
    This requires that all of your web pages be php pages; they must end in .php even though they are mostly HTML.
    Again, you can template this and make the php statement be an editable region. That way you can have:
    <?php include 'navpl.html'; ?>
    <?php include 'naven.html'; ?>
    <?php include 'naves.html'; ?>
    <?php include 'navde.html'; ?>
    for Polish, English, Spanish and German language navigation. You can also have php check the body's language identifier if you choose to identify your page's language in the body.
    I don't find php includes to be as easy to maintain as standard Dreamweaver Templates, but your mileage may vary.

  • Check in check out in Dreamweaver CS5 with php site

    I created a new site for a client that has about 160 pages, three user login levels, site security, php, forms, . . . The client has a staff member who will make updates to pages with changing content but now wants access to the entire site so she can change wording on other pages as well - she's their new communications coordinator and it certainly makes sense to me. But I'm worry about giving her access to the entire site - I've since learned about check in and check out in Dreamweaver. Since I can't just throw pages in a directory for her to access via ftp (have set that up for one staff member creating gis maps), I'm wondering if this check in check out option is the better way to go for us.
    She will use Dreamweaver, like me. Although we do not share the same office or have access to the same network. The only sharing we can do is on our hosting services server. Can I "check out" files I need her to leave alone and leave them that way? That way she'll have access to all of the primary content pages, not the scripts, css, includes, admin, js, bin, etc files. It should make life easier for her, too, I think.
    What's common practice for this? And how does synchronization fit in?

    Digital Ink LLC wrote:
    What's common practice for this?
    This situation really needs a proper Content Management System (CMS): Wordpress, Joomla, Drupal, Expression Engine all come to mind.
    She's a content contributor, you're the system admin. She needs a bulletproof browser-based editing environment to do her thing without worrying about anything else.
    Down the track, she'll probably want repeat content that she can control on different pages, content expiry, scheduled content, categories, tags, sidebars, headlines: all standard CMS features.
    Using Dreamweaver and Check In/Check Out is just going to create one issue after another.
    The current solution was probably adequate in the past but it's reaching the limits of its scalability. It's really time for a new solution.
    Have you considered a CMS?

  • Dreamweaver CS5 with PHP, not getting it to work with virtual Host

    I have not got far with the book so far.  I am still on the second chapter where you set the Virtual Host but after setting up the Dreamweaver site definition and doing the test.  I get the error that page cannot be found.
    I ask if I can mail the text file of the http.conf and the httpd-vhosts.conf to anyone to see if I screwed up somewhere .  I am running on Windows 7 with the WAMP setup.

    Mr. Powers,
    I used your included file httpd-vhosts.conf.  And it did something since now I get a new set of errors.
    ( ! ) Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    ( ! ) Fatal error: Unknown: Failed opening required  'C:/vhosts/phpcs5/lesson02/site_check.php'  (include_path='.;C:\php\pear') in Unknown on line 0
    But I checked the properties of the folders and unchecked the 'read only' permission but still gets checked again.  I am using Windows 7 64-bit.
    I checked on the web nobody says any solutions about it, they only imply that is a permissions issue.
    I apologize, I found out the chapter files were encrypted... thanks

  • David Powers Dreamweaver CS5 with PHP training from the source mail connector problem

    Hello,
    first I will say great work david this is great book, and i found everything i neede in it.
    I have one problem.
    I have managed to get to lesson 8 and i couldnt wait so i started live project and incororated everything in it learned from this book.
    But this is the problem.
    I have hosting on bluehost which makes mail conector from lessons 7-8 with gmail not to send email in example when i try to recover forgoten password.
    The scripts changes the token in database in users table, token is created, and i get message that the mail was sent but nothing comes to my mail.
    Same password login and everything works local but on bluehost server  wont send mail.
    I contacted them and they said that i have to create mail on server from which mail will be sent.
    I did that too.
    But for what ever i put in mailconector array cant get that mail, and i really dont know what to do and who to ask.
    Until this point i could get every problem solved put this bugs me because this is the last stage of what i was tryong to do and that is to incorporate login system from the book to live page.
    this is the code i have:
    <?php
    $mailhost='ssl://mail.majapanic-tarot.com';
    $mailconfig=array(    'auth'         =>     'true',
                        'username'     =>     '[email protected]',
                        'password'     =>     'password',
                        'ssl'        =>    'ssl',
                        'port'        =>     '465');
    $transport=new Zend_Mail_Transport_Smtp($mailhost,$mailconfig);
    Zend_Mail::setDefaultTransport($transport);
    and this is what they stated in info about the mail:
    Mail Server Username: majapanic+majapanic-tarot.com  >>>>>>>> this plus i think is (at)
    Incoming Mail Server: mail.majapanic-tarot.com
    Incoming Mail Server: (SSL) box344.bluehost.com
    Outgoing Mail Server: mail.majapanic-tarot.com (server requires authentication) port 26
    Outgoing Mail Server: (SSL) mail.majapanic-tarot.com (server requires authentication) port 465
    Supported Incoming Mail Protocols: POP3, POP3S (SSL/TLS), IMAP, IMAPS (SSL/TLS)
    Supported Outgoing Mail Protocols: SMTP, SMTPS (SSL/TLS)
    Please HELP!

    FIXED!!
    1)
    i finally did get the message problem was with:
    $mailhost='ssl://mail.domain.com';
    ssl:// was just nonsense and been removed
    2)
    'auth' => 'true' was changed to 'auth' => 'login'
    3)
    for bluehost i got information that it was tls secure connection protocol not ssl
    'ssl' => 'tls'
    4)
    port used '25' not 465.
    Didnt still tried 26 and 465 maybe they would work too.

  • Dreamweaver CS5, MySQL, PHP: Why are views listed under tables in the connection

    Using Dreamweaver C5 against a remote server with MySQL and PHP, I notifce the views I defined in the database, are list under tables in the connection window, not under views. Probably doesn't really matter, but I was wondering if there is a way to influence this - keeping views listed separately from tables.

    Hi
    This has to do with the way MySQL stores the views in the database, (a similar problem occurs with procedures) in that they are stored as part of the entire database.
    View on there own are not natively supported in dreamweaver.
    PZ

  • Errata for "Adobe Dreamweaver CS5 with PHP: Training from the Source"

    There doesn't appear to be an errata page on the Peachpit/Adobe Press website for my book, so I have created one on my own website at http://foundationphp.com/phpcs5/errata.php. Many thanks to conmolbry for pointing out the problems.

    FIXED!!
    1)
    i finally did get the message problem was with:
    $mailhost='ssl://mail.domain.com';
    ssl:// was just nonsense and been removed
    2)
    'auth' => 'true' was changed to 'auth' => 'login'
    3)
    for bluehost i got information that it was tls secure connection protocol not ssl
    'ssl' => 'tls'
    4)
    port used '25' not 465.
    Didnt still tried 26 and 465 maybe they would work too.

  • Question about reset password in lesson08 of David Powers (Dreamweaver CS5 with PHP)

    I'm at the page 299 that found a problem in reset password. I managed to received email of link to reset password. In the reset password form, why no checking of password length entered or password unmatch with confirmed password input ? Instead it displays error message of 'Sorry, there was an error. Make sure you used the complete URL in the email you received. The URL can be used to change your password only once. If necessary...' The error message of 'Passwords don't match' or 'Use 8-15 letters or numbers only' not processed.
    Please help !
    Thank You

    I can see the 32 characters attached to URL and also I can see the 32 characters stored in database. It actually can reset the the password if entered within the requirement of 8-15. But when I entered less than 8, it does not show the error message of 'Use 8-15 letters or numbers only'.
    I noticed that $_SESSION['nomatch'] was assigned to True after the validation of 8-15 length. Below is the code for reference.
    <?php
    session_start();
    $errors = array();
    $success = FALSE;
    $_SESSION['nomatch'] = TRUE;
    require_once('library.php');
    try {
      if (isset($_GET['id']) && isset($_GET['token'])) {
              $id = $dbRead->quote($_GET['id']);
              $token = $dbRead->quote($_GET['token']);
              $sql = "SELECT user_id FROM users WHERE user_id = $id AND token = $token";
              $result = $dbRead->fetchRow($sql);
              if ($result) {
          $_SESSION['user_id'] = $_GET['id'];
                $_SESSION['token'] = $_GET['token'];
                $_SESSION['nomatch'] = FALSE;
      if (isset($_POST['reset'])) {
              // password reset code goes here
              $val = new Zend_Validate();
              $val->addValidator(new Zend_Validate_StringLength(8,15));
              $val->addValidator(new Zend_Validate_Alnum());
              if (!$val->isValid($_POST['password'])) {
                $errors['password'] = 'Use 8-15 letters or numbers only';
              $val = new Zend_Validate_Identical($_POST['password']);
              if (!$val->isValid($_POST['conf_password'])) {
                $errors['conf_password'] = "Passwords don't match";
              if (!$errors) {
                // update the password
                $data = array('password' => sha1($_POST['password']),
                              'token'    => NULL);
                $where['user_id = ?'] = $_SESSION['user_id'];
                $where['token = ?'] = $_SESSION['token'];
                $success = $dbWrite->update('users', $data, $where);
                unset($_SESSION['user_id']);
                unset($_SESSION['token']);
                unset($_SESSION['nomatch']);
    } catch (Exception $e) {
      echo $e->getMessage();

  • IE does not run "refreshing the list of places" Lesson 12 Adobe Dreamweaver CS5 with PHP

    Hi anyone else experience this.  In lesson 12 everything works as it should until I add the code for refreshing the list of places as well as the list of photos.  Live view works fine, Chrome, Dreamweaver and safari works as well.  However IE 9 does not.  If anyone can explain the cause of this I will be very grateful

    I am sorry to see that you did not receive a reply. I'm having the same problem ... apparently the Adobe Extension Manager only sees the earlier versions of Dreamweaver, and so exits out of the installation.
    If would be great to have the courtesy of a reply from Adobe regarding their extension manager.

  • DW CS5 with PHP - book question

    Hello,
    I'm working my way through the book "Dreamweaver CS5 with PHP" by David Powers and I've enountered something odd when it comes to code hints. On page 225, on step 3 I typed:
    $dbWrite = new Zend
    ...And code hints pop up, but neither Zend_Db_Adapter_Mysqli nor Zend_Db_Adapter_Pdo_Mysql are among the choices offered. The closest I get is "Zend_Db".
    I also tried typing "pdomy" like it says in the book, but still no cigar.
    I finished writing the code and tested the script in step 5 and it works fine. I just don't understand why those classes are not included in the code hints.

    Also, the same thing happened in step 5 when I tried to type $dbWrite->getConnection().
    no code hints popped up at all.

  • CS5 with PHP - Lesson 7, Zend_Auth

    Hi there.
    Wondering if anyone can help shed some light on an issue I'm having that is based around the Login Script/Authentication in Lesson 7 of David Powers Dreamweaver CS5 with PHP book.
    I've created a few simple CMS's with the help of the book and everything works fine.
    For my next CMS however I would like to add different levels of access.
    Currently I have 2 database tables - Admin and Client. I then created login scripts that go to different areas - Front end Client login, for example www.website.com/login.php when authenticated Client is taken to www.website.com/index.php. I then did the same thing but for an Admin - www.website.com/admin/login.php when authenticated Admin is taken to www.website.com/admin/index.php
    This all works really well - I've used $identity to show welcome messages and the currently logged in user e.t.c.
    The issue is that because both logins use very similar code there is no difference between an Admin and a Client. If a Client logs in to their account, they could then type in the admin URL and access all of the admin features.
    To rectify this, is it a simple case of changing the storage variable? Currently I have the code identical to the book - if authentication is passed then $storage is used with getResultRowObject.
    Is it a simple case of changing this (say for the admin script) to - $adminstorage = $auth->getStorage(); $adminstorage->write...........
    Or will this just result in the same?
    If anyone could point me in the right direction for setting up different levels of access using the Zend_Auth_Adapter_DbTable or whether I need to use something else it would be greatly appreciated.
    Thanks.

    Hi Osgood
    Thanks for taking the time to reply.
    I already have separate tables for Admin and Clients.
    I think the problem is they are both calling the same Authentication adapter. Zend_Auth_Adapter_DbTable.
    Ideally I need a kind of 'realm' which some of the other Auth Adapters have but I'm not sure how to use them.

Maybe you are looking for

  • Cannot hear audio for subclips playback in source monitor

    Hi, My editor has merged a bunch of video and multichannel audio on his computer and created merged clips and sub clips for me to look at. Now it's my turn to make selects from the merged subclips, but when I open the project on my computer the subcl

  • ADF Hierarchy Viewer does not render remote images

    I am using ADF Hierarchy Viewer in my application. I was trying to use a Image component inside one of its nodes. The image works fine if I use the image which is part of my application. If I use a remote image using its URI, it wont render the image

  • Pages *crashes* whenever I run it

    I just paid for a serial for iWork and now whenever I run it and do anything (including just pasting text into a blank page) tje desktop blinks and applications crash and pages just quits. I used it a few days ago in trial mode (trial expired) and I

  • Photoshop CS5 Exit Code 7 Unable to get root from inChildPath

    I downloaded the trial version 32 bit and 64 bit, to my desktop (Core I7 3.2 GHZ, 12Gb ram, Win XP Pro 64) and when installing, it doesn't get past 0%, just spits out this: 0 fatal errors, 1 error, 0 warning Error: Unable to get root from inChildPath

  • Can't get past 51% download

    Trying to download http://download.oracle.com/otn/other/ole-oo4o/ODTwithODAC112030.zip can't get past 51%.