php.ini file editing

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I need your knowledge,

I want to add to my website php.ini file to change the settings of my
mail() function so that my function is working fine except that the
sender email is not my user but so Someone
told me that its easily edited using php.ini but he dont know how, so
I thought that you could help me in this situation.

more details about my hosting:
- Linux host
- php 4.4.6
- apache

thanks for your help in advance

Re: php.ini file editing

shror wrote:
Quoted text here. Click to load it


Well, php.ini is edited by any texteditor (try nano or pico on *nix  
hosts for simple editing).
But chances are you cannot edit it because you do not have permissions.

And you don't 'add php.ini' to your php installation, it is already there.
Try the function phpinfo() to get detailed information concerning it  
whereabouts. ;-)

And can you not just add a From in your emailprogram instead of using  

Erwin Moller

Re: php.ini file editing

On Aug 27, 5:08 pm, Erwin Moller
Quoted text here. Click to load it

I tried to add from in my code but its not working so i thought of
using the php.ini
I thought that if i added php.ini to my root directory (inside /
public_html/) things will work fine???

anyway thanks for your info I will try on changing my code once more
to check it again

Re: php.ini file editing

Quoted text here. Click to load it

        Okay, in the php.ini the setting is as follows:

sendmail_from =

        But this should just be a default if you don't specify. I
doubt the hosting provider will change it on their servers.  In your
local .htaccess file you may be able to give the variable a new value
(but I'm not sure).  You would not have local php.ini, the system
won't read it as long as the provider has one installed.

        Like the other guy, your best bet is just to get the
From part of the mail function working.  You shouldn't have any
trouble setting the from there (the fourth parameter allows
you to add additional headers):

mail($msgTo, $msgSubj, $msgTxt, "From: $msgFrom")

        Best regards!
John Murtari                              Software Workshop Inc.
jmurtari@following domain 315.635-1968(x-211)  "TheBook.Com" (TM)

Site Timeline