php.ini file editing
am 27.08.2007 14:46:33 von shror
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 nobody@hostingprovider.com 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
shror
Re: php.ini file editing
am 27.08.2007 16:08:21 von Erwin Moller
shror wrote:
> 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 nobody@hostingprovider.com 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
> shror
>
Hi,
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
php.ini?
Regards,
Erwin Moller
Re: php.ini file editing
am 28.08.2007 07:20:02 von shror
On Aug 27, 5:08 pm, Erwin Moller
wrote:
> shror wrote:
> > 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 nob...@hostingprovider.com 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
> > shror
>
> Hi,
>
> 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
> php.ini?
>
> Regards,
> Erwin Moller- Hide quoted text -
>
> - Show quoted text -
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
am 28.08.2007 18:22:24 von John Murtari
shror writes:
>>
>> > 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 nob...@hostingprovider.com 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
>>
>
> 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
>
Okay, in the php.ini the setting is as follows:
sendmail_from = me@localhost.com
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
____________________________________________________________ _______
John Murtari Software Workshop Inc.
jmurtari@following domain 315.635-1968(x-211) "TheBook.Com" (TM)
http://thebook.com/