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.

Similar Messages

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

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

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

  • 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

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

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

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

  • David Powers Lesson08 forgotten.php problem

    I have a strange problem when running forgotten.php. The program works alright initially with the setting of mail_connector.php as below. I managed to send and received email. Everything works fine intially. After sometime, I found problem running the same program again. This time it generates error message of 'Notice: Underfined index: [email protected] in c:\vhosts\phpcs5\lesson8\scripts\request_reset.php on line 25' and also message 'No connection could be made because the target machine actively refused it.'
    Any idea why ?
    Mail_Connector.php
    <?php
    $mailhost = 'mail.agri-organica.com';
    $mailconfig = array('auth'     => 'login',
                        'username' => '[email protected]',
                                                      'password' => 'password');
    $transport = new Zend_Mail_Transport_Smtp($mailhost, $mailconfig);
    Zend_Mail::setDefaultTransport($transport);

    I changed the From header using agri-organica.com address and send to yahoo address. This time it shows:
    'No connection could be made because the target machine actively refused it.'
    Request Received
    An email has been sent to your registered address with instructions for resetting your password.
    Request_reset.php
    <?php
    $errors = FALSE;
    $result = FALSE;
    if ($_POST) {
      require_once('library.php');
      require_once('mail_connector.php');
      try {
              $val = new Zend_Validate_EmailAddress();
              if (!$val->isValid($_POST['email'])) {
                $errors = TRUE;
              if (!$errors) {
                $sql = $dbRead->quoteInto('SELECT user_id, first_name, family_name, email FROM users WHERE email = ?', $_POST['email']);
                $result = $dbRead->fetchRow($sql);
                if (!$result) {
                        $errors = TRUE;
                } else {
            // update database and send mail
                        $token = md5(uniqid(mt_rand(), TRUE));
                        $data = array('token' => $token);
                        $where = $dbWrite->quoteInto('email = ?', $_POST['email']);
                        $dbWrite->update('users', $data, "user_id = {$result['user_id']}");
                $mail = new Zend_Mail('UTF-8');
                $mail->addTo($result['email'], "{$result['first_name']} {$result['family_name']}");
                $mail->setSubject('Instructions for resetting your password');
                $mail->setFrom('[email protected]', 'Calvin');
                $link = "http://phpcs5/lesson8/reset.php?id={$result['user_id']}&token=$token";
                $message = "Use the following link to reset your password. This link can be used once only. $link";
                $mail->setBodyText($message, 'UTF-8');
                $mail->send();
      } catch (Exception $e) {
              echo $e->getMessage();

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

  • Creating category lists with php (David Powers???)

    I am creating a dynamic content website with numerous entries under various categories. The categories are kept in a seperate mysql that looks something like this (an example):
    ID
    Main
    Sub
    1
    food
    candy
    2
    food
    meat
    3
    drink
    coke
    4
    drink
    snapple
    5
    drink
    dr. pepper
    6
    food
    bread
    I have created a page where the user can see all of the main categories. In the above case, food and drink. I do not want 'food' and 'drink' to be repeated three times. So I have used php code which david powers gives in his recipe: http://cookbooks.adobe.com/post_Create_nested_lists_from_a_recordset__PHP_-16720.html.
    The problem is that in the above case, the page will list: food, drink, food. This is because when the php passes through the 'drink's it then sees the last 'food' as being unique.
    How do I get rid of this issue (without having to to continuosly reorder my mysql table)?
    thanks
    P.S. I am posting this here and not on the above recipe page because I am hoping for a quicker response.

    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.

Maybe you are looking for