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.

Similar Messages

  • 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.

  • DW CS5 with PHP: no "register_long_arrays" in php.ini

    Mr. Powers:  I bought your book, “Adobe DW CS5 with PHP: Training from the Source.” I am running MAMP Pro 1.9.6 on a Mac Pro Intel, OS 10.6.8. Following your instructions in Chapter 2, I have changed ALL the settings per Table 2.1, EXCEPT “register_long_arrays” which I cannot find (searched every permutation in BBEdit) in either of the php.ini files listed. The php info v. 5.2.17 shows:
    Configuration File (php.ini) Path: /Applications/MAMP/conf/php5.2
    Loaded Configuration File: /Library/Application Support/appsolute/MAMP Pro/conf/php.ini
    and the “PHP Core” section shows “register_long_arrays” = On.
    Why can’t I find the setting in either php.ini file? Also, I have read that this setting has been deprecated in PHP 5.3; what does that mean to my configuration?
    You recommend matching certain settings to the host’s server configuration; it would be very useful in avoiding potential problems to have a complete list of these configuration/parameter recommendations for a prospective host, don’t you think?

    Thank you, SnakEyez02. At this point, I haven't gotten far enough to understand super-globals but I'm grateful for your help. After much head-banging, I believe the solution to my problem lies on this forum [ Re: Snow Leopard, MAMP php.ini Question ]. Though Mr. Powers recommends using MAMP Pro in the book, he doesn’t mention that changes made to settings in /Library/Application Support/appsolute/MAMP Pro/conf/php.ini are NOT LOADED and not reflected in the phpinfo.php file at subsequent server startups as they would be if I were using MAMP (not PRO).  In order for the settings changes to be loaded by MAMP Pro, editing must be done through the MAMP Pro interface menu /File/Edit Template/PHP 5.2.13 php.ini.
    Having opened that template, I'm now faced with a another unforeseen question:  what to do with
    [setting]  =  MAMP_error_reporting_MAMP
    when the book says that setting should be either “= On” or “= Off.”  If you can help me with this one, you’ll make my week!

  • 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.

  • David Powers cs5 with php...Zend

    This one is aimed for David Powers. We are using your book for my advanved programming class. I continually have problems because they had us buy a domain instead of the one the book does it. At this point I'm on page 222ish, installing Zend. Obviously I'm using dreamweaver and my domain is with godaddy.com. I'm doing the section where you are are installing the library. I've got the library.php with no errors, I'm connected to my domain, and I have the zend file inside my local site folder. I've tried in the C drive but I cotinually get the same error:
    Warning: require_once(Zend/Loader/Autoloader.php) [function.require-once]: failed to open stream: No such file or directory in/home/content/79/7340479/html/library.php on line 4
    Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader/Autoloader.php' (include_path='.:/usr/local/php5/lib/php:C:\Users\Becky\Desktop\colts\ZF\ZendFramework-1. 11.4-minimal\library') in /home/content/79/7340479/html/library.php on line 4
    I've tried putting the zend folder in c, desktop, in side local site folder and same thing everytime. Any help would be appreciated.

    Re: David Powers cs5 with php...Zend
    Ok I'm gonna try and help ya until David gets here. Since I use Zend and have read parts of his book.
    First, are you trying to install zend at godaddy?
    Your include file is odd. "include_path='.:/usr/local/php5/lib/php:C:\Users\Becky\Desktop\colts \ZF\ZendFramework-1.11.4-minimal\library') in/home/content/79/7340479/html/library.php" - means PHP and Zend are located on 2 different machines
    I appreciate it. the "C:\Users\Becky\Desktop\colts \ZF\ZendFramework-1.11.4-minimal\library' is where the file path.I use Godaddy but I have it zend on my computer and am just trying to get it to run. I tried running it from desktop, C:(where it's at), andneven put it in the file manager on godaddy and tried that path...
    the code I'm using is:
    <?php
    $library = 'C:\Users\Becky\Desktop\colts\ZF\ZendFramework-1.11.4-minimal\library';
    set_include_path(get_include_path() . PATH_SEPARATOR . $library);
    require_once('Zend/Loader/Autoloader.php');
    $loader = Zend_Loader_Autoloader::getInstance();
    if ($loader) {
    echo 'OK';
    } else {
    echo 'We have a problem';
    I'm followed the book step by step but...
    when i click autoloader.php in the tab bar it has a get option. but when i click it it says "operation failed because it is not on the remote site.

  • Does electronic version Adobe Dreamweaver CSS with PHP content question

    Does electronic version Adobe Dreamweaver CSS with PHP come with the labs or files used in a college course?  What is on the CD and is there a way to get the content with the Barnes and Noble e-book?  This should be a Barnes and Nobel question but they seem to have troubles answering the questions like this.

    Electronic version comes with absolutely nothing about your course.   All you get is everything in this link:
    <http://www.adobe.com/cfusion/tdrc/index.cfm?product=dreamweaver>
    The link will give you 30 days of free use of DW after which you might get bored with DW or you will have given up on your course and started your own business to pay your school fees.
    hth

  • 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

  • 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();

  • 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.

  • 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.

  • 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?

  • Working through Resetting Forgotten Password script in Lesson8 in CS5 with PHP

    Hi,
    I finished editing the completed scripts in lesson 8 to suit my users table in my mysql database. Originally I was getting a mysql error 1054 saying that "token" was a missing field. So I added a 100 VARCHAR "token" column in my users table. Now I am getting the following error message:
    Notice: Undefined variable: token in "path to the request_reset_unsub.php script "\request_reset_unsub.php on line 33
    An attempt was made to access a socket in a way forbidden by its access permissions.
    Also...I am still getting the
    Request Received
    An email has been sent to your registered address with instructions for resetting your password.
    message but the email that the script is supposed to send does not get sent (probably because the try block ends and goes to the catch block before the script can send the message).
    Can anyone shed some light on my dilemna?

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

  • DW CS5 with PHP - page 247

    Why not include the email address in the $data array that gets inserted into the database? Is that covered later in the book?

    http://foundationphp.com/phpcs5/errata.php

  • 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 existing wordpress site hosted on yahoo need help connecting to existing remote database

    I am having trouble establishing a database connection.  I can  connect with test databases but am having trouble using dreamweaver wtih  my existing wordpress website.  Am I able to use dreamweaver to edit  and live view my changes before uploading the changed files to my live  site?  Am I able to access my existing wordpress database with  dreaweaver?  I have imported it to my testing server/database but still  seem to be having trouble establishing a connection with it (think maybe  my folder hierarchy might be off).
    macintosh HD/Applications/MAMP/htdocs/nwm/wp/index.php
    "nwm" is the name of the folder that I have copied all of my site  files to and the folder I have dreamweaver pointing to.  "wp" is what I  have all of the wordpress files in (the ones I copied from my yahoo  server - including all my current theme files etc.)
    I am trying to put the info into the mysql connection dialog box:
    Connection Name: Testing (i am assuming this name is for my benefit only and doesn't actually matter)
    MySQL Server: mysql
    User Name: *****
    Password: *****
    Database: wp
    and am getting this message
    MySQL Error#: 2013
    Lost connection to MySQL server at 'reading initial communication packet', system error 61
    did some google seaches of the error.  Tried turning off the  firewall, and the advance tab allow mysql incoming  (there were 2 one  was allow one was not allow.  I changed both to allow)
    Cant really find anything on yahoo to help me out.  Looked in  phpmyadmin database named wp: wp_users to get the username and password  (which due to previous look for help - I think the password was  encrypted cuz it looked like a bunch of mumbo jumbo and am fairly  certain I know the correct password).
    Any help would be greatly appreciated!! I spent $50 on live chat  last night trying to resolve the issue only to find out at the end that  the guy really didn't understand my problem and doesn't have  dreamweaver.  I have also watched countless videos on Lynda.com and have  been thru forum after forum.  While this problem is only a couple weeks  old since I just got CS5.  I have been having trouble making any  headway learning php since I cant seem to make it past the set up  parts.  I have done the php / mysql essential training on lynda.com with  relative success except that I really dont want to work with any more  exercise files so I didn't go on to the beyond the basics. I recently  went thru most of the Dreamweaver CS5 and Wordpress 3. Also did the  first 4 chapters of Dreamweaver CS5 with PHP and MySQL. I need to start  integrating things into my live sites.  I am also trying to work my way  thru the learning php, mysql, javascript book by o'reily media by robin  nixon (as fun as reading a math text book) can't get thru it since I  can't relate any of it to my current sites/needs
    I am on MacBookPro OSX 10.6.6
    Installed MAMP to specification on all 20 tutorials I have tried including lynda.com
    Tested the testing server and is working
    Just installed dreamweaver cs5
    have been using wordpress online to create and edit posts (recently  upgraded to 3.? whatever the latest update was online which I believe  update the files on my yahoo server?)
    Have also installed wordpress on my computer (several times thru each tutorial trying to get this right.)
    Am I expecting the impossible?

    If wordpress controls it's own connection why am I unable to use the live view. I have synced the remote site to my local computer so all the files should be just as they are online with the exception of the DB which contains most of the content.
    I have done all of those steps.  I have even exported the database from inside internet phpmyadmin and imported into computer phpmyadmin.  When I hit live view I get one of couple of errors.
    1.  "One is that the dynamic related files could not be displayed due to an internal server error"
    At some point I was able to view some sample files inside dreamweaver.  But I would like to be able to view my real site files.  I was able to "connect" to the local databases (not the copy of my real one - I think that maybe that was because it is somehow nested inside another db an am going try to reimport to new location).  And then I changed the host/username/password trying to deal with the internal server error. Now instead I get the cannot connect to the database Error 2016 or whatever from the origianl post. Also, I am using yahoo if that matters and all I can find about what their server name is: mysql - is that correct?
    I have been thru this so many times with so many different tutorials I am losing track of what is what.
    2.  Can I access my remote database within dreamweaver? I do not want to create dummy files (seems to be a waste of time).  And while if it had worked exporting/importing a duplicate on to my computer would have satisfied me for a little while it also seems some what counter productive.  Since every post and page is different if I were doing a daily updates etc how would I be able to change the formating or design of them if I can't access the remote files.  Would I re- import everytime I want to work on it to get current database?
    I am trying to be clear.  I listed all the specs I could think as listed  in your "how to get help fast post" (yes I read that at least twice  too) of all of the steps and possible reasons for my problems.  I also  thought that the forum was on a seperate site so I didn't think it would  count as a duplicate.  I am frustrated to tears and am feeling  incredibly stupid that after all this time and all these tutorials yes  you are right I obviously am not understanding what is going on which is  why I am on this forum.

Maybe you are looking for

  • Import from Excel not escaping quote (')

    Hi, I'm having problems with text fields in an Excel spreadsheet that contain single quotes (') not being escaped when the insert commands are built using the Import from Excel wizard. It's pretty much the same problem as that described in the post b

  • Mail silent on MacBook Pro Retina Mid-2012

    After a restart, sound is working once for in-coming and out-going emails. Dann, silent again.

  • Fatal error when trying to load illustrator on windows 8.1.

    I deactivated cs5 on my windows xp and loaded the cs5 disk onto new windows 8 computer. But illustrator will not load, shows fatal error, does not even show in the menu of programs on disk, but if I stick the disk back into the xp machine, it loads f

  • Dvd drive not working on iMac

    Hi! DVD drive on my iMac is not reading any DVD or CD. It try to read then it ejects it. Can anyone help me?

  • How to compare two result set

    i am making and online test tool in which the student has to ans sql querys how can i compare that sql query output with th on i have store