ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have this error PHP Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in D:\INETPUB\VHOSTS\buybesttoys.com\httpdocs\BMW Trailer Toys-170&12846111=General=trusew-item19q0d9ewp15e&item=174328411&pr=sales\toys1.php on line 19
==============================================================
I WILL APPRECIATE IF ANYONE CAN HELP ME WITH MY ERROR REGARDING THE PHP SCRIPT THAT I HAVE PUT.
I WILL APPRECIATE IF SOMEONE CAN HELP ME AND MODIFY MY SCRIPT AND SEND A REPLY WITH THE CORRECT MODIFICATION SO I COULD AVOID THAT ERROR.
I'm new to all those things.Thank you in advance for your help.
What version of window$ is this, and how is that a Linux question? You will generally do best to ask in the appropriate forum.
From reading the error (highly recommended) I'd say that you need to set sendmail_from in the php.ini or add a custom From header... but that is just a guess.
And just a comment, but it is generally a very bad idea to allow unscrubbed POST data to be used directly in a script - particularly a mail script - guaranteed to make your server a spam bot.
Finally, your question is only urgent to yourself. Please read this page to improve your title and get the best resposnes.
Last edited by astrogeek; 09-11-2015 at 02:50 PM.
Reason: added comments, typos
Thank you astrogeek for your answer.
I know is not a linux question but I have made a search on google regarding the error and I saw this site.
I'm sorry if was not a linux question but I thought someone will help me.
I use windows 7.
I do not know how to set sendmail_from in the php.ini or add a custom From header.
Can you please write a script as you explained to see.
Regarding that is very bad idea to allow unscrubbed POST data to be used directly in a mail script - guaranteed to make my server a spam bot can you please tell me what I must do to change that.
Again I'm new to all of this and I will appreciate if you can help me.
Thank you for all in advance.
What version of window$ is this, and how is that a Linux question? You will generally do best to ask in the appropriate forum.
From reading the error (highly recommended) I'd say that you need to set sendmail_from in the php.ini or add a custom From header... but that is just a guess.
And just a comment, but it is generally a very bad idea to allow unscrubbed POST data to be used directly in a script - particularly a mail script - guaranteed to make your server a spam bot.
Finally, your question is only urgent to yourself. Please read this page to improve your title and get the best resposnes.
Thank you astrogeek for your answer.
I know is not a linux question but I have made a search on google regarding the error and I saw this site.
I'm sorry if was not a linux question but I thought someone will help me.
I use windows 7.
I do not know how to set sendmail_from in the php.ini or add a custom From header.
Can you please write a script as you explained to see.
Regarding that is very bad idea to allow unscrubbed POST data to be used directly in a mail script - guaranteed to make my server a spam bot can you please tell me what I must do to change that.
Again I'm new to all of this and I will appreciate if you can help me.
Thank you for all in advance.
Thank you astrogeek for your answer.
I know is not a linux question but I have made a search on google regarding the error and I saw this site.
I'm sorry if was not a linux question but I thought someone will help me.
I use windows 7.
As this is a PHP question, the answer for Linux may be the same, although there are important differences (enough that I could tell you were using that other OS!).
It is also a programming question so I'll request the the thread be moved to the programming forum.
Quote:
Originally Posted by brownepaul11
I do not know how to set sendmail_from in the php.ini or add a custom From header.
Can you please write a script as you explained to see.
Short answer, no. Asking others to write your script for you is not going to win you any friends, and will draw a hostile response in many forums (not so much here... but sometimes).
First of all, no one else knows anything about your operating environment, server constraints, security, etc., etc... it raises many issues of security, liability, general confusion...
Second, no one is going to do your work for you - we all have our own jobs and volunteer time here. So while we are willing to help with specific issues, we are generally not willing to take on responsibility for your job too!
Third, if someone else does it for you, you will not learn. You are administering a web facing server, a mail server at that, and it is absolutely essential that you understand how it works and is configured.
Quote:
Originally Posted by brownepaul11
Regarding that is very bad idea to allow unscrubbed POST data to be used directly in a mail script - guaranteed to make my server a spam bot can you please tell me what I must do to change that.
Again I'm new to all of this and I will appreciate if you can help me.
Thank you for all in advance.
That is a huge and important subject that cannot be answered in a forum post. But it is also #1 on the list of things you need to learn before exposing a server to the internet!
I strongly urge you to spend the day researching "form data validation", "post data scrub", "php spam", "php exploits", "securing php mail", "cross site scripting", open mail relay"... and dozens of others that will show up in the process. Here is what looks like a place to start, but you need to grasp the concepts - and there are many!
The internet is a hugely active hostile envronment with literally millions of bots scanning for exploitable sites and scripts. Yours will be found and exploited within a few minutes to a few hours if not properly secured.
Please do not contribute to that problem - learn how it works before walking onto the battlefield or you will be recruited by the forces of darkness rather quickly!
As this is a PHP question, the answer for Linux may be the same, although there are important differences (enough that I could tell you were using that other OS!).
It is also a programming question so I'll request the the thread be moved to the programming forum.
Short answer, no. Asking others to write your script for you is not going to win you any friends, and will draw a hostile response in many forums (not so much here... but sometimes).
First of all, no one else knows anything about your operating environment, server constraints, security, etc., etc... it raises many issues of security, liability, general confusion...
Second, no one is going to do your work for you - we all have our own jobs and volunteer time here. So while we are willing to help with specific issues, we are generally not willing to take on responsibility for your job too!
Third, if someone else does it for you, you will not learn. You are administering a web facing server, a mail server at that, and it is absolutely essential that you understand how it works and is configured.
That is a huge and important subject that cannot be answered in a forum post. But it is also #1 on the list of things you need to learn before exposing a server to the internet!
I strongly urge you to spend the day researching "form data validation", "post data scrub", "php spam", "php exploits", "securing php mail", "cross site scripting", open mail relay"... and dozens of others that will show up in the process. Here is what looks like a place to start, but you need to grasp the concepts - and there are many!
The internet is a hugely active hostile envronment with literally millions of bots scanning for exploitable sites and scripts. Yours will be found and exploited within a few minutes to a few hours if not properly secured.
Please do not contribute to that problem - learn how it works before walking onto the battlefield or you will be recruited by the forces of darkness rather quickly!
I moved the question to the programming forum as you told me and I will close this one .Thank you for your help and for guide me to do what is correct.
Please use the REPORT button to request that your thread be moved by a moderator versus create a parallel post. Understand that your question is written poorly, you need to better describe the set up and conditions better. I'd recommend a rewrite as well as a thread-name change. Because "URGENT!! HELP ME!" or something similar while it gets attention, it draws the cynics of us out of morbid curiosity and we are generally not surprised to find a poorly written question, or many of the various other not recommended practices.
The best things to do are to:
- Use a more coherent thread title, and you can change your thread title
- Describe the system, the origin of the problem, what you were doing, and what you intentions were
- Describe what you have done to attempt to resolve the problem
- Await some feedback, as has been given. Starting parallel threads will hurt your cause because experienced forum members will discover them, and then maybe this thread, or the other one(s) will be closed, thus making for confusion, separated follow-up questions, and disjoint advice.
- Whatever you say about urgent, well sorry. As Astrogeek has explained, people here are volunteers, they probably have various participation times that are common for them, and your problem appears to be unusual enough such that a solution may take some back and forth changes, or attempts, and further there are likely few persons here who may have the right placed knowledge of that highly particular situation to give you a fast, simple answer. One may not exist in fast, simple form.
Moved: This thread is more suitable in <PROGRAMMING> and has been moved accordingly to help your thread/question get the exposure it deserves. It was also renamed along the way - the original title was heartfelt but meaningless.
Moved: This thread is more suitable in <PROGRAMMING> and has been moved accordingly to help your thread/question get the exposure it deserves. It was also renamed along the way - the original title was heartfelt but meaningless.
Okay if you have moved to programming thank you because is my first time when I use a site like this and I do not know all the rules.
I'm sorry for my mistakes and thank you again for all your help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.