scriptjet Posted January 18, 2011 Share Posted January 18, 2011 Ok, totally new to PHP and am needing some serious help with PHP.ini and my godaddy account. I have no idea how to set a php.ini file in godaddy. there are tons of articles about it online and none of them have worked for me. the big thing i am trying to do is mail from a php script, and nothing i have done is working. godaddy says they do not offer support for php related stuff. but i have gathered that i need to put my own .ini file in my root directory to change the settings. but do i need to make a whole new .ini file, or can i just adjust the settings that i want to change? and do i just upload the .ini in the root directory of my website? when i do <?php phpinfo(); ?> on my site it shows that the configuration file is located in c:\windows... how is this possible? it's located at http://itgetsbetter.tsagl.org/phpinfo.php any and all help will be greatly appreciated. i'm sure this is trivial for most of you, but i am new to all this and trying to learn as much as possible. thanks in advance for the time Quote Link to comment https://forums.phpfreaks.com/topic/224845-extreme-noob-questions/ Share on other sites More sharing options...
Pikachu2000 Posted January 18, 2011 Share Posted January 18, 2011 If it's just the mail issue you're trying to solve, have you tried setting the optional fifth parameter in the mail function? EDIT: what actually is the issue you're trying to solve with this? Quote Link to comment https://forums.phpfreaks.com/topic/224845-extreme-noob-questions/#findComment-1161374 Share on other sites More sharing options...
scriptjet Posted January 18, 2011 Author Share Posted January 18, 2011 the main issue i'm trying to solve is getting my mail function to work in my godaddy account. everything i have read on this says i need to change the .ini file, but i have had no luck at getting this to work. Quote Link to comment https://forums.phpfreaks.com/topic/224845-extreme-noob-questions/#findComment-1161381 Share on other sites More sharing options...
Pikachu2000 Posted January 18, 2011 Share Posted January 18, 2011 Change it to what? Quote Link to comment https://forums.phpfreaks.com/topic/224845-extreme-noob-questions/#findComment-1161383 Share on other sites More sharing options...
scriptjet Posted January 18, 2011 Author Share Posted January 18, 2011 that's what i am trying to figure out. when i look at the phpinfo screen it says that the smtp is set to localhost and that the sendmail_from has no value. i'm assuming that this is a big part of why the mail function is not working Quote Link to comment https://forums.phpfreaks.com/topic/224845-extreme-noob-questions/#findComment-1161389 Share on other sites More sharing options...
Pikachu2000 Posted January 18, 2011 Share Posted January 18, 2011 The value 'localhost' may be fine on that server; try it that way first. For the sendmail_from parameter, you can specify that as the optional fifth parameter of the mail function: '-faddress@server.com' You should definitely read the manual entry linked to above; the implementation of mail() on WinD'ohs has some differences from other operating systems that you need to be aware of. Quote Link to comment https://forums.phpfreaks.com/topic/224845-extreme-noob-questions/#findComment-1161397 Share on other sites More sharing options...
scriptjet Posted January 18, 2011 Author Share Posted January 18, 2011 i got the mail function to work, now i need to change the "from". right now it says the message is from noreply@secureserver.net... i need it to say it is from my e-mail address. Quote Link to comment https://forums.phpfreaks.com/topic/224845-extreme-noob-questions/#findComment-1161416 Share on other sites More sharing options...
Pikachu2000 Posted January 18, 2011 Share Posted January 18, 2011 Are you setting the 'From:' header as a valid address on your server? Post the code you're using, with any passwords/sensitive info removed. Quote Link to comment https://forums.phpfreaks.com/topic/224845-extreme-noob-questions/#findComment-1161421 Share on other sites More sharing options...
scriptjet Posted January 18, 2011 Author Share Posted January 18, 2011 mail("scriptjet@gmail.com", "Testing", "Just Seeing if this works", "-finfo@tsagl.org"); here is the line that i am using. info@tsagl.org is a valid e-mail address on my server and that's the address i need the from line to read. Quote Link to comment https://forums.phpfreaks.com/topic/224845-extreme-noob-questions/#findComment-1161426 Share on other sites More sharing options...
Pikachu2000 Posted January 18, 2011 Share Posted January 18, 2011 See what happens with this . . . mail("scriptjet@gmail.com", "Testing", "Just Seeing if this works", "From: info@tsagl.org", "-finfo@tsagl.org"); Quote Link to comment https://forums.phpfreaks.com/topic/224845-extreme-noob-questions/#findComment-1161477 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.