Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"sendmail_from" not set in php.ini or custom "From:" header missing


Guest

Recommended Posts

Posted

Hi

 

I have a problem where a client recently backed up his osCommerce dB, and subsequently emails are not being sent from osCommerce, while this maybe coincidence and the mail problem may have been occuring previously he is quite anxious to resolve the issue.

 

The error is as follows

 

Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in D:\webworld\henrystackleshop\henrystackleshop.com\www\oscommerce\includes\classes\email.php on line 502

 

This is followed by a message stating headers could not be sent as they had already which I believe is due to the above error.

 

Any help in resolving this would be greatly appreciated.

Posted
Hi

 

I have a problem where a client recently backed up his osCommerce dB, and subsequently emails are not being sent from osCommerce, while this maybe coincidence and the mail problem may have been occuring previously he is quite anxious to resolve the issue.

 

The error is as follows

 

Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in D:\webworld\henrystackleshop\henrystackleshop.com\www\oscommerce\includes\classes\email.php on line 502

 

This is followed by a message stating headers could not be sent as they had already which I believe is due to the above error.

 

Any help in resolving this would be greatly appreciated.

Look in the php.ini file for the sendmail_from definition. The php.ini file is typically located in the top level directory of the website (which I assume is D:\webworld\henrystackleshop\henrystackleshop.com\www\oscommerce). If the file is not in the top level directory, you'll have to ask the hosting company where it is; it all depends on how the web server is configured.

 

Ben

Posted
Look in the php.ini file for the sendmail_from definition. The php.ini file is typically located in the top level directory of the website (which I assume is D:\webworld\henrystackleshop\henrystackleshop.com\www\oscommerce). If the file is not in the top level directory, you'll have to ask the hosting company where it is; it all depends on how the web server is configured.

 

Ben

 

Hi Ben,

 

I have logged a request with the webhost, as a matter of interest what should the value be set to in the php.ini? I take it on a shared server running php there is only 1 php.ini so would this have to hold a default value and if so should it be set to something like [email protected]?

 

Thanks again

Adam

Posted

I'm really beginner

 

could you please tell me where can i find php.ini

 

I simply do not know how to get here --> /usr/lib/php/php.ini

 

I will appreciate your help

 

thanks

sam

Posted
Hi Ben,

 

I have logged a request with the webhost, as a matter of interest what should the value be set to in the php.ini? I take it on a shared server running php there is only 1 php.ini so would this have to hold a default value and if so should it be set to something like [email protected]?

 

Thanks again

Adam

Adam,

 

It all depends on how the hosting company has the server configured. If they are running an older version of Apache and/or PHP there may only be one php.ini; however, all of the recent versions of Apache / PHP allow a website site specific php.ini (which is usual located in the top level directory of the site). Certain PHP parameter can only appear in the server wide file, and other parameters can appear in the site specific file.

 

This is not a parameter that should be defined in the server wide file. The parameter should be a defined to be a valid email address so that when the customer does a reply-to they wind up with a sendable email (e.g., [email protected]).

 

If your host company does not support a site specific file, the code can be updated to set the parameter dynamically.

 

Ben

Posted
I'm really beginner

 

could you please tell me where can i find php.ini

 

I simply do not know how to get here --> /usr/lib/php/php.ini

 

I will appreciate your help

 

thanks

sam

Sam,

 

You will not be able to access that file on your web server unless you have root privileges; that location is the server wide file. See my prior post in response to Adam. You need to place the statement in the site specific file.

 

Ben

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...