We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5727
    • 160 Posts
    You said Windows and I can see that your hosting is inside the inetpub folder, so I’m assuming you’re running IIS? If so, you will need to ask your web server administrator to configure the IIS process’ user to have read+execute permission on cmd.exe. This could be a problem as, from a quick glance, you look like you’re on a virtual host, so this is probably a shared server.

    My original search led me to this post I found using the following keywords: proc_open windows CreateProcess failed
      Olivier Deland
      Montreal, Canada - Web Developer
      • 16317
      • 5 Posts
      Quote from: ConseilsWeb at Jun 03, 2007, 10:31 PM

      You said Windows and I can see that your hosting is inside the inetpub folder, so I’m assuming you’re running IIS? If so, you will need to ask your web server administrator to configure the IIS process’ user to have read+execute permission on cmd.exe. This could be a problem as, from a quick glance, you look like you’re on a virtual host, so this is probably a shared server.

      Hi, I spoke to my ISP’s Server Administrater and this was his reply - "I’m afraid i cant allow access to execute on cmd.exe and proc-open is extremely insecure".

      Looks like I will have to give Koops a miss.

      Thanks for your help,

      Kylie
        • 21112
        • 156 Posts
        Quote from: ConseilsWeb at Jun 02, 2007, 08:29 AM

        I wrote a post in this thread on how to add support for authenticated SMTP servers, just look somewhere between page 1 and page 7. wink

        Edit: here’s the link to my post: http://modxcms.com/forums/index.php/topic,6450.msg87717.html#msg87717


        Thanks for your help! I made the changes suggested in the post you linked to. When I now attempt to test a subscription entry to the form, the result after clicking submit is the following error:

        « MODx Parse Error »
        MODx encountered the following error while attempting to parse the requested resource:
        « PHP Parse Error »
         
        PHP error debug
          Error: 	fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known	 
          Error type/ Nr.: 	Warning - 2	 
          File: 	/home/httpd/vhosts/harryjenkins.com/httpdocs/assets/modules/koopsmailinglist/Swift/Swift/Swift_SMTP_Connection.php	 
          Line: 	145	 
          Line 145 source: 	$this->socket = @fsockopen($server, $this->port, $errno, $errstr, $this->connectTimeout); 	 
         
        Parser timing
          MySQL: 	0.0027 s	(6 Requests)
          PHP: 	0.4093 s	 
          Total: 	0.4120 s
        


        I’m assuming (but hoping not cos the clients web host SUCKS) that this is something I need to speak to the web host about? Reading about this error on other php forums (found with a google search of the error message) suggests I need to change my hosts file? I’m not sure what that is or if I have access to this.

        Thanks for the help getting this sorted out. My already impatient client is getting a bit too narky about this issue for my linking...

        Quote from: ConseilsWeb at Jun 02, 2007, 08:29 AM

        To helps figure out your problem, can you hover your mouse over one of these links and tell us what URL do you get in your status bar. It should look something like that: http://youhost.com/manager/index.php?a=112&id=3&p=0

        Aren’t I the red-faced one. Here I was simply editing that line in the comments of the snippet, thinking that was what I needed to do. I didn’t even see the "Configuration" tab. Once I got the line into the right place, it found the module without a problem. The instructions’ wording could possibly be changed slightly to make it more obvious where to put the configuration for blind people like myself.
          • 5727
          • 160 Posts
          It looks like an obscure bug with name resolving. Make sure the email server address contains no slashes or port number or anything else than the domain name, like this: mail.yourhost.com

          Another thing you could try is entering the IP address instead of the domain name, if possible. To find the IP, use something like http://www.dnsstuff.com (scroll down the page)
            Olivier Deland
            Montreal, Canada - Web Developer
            • 21112
            • 156 Posts
            Thanks a lot for the suggestion, I’ll look into it and let you know how I go!

            Thanks for the continued help smiley
              • 21112
              • 156 Posts
              I finally got word back from the host with the correct mail server address. The error that I was seeing has now gone, however (of course) a new one has come up. When subscribing I get notification that I’ll receive a confirmation email, which never comes. When I try to send an email via the module, I get the following error:

              Fatal error: Cannot instantiate non-existent class: swift_connection_smtp in /home/*path edited for privacy*/assets/modules/koopsmailinglist/admin.php on line 77
                • 5727
                • 160 Posts
                You probably forgot to add an include.

                Look for this line in both admin.php and functions.php
                require('Swift/Swift.php');

                And add this line after it:
                require('Swift/Swift/Swift_SMTP_Connection.php');	
                  Olivier Deland
                  Montreal, Canada - Web Developer
                  • 17459
                  • 268 Posts
                  Hello!

                  how to do it? when someone add a new article in category with ID=6, its pagetitle & introtext sends to all in maillist?
                  I added new plugin, but it doesn’t work.

                  <?php
                  /*
                   * News2email
                   *
                   * Version 1.0
                   *
                   */
                  
                  $e = &$modx->Event;
                  
                  switch($e->name) {
                  case 'OnDocFormSave':
                  $sql = 'SELECT `pagetitle`, `parent`, `introtext` FROM `modx_site_content` WHERE `id`='.$id;
                  $newdoc = $modx->db->query($sql);
                  $newdoc = $modx->db->getRow($newdoc);
                  if($newdoc['parent'] == 6) {
                  		require($modx->config['base_path'].'assets/modules/koopsmailinglist/Swift5/Swift.php');
                  		require($modx->config['base_path'].'assets/modules/koopsmailinglist/Swift5/plugins/Swift_Anti_Flood_Plugin.php');
                  		require($modx->config['base_path'].'assets/modules/koopsmailinglist/Swift5/Swift/Swift_SMTP_Connection.php');		
                  		$sql = "SELECT id, email FROM mail_subscribers";
                  		$result = $modx->db->query($sql);		
                  		$recipients = array();
                  		while($newArray = $modx->db->getRow($result)){
                  			array_push($recipients, $newArray['email']);	
                  		}
                  		$mail = new Swift(new Swift_SMTP_Connection('mail.entropia.us'));
                  		$mail->authenticate( 'alexander-sobaka-entropia.us', 'parol' );		
                  		$text = str_replace('/UserFiles','http://'.$_SERVER['HTTP_HOST'].'/UserFiles', $newdoc['introtext']);
                  		// convert [~ID~] urls 
                  //		$text = preg_replace_callback(
                  //			'!\[\~([0-9]+)\~\]!is',
                  //			create_function(
                  //				'$matches',
                  //				'global $modx; return $modx->makeUrl($matches[1],\'\',\'\',\'full\');'
                  //			), $_POST['tvmailMessage'], 1
                  //		);
                  		
                  		// Make URLs absolute
                  		$text = preg_replace("@(<\s*(a|img)\s+[^>]*(href|src)\s*=\s*[\"'])(?!http)([^\"'>]+)([\"'>])@","$1".$modx->config['site_url']."$4$5",$text);		
                  		if(!$mail->hasFailed()){
                  			$mail->loadPlugin(new Swift_Anti_Flood_Plugin(100, 30));
                  			//Make the script run until it's finished in the background
                  			set_time_limit(0); ignore_user_abort();			
                  			$mail->addPart($text, 'text/html');
                  			$mail->setCharset($modx->config['modx_charset']);
                  			$subject='=?UTF-8?B?'.base64_encode($newdoc['pagetitle']).'?=';
                  			$mail->send($recipients, '"'.$yourname.'" <'.$youremail.'>', $subject);
                  			$mail->close();
                  //			echo $sent.'.';
                  //		}else{
                  //			echo "The mailer failed to connect. Errors: ".print_r($mailer->errors, 1).". Log: ".print_r($mailer->transactions, 1);
                  		}		
                  }
                  break;
                  
                  default:
                  return;
                  break;
                  }
                  ?>
                  
                    • 27847
                    • 6 Posts
                    Quote from: elz64 at Nov 20, 2006, 04:06 AM

                    Can u confirm this is the outbound server only ( smtp )

                    Well, nice to know... what if my smtp server requires user authentication?
                      • 27847
                      • 6 Posts
                      KoopsMailinglistX makes my server to crash!