"could not open socket" error

Hello:
I am following the book "Adobe Dreamweaver CS5 with PHP" by David Powers (an excellent book I might add) and am currently going over chapter 8. (Zending email). I have completed the section concerning processing of a simple user feedback script, and I beleive I have my connector script, and code correct. My testing server is running and correctly defined in DW. When I attempt to submit the form in a browser window, I get the message "could not open socket" at the top of the  browser document window. I assume this involves adjusting a configuration file but I can not figure out where it is. Any help out there?
My setup:
Windows 7
Apache2.2.17
PHP5.3.4
ZendFramework-1.11.4-minimal

Boy, this one sure has me stumped.
Despite using the amendment to the catch block that you so graciously suggested, and turning off my firewall, and antivirus software, all I get is the error message "could not open socket" at the top of the browser (various) document window (and a resetting of all fields and textarea):
Here are my files. (I understand I will be changing my passwords, and getting a new recaptcha key, but I am desperate to fix this):
I also amended the mail_connector.php script using the (Outgoing Mail Server: (SSL) server306.webhostingpad.com (server requires authentication) port 465) choice below with the same result.
My hosting company provided this to me for manual setting of email:
Manual Settings
Mail Server Username: test1+housecalls4pets.com
Incoming Mail Server: mail.housecalls4pets.com
Incoming Mail Server: (SSL) server306.webhostingpad.com
Outgoing Mail Server: mail.housecalls4pets.com (server requires authentication) port 2626
Outgoing Mail Server: (SSL) server306.webhostingpad.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)
library.php:
<?php
// Adjust the path to match the location of the library folder on your system
$library = 'C:/php_library/ZendFramework-1.11.4-minimal/library';
set_include_path(get_include_path() . PATH_SEPARATOR . $library);
require_once('Zend/Loader/Autoloader.php');
try {
  Zend_Loader_Autoloader::getInstance();
  $write = array('host'     => 'localhost',
     'username' => 'cs5write',
     'password' => 'Bow!e#CS5',
     'dbname'   => 'phpcs5');
  $read  = array('host'     => 'localhost',
     'username' => 'cs5read',
     'password' => '5T@rmaN',
     'dbname'   => 'phpcs5');
  // Comment out the next two lines if using mysqli
  // and remove the comments from the last two lines
  $dbWrite = new Zend_Db_Adapter_Pdo_Mysql($write);
  $dbRead = new Zend_Db_Adapter_Pdo_Mysql($read);
  //$dbWrite = new Zend_Db_Adapter_Mysqli($write);
  //$dbRead = new Zend_Db_Adapter_Mysqli($read);
catch (Exception $e) {
    echo 'Class: ' . get_class($e) . ' says: ' . $e->getMessage();
mail_connector.php:
<?php
$mailhost = 'smtp.mail.housecalls4pets.com';
$mailconfig = array('auth' => 'login',
      'username' =>'[email protected]',
     'password' => 'Buffy1481',
     'port'    => '2626');
$transport = new Zend_Mail_Transport_Smtp($mailhost, $mailconfig);
Zend_Mail::setDefaultTransport($transport);
process_comments.php
<?php
require_once('library.php');
$errors = array();
try {
  $public_key = '6LekzsUSAAAAAP99fQ32-j-qlp2wUWqeUc3_HvkX';
  $private_key = '6LekzsUSAAAAAHxKj135LEE9zoAxQng1A3azJYgE';
  $recaptcha = new Zend_Service_ReCaptcha($public_key, $private_key);
  if (isset($_POST['send'])) {
// validate the user input
if (empty($_POST['recaptcha_response_field'])) {
   $errors['recaptcha'] = 'reCAPTCHA field is required';
} else {
   $result = $recaptcha->verify($_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field']);
   if (!$result->isValid()) {
  $errors['recaptcha'] = 'Try again';
$val = new Zend_Validate_Alnum(TRUE);
if (!$val->isValid($_POST['name'])) {
   $errors['name'] = 'Name is required';
$val = new Zend_Validate_EmailAddress();
if (!$val->isValid($_POST['email'])) {
   $errors['email'] = 'Email address is required';
$val = new Zend_Validate_StringLength(10);
if (!$val->isValid($_POST['comments'])) {
   $errors['comments'] = 'Required';
if (!$errors) {
  // create and send the email
    require_once('mail_connector.php');
    $mail = new Zend_Mail('UTF-8');
    $mail->addTo('[email protected]', 'A N Other');
    $mail->setFrom('[email protected]', 'Zend Mail Test');
    $mail->setSubject('Comments from feedback form');
    $mail->setReplyTo($_POST['email'], $_POST['name']);
    $text = "Name: {$_POST['name']}\r\n\r\n";
    $text .= "Email: {$_POST['email']}\r\n\r\n";
    $text .= "Comments: {$_POST['comments']}";
    $html = "<p><strong>Name: </strong><a href='mailto:{$_POST['email']}'>{$_POST['name']}</a></p>";
    $html .= '<p><strong>Comments: </strong>' . nl2br($_POST['comments']) . '</p>';
    $mail->setBodyText($text, 'UTF-8');
    $mail->setBodyHtml($html, 'UTF-8');
    $success = $mail->send();
    if (!$success) {
      $errors = TRUE;
} catch (Exception $e) {
  echo $e->getMessage();
?>
comments.php:
<?php
require_once('scripts/process_comments.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Contact Us</title>
<link href="../../styles/users_wider.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Get In Touch</h1>
<form id="form1" name="form1" method="post" action="">
  <?php if (isset($success) && !$errors) { ?>
  <p>Thank you. Your comments have been sent.</p>
  <?php } elseif (isset($success) && $errors) { ?>
  <p>Sorry, there was a problem. Please try later.</p>
  <?php } ?>
  <p>All fields are required</p>
  <p>
    <label for="name">Your name:</label>
    <input value="<?php if ($_POST && $errors) {
  echo htmlentities($_POST['name'], ENT_COMPAT, 'UTF-8');
}?>" type="text" name="name" id="name" />
    <span>
    <?php if ($_POST && isset($errors['name'])) {
    echo $errors['name'];
} ?>
    </span></p>
  <p>
    <label for="email">Email address:</label>
    <input value="<?php if ($_POST && $errors) {
  echo htmlentities($_POST['email'], ENT_COMPAT, 'UTF-8');
}?>" type="text" name="email" id="email" />
  <span>
  <?php if ($_POST && isset($errors['email'])) {
    echo $errors['email'];
} ?>
  </span></p>
  <p>
    <label for="comments">Comments:</label>
    <textarea name="comments" id="comments" cols="45" rows="5"><?php if ($_POST && $errors) {echo htmlentities($_POST['comments'],ENT_COMPAT, 'UTF-8'); }?></textarea>
  <span>
  <?php if ($_POST && isset($errors['comments'])) {
    echo $errors['comments'];
} ?>
  </span></p>
  <?php if (isset($errors['recaptcha'])) {
    echo "<p><span>{$errors['recaptcha']}</span></p>";
  echo $recaptcha->getHtml(); ?>
  <p>
    <input type="submit" name="send" id="send" value="Send Comments" />
  </p>
</form>
</body>
</html>

Similar Messages

  • Heart beat could not open connection, error code 110

    Hi, where can I find error codes for NFR and NSM?
    I have problems with some agents connecting to the engine:
    2/17/2010 16:02:55 EngineInterface: Heart beat could not open connection, error code 110
    Both engine and agent runs on the same server (10.236.19.147):
    AgentNCP Service Config
    Host Address: 10.236.19.147
    Service Ports: HTTPS: 3037 HTTP: 0
    Data Path: /var/opt/novell/filereporter/agentncp
    Debug Logging: Enabled
    Heartbeat: 60 seconds
    Engine Address: 10.239.19.147:3035
    Use SSL: Yes
    Alternate Hostname: huanovellfs1
    Engine Service Config
    Host Address: 10.236.19.147
    Service Ports
    Client HTTPS: 3033 HTTP: 0
    Agent HTTPS: 3035 HTTP: 0
    Data Path: /var/opt/novell/filereporter/engine
    Debug Logging: Enabled
    Heartbeat: 60 seconds
    DSI Address: 10.236.19.89:8009
    Use SSL: Yes
    Scans per Volume: 2
    Another OES2 server connects fine to the engine, butI have a Netware agent, which also fails to connect:
    Feb 17, 2010 4:08:11 PM SR Interface: Heart beat could not open connection.
    NFR is 1.0.0
    Thanks for any input.
    Istvan

    Hi Istvan! Sorry for the delay in our response! we are in the process
    of building a list of error codes for everyone! in the meantime the 110
    means the following:
    // Couldn't create a new network interface
    #define CC_STATUS_CCS_CANT_CREATE 110
    Is this an NSM integration installation?
    Also, remove the alternate hostname.
    If you don't mind, let's move this support issue to
    filereporter"@"novell.com!
    Thank you!
    icseke wrote:
    > Hi, where can I find error codes for NFR and NSM?
    >
    > I have problems with some agents connecting to the engine:
    >
    > 2/17/2010 16:02:55 EngineInterface: Heart beat could not open
    > connection, error code 110
    >
    > Both engine and agent runs on the same server (10.236.19.147):
    >
    >
    > AgentNCP Service Config
    > ------------------------------------------------------------------------------
    > Host Address: 10.236.19.147
    > Service Ports: HTTPS: 3037 HTTP: 0
    >
    > Data Path: /var/opt/novell/filereporter/agentncp
    > Debug Logging: Enabled
    > Heartbeat: 60 seconds
    > Engine Address: 10.239.19.147:3035
    > Use SSL: Yes
    > Alternate Hostname: huanovellfs1
    >
    > Engine Service Config
    > ------------------------------------------------------------------------------
    > Host Address: 10.236.19.147
    > Service Ports
    > Client HTTPS: 3033 HTTP: 0
    > Agent HTTPS: 3035 HTTP: 0
    >
    > Data Path: /var/opt/novell/filereporter/engine
    > Debug Logging: Enabled
    > Heartbeat: 60 seconds
    > DSI Address: 10.236.19.89:8009
    > Use SSL: Yes
    > Scans per Volume: 2
    >
    > Another OES2 server connects fine to the engine, butI have a Netware
    > agent, which also fails to connect:
    >
    > Feb 17, 2010 4:08:11 PM SR Interface: Heart beat could not open
    > connection.
    >
    > NFR is 1.0.0
    >
    > Thanks for any input.
    >
    > Istvan
    >
    >

  • Could not open file error on Copy Express

    Hi Experts,
    Im using Copy Express to copy Item Master from origin db to target db.
    Right now, I am only copying 1 item (I have tried several and a variety, but still the same) and I hit a "Could not open file" error, it has some chinese characters. And I cant make out what is the meaning or why the error is appearing.
    Before this error, I also see a "XML ERROR" on the status that dissappear very quickly upon showing. Then next is this error message.
    [Click here to view screenshot|http://www.flickr.com/photos/45736280@N07/5077898618/sizes/l/in/photostream/]
    Please help and Thanks!
    Warmest Regards,
    Chinho

    Hi,
    The item is able to copy using copy express but you must make sure that there is no exclamation sign before run it.
    The maximum item can be copied is limited in the copy express. it is just only 2,000 items.
    I suggest to use data transfer workbench.
    JimM

  • SAp J2ee Engine-Could not open MMC: error"could not open libsapu16vc71.dll"

    Hi,
    When I am trying top open MMC console to start the server getting an dialog box error "Could not open libsapu16vc71.dll". If I click OK its terminating.
    Any body have idea where I need to check the logs regarding this?
    please check this and help me.
    Thanks
    Venkat.

    Hi,
    Check following link.
    [Re: Can't access MMC;

  • Could not open key error

    I am having a problem installing iTunes 7. I get to the final stages of the upgrade then I get an error message that says
    "Could not open key:
    HKEYLOCALMACHINE\Software\Classes\QuickTimePlayerLib.QuickTimePlayerApp\CLSID. Verify that you have sufficient access to that key, or contact your support personnel."
    This is a home computer with no network. We have 3 users set up on XP.
    Please help, we have been trying to upgrade for 3 days!!!

    even though you're not getting a 1406 or 1402 error message number with this, try the techniques from this page:
    Error 1406 or 1402 appears when you install iTunes or QuickTime for Windows

  • Could Not Open Key Error over and over and over

    Error Message- "Could Not Open Key HKEYLOCALMACHINE\SOFTWARE\CLASSES\QuickTimePlayerLib.QuickTimePlayerApp\CLSID"
    Just got a new IPOD for Xmas but can't install Itunes. I think the problem is Quicktime. I have been searching in this discussion for people with the same problem and I have tried everything. I tried giving myself access in the registry editor but it won't let me. It says "Cannot save permission changes.......Access is denied." I tried deleting all the Quicktime files but it says "cannot delete files.....error while deleting." I have even tried the response to the 1400's error messages but nothing works. Also installing Quicktime by itself, same thing. Same error message over and over. Please help!!!!
    Compaq PC   Windows XP  

    oh my god please help!!

  • Could not open (SQL) error log on passive cluster node

    Hi. We have SCCM 2012 SP1 installation using clustered SQL instance running on 2-node SQL Server 2012 cluster.
    On the passive SQL node that's not running the SCCM SQL instance, there are repeated errors in the eventlog with ID 17058, source MSSQL$SCCM: "initerrlog: Could not open error log file 'K:\MSSQL11.SCCM\MSSQL\Log\ERRORLOG'. Operating system error = 3(The
    system cannot find the path specified.)."
    While searching I've found out this is caused by the "SMS_SITE_SQL_BACKUP_<siteservername>" service that is registered on both SQL nodes and has startup type of Automatic and therefore is running on both nodes simultaneously.
    In the smssqlbackup.log file on the passive node, there are errors "SMS_SITE_SQL_BACKUPFailed to start SQL Server.Error code = 0x0.", which make sense, since the SQL instance is already running on the second node. Therefore it fails.
    This seems like a very bad design bug, can it be prevented/fixed? I could configure our monitoring system to ignore this error, but I would rather not...
    Why is that service running on both (all) SQL cluster nodes simultaneously? Why isn't it made part of the cluster resource group or something like that?

    Try on the passive node remove: SQLServer Name\InstanceName
    From the registry:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\Components\SMS_SITE_SQL_BACKUP_<SiteServer>\SQL
    Server Instance.

  • Could Not Open Handler Error Message

    Any suggestions on what to do after receiving the "could not open handler. system memory is probably very low" error message.
    The weird thing is the project I was working on worked fine, never receiving that message. Then, I returned to the project after a two week break and now I receive that message.
    Any help would be greatly appreciated.

    David, Thanks for the reply.
    I'm guessing by project details you're asking about DV/HDV etc etc.
    The project is a play/show that was taped from two cameras each about 2hrs long. In addition, there are over 7 hrs of behind the scenes footage. The show is shot in regular DV, and the behind the scenes footage is in DV but has 4:3 and 16:9 footage intermixed. I've edited the show sequence, the behind the scenes sequence, a gag reel sequence, and a slideshow sequence.
    I'm doing all this on a MacPro 3.0 GHz Dual-Core Xeon 4GB Ram.
    If there is more information needed please let me know. Thanks for your patience, first time you know
    David

  • Cant install itunes 10.5 keep getting Apple Aplication Support - could not open key error

    I ve been getting this message over and over:
    Apple Application Support
    Could not open key:
    UNKNOWN\Components\DA42B......................
    Verify that you have sufficient access to that key, or contact your support personnel
    I have uninstalled all Apple soft and tryed to reinstall itunes 10.5, but there is no help. I run win 7 64 on toshiba notebook

    Open regedit using "run as administrator".
    Go to the registry key:
    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionInstallerUserDataS-1-5-1 8Components
    ...and selected the folder DA42BC89BF25F5BD0AF18C3B9B1A1EE8
    (there are three folders with very similar names A,B & C you want the first one)
    Right click & choose Permissions
    Click Advanced, and then the Owner tab
    Type  (not administrators) in current owners field and check the box to replace the owner on subcontainer and volumes
    Apply settings and then click Permissions tab. Once again, add  (not administrators) to the list of permission entries, then click edit and check all permission boxes. Also click the 2 bottom boxes concerning the inheritable permissions.
    [Note: In my case I was a member of administrators and administrators was already set in all of the above settings - I've no idea why it needed to be set to my user rather than the administrator group, anyway it solved the problem for me]
    Click OK
    Now back on the main permissions tab, add  in the user name window and then check full control and read checkboxes. Click OK.
    On the menu bar click file > exit
    But if u have the message pop up more then once then just make the permissions for the entier S-1-5-18Components folder

  • Could not open key error installing itunes

    I get this requester saying that a registry key can not be accessed when trying to install itunes/quicktime. Just got a nano and am trying to load the app to load music.
    See this link foe the requester...
    http://www.edward-ramos.net/images/itunesError.jpg
    I have tried, several times, to uninstall useing the procedure outlined in the support section but no luck. I am installing with Admin account and also tried with a different named account with admin access.
    pc   Windows XP Pro  

    even though you're not getting a 1406 or 1402 error message number with this, try the techniques from this page:
    Error 1406 or 1402 appears when you install iTunes or QuickTime for Windows

  • Itunes application could not open. Unknown error ocurred (-50)

    Since this morning im having trouble accesing my itunes due to the error (Itunes application could not open.Unknown error ocurred (-50)). I restarted the computer, unistalled and installed the current version of itunes and still have the error. Do any of you know how to solve this problem?

    My Itunes doesnt work either.
    It doesnt start.
    This program doesnt work and will be closed.
    I have uninstalled and whaited a week and installed again, but it doesnt work.'
    What am i going to do?
    HELP

  • I am trying to download iTunes on to my laptap but I keep getting a "Could not open key: UNKNOWN\Components\ with a bunch of numbers and letters following.  I have uninstalled all the iTunes programs. I changed the Regedit but I still get the error?

    I am trying to download iTunes to my laptop but I keep getting this "Could not open key: UNKNOWN\Components\ followed by a bunch of numbers and letters.  I have unistalled iTunes and all the other apple componants.  I also used followed this http://discussions.apple.com/docs/DOC-3581. But I am still getting the same "Could not open key:" error and it tells me that iTunes could not download.

    On occasion, when changing ownership or permissions has no effect on the UNKNOWN\Components\ error, the fixit from the following Microsoft document sometimes works:
    Fix problems with programs that can't be installed or uninstalled

  • IP Softphone Error " Could Not Open Address Cisco Line "

    I am setting up IP Softphone Version 1.3(3). My CallManager version is 3.1.3a.
    The Problem:
    I have created a CTI Port for this user, and added both his DN line appearances to this CTI Port.
    I have created a user profile for the user and associated the USER_CTI with that user. Checked off "Enable CTI" etc.
    What happens though is that when I launch Softphone and go to select my lines it will only allow me to select only 1 of the 2 line appearance not both.
    If I select both I receive and error " Could Not Open Address Cisco Line: [User_Cti] DN#
    However if I associate the user profile with his physical phone device not the User_Cti, I can get both line appearances up and running on his softphone. This is not desired though because whatever you do on the softphone happens on the physical phone (such as going off-hook brings dial tone on the Physical IP Phone.
    Is this a limitation when using CTI ports that you can only associate 1 DN to a softphone? or am I doing something wrong?
    Any Ideas
    Thanks in advance
    LSmith eTAC Telus

    As outlined in the SoftPhone Admin Guide, it states that you may receive the "Could Not Open Address Cisco Line" error if another application has that line open. I confirmed that this is NOT the case by creating a totally new User Profile and New DN's, and then trying to link that CTI Port to Softphone. I still received the same error.
    Cisco Article:
    I Can See a Line But When I Try To Open it, Cisco IP SoftPhone Displays a 'Could not open address' Error.
    Possible Cause This error typically occurs if another application has already opened the line (locally or on another computer), or the line is out of service. Each line can be opened only once. If the line has been opened before and the line is now out of service, the line will automatically go back in use. You do not have to do anything. If you tried to open a line that is out of service, you may need to restart the Telephony service and launch Cisco IP SoftPhone again.
    Recommended Action Restart the Telephony service. See the "Restart the Telephony Service" section.
    I tried and tested this once again no change.
    Sincerely
    LTSmith Telus eTAC

  • ITunes fails to update - 'Could not open key...'

    I am having trouble installing the latest iTunes update bith through Apple Update and by trying manually.
    I get a 'could not open key' error followed by 'UNKNOWN/components/.......'
    Quicktime updates fine but Safari 5, iTunes and iCloud Control Panel all failed with the same message.
    I am completely stuck.

    Let's try the following user tip with that one:
    "Could not open key: UNKNOWN\Components\[LongStringOfLettersAndNumbers]\[LongStringOfLettersAndNumbe rs]" error messages when installing iTunes for Windows

  • Every time I download anything I get an error message stating ...could not open ....dmg because it is either not a supported file type or the file has been damaged." What do I need to do to fix this problem?

    For the last month or so, every time I download anything I get an error message stating "........could not open ...... .dmg because it is either not a supported file type or because the file has been damaged...." I do not know what to do to fix this issue. Any ideas?

    hmmm.... try this
    basic troubleshooting:
    Repair Disk Permissions http://support.apple.com/kb/PH5821
    Repair Disk http://support.apple.com/kb/ht1782
    reset ACLs http://osxdaily.com/2011/11/15/repair-user-permissions-in-mac-os-x-lion/

Maybe you are looking for

  • Trouble connecting my lumia 920 to my nokia suite ...

    my new lumia will not connect to my nokia suite? does anyone know why this happens and how to resolve it. thank you Solved! Go to Solution.

  • Mavericks mail reply message disappears from screen

    Using Mavericks 10.9.1 and mail, when I hit reply to a message, the reply window pops up and disappears from the screen not to be brought forward again even though it is listed in the window dropdown. This action only occurs when I have my MacBook Pr

  • Startup Crash - Adobe Media Core CS6

    I tried to start it up yesterday and It  just crashed. It attempts to load most of the GUI before just giving up. Upon further inspection I found out that the crash seems to be related to Adobe Media Core CS6. I include the Problem Details. Problem D

  • DO NOT UPDATE to 10.4.10

    After installing, I have experienced nothing but a slow computer and some other driver screw ups.

  • Any way(s) to get sql query?

    Hello, I'm trying to research on some data generated from Crystal Report some time ago  (no sure how old or what version it's developed in).  I'm trying to find the sql query so I know how and where the data were coming from.  I've downloaded a trial