ZF-7728: File "Zend/Validate/Hostname/Com.php" does not exist or class "Zend_Validate_Hostname_Com" was not found in the file

Issue Type: Bug Created: 2009-08-31T02:36:08.000+0000 Last Updated: 2009-09-18T04:57:45.000+0000 Status: Resolved Fix version(s): Reporter: Jean-Francois Monfort (jief) Assignee: Nico Edtinger (nico) Tags: - Zend_Mail

Related issues: Attachments:


When I create a new instance of Zend_Mail_Transport_Smtp() with the first parameter a .com domain I got these error ;

File "Zend/Validate/Hostname/Com.php" does not exist or class "Zend_Validate_Hostname_Com" was not found in the file

here is my code

$t = new \Zend_Mail_Transport_Smtp('');

$mail = new \Zend_Mail(); ... $mail->send($t);


Posted by Thomas Weidner (thomas) on 2009-08-31T05:56:28.000+0000

When you are getting this error than you don't use ZF 1.9.x. Check your installation. This file is provided and available since ZF 1.8.x

Posted by Jean-Francois Monfort (jief) on 2009-08-31T06:42:05.000+0000

I am using the 1.9.2 version. The file Zend/Validate/Hostname/Com.php is available but there are no Class, only a return array();

Posted by Thomas Weidner (thomas) on 2009-08-31T09:12:24.000+0000

Of course is there only an array and no class.

Looking into Zend_Validate_Hostname around line 417 you will see that the file is included by calling include 'Zend/Validate/Hostname/Com.php'. This way the regex from this file is assigned to be searched through. It's no class file but a ressource file.

As the file can not be found in your system it seems that you have eighter a configuration problem or no access to the related directory or you've mixed several versions of Zend Framework.

Posted by Benjamin Eberlei (beberlei) on 2009-09-18T04:57:45.000+0000

I close this issue since no further feedback is given and after a review i think the code must work as thomas described it.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.