PHP: ini_set();

Hy!

I have a little problem, that is about php.ini. The SMTP is localhost and want change it during the script. I think it’s possible by using the function ini_set();… i am doing this but doesn’t work:

ini_set ("STMP","stmp.apie.pt");

The PHP version in server is 4.0.6, and i don’t have the possiblity to change that option in php.ini, that 's why i want to change it during the script.

thks

according to the manual you can’t set that during a script.

http://us3.php.net/manual/en/function.ini-set.php

that should give you all the info you need. :slight_smile:

thks, but u know how to change this option?

hmmm, it does say that it can be set anywhere… why do you need to set it? Maybe we can find a workaround…

I need to change it because want to send a e-mail and doesn’t work because the option is ‘localhost’, as u can se it www.apie.pt/klog/info.php :expressionless:

I don’t think that is your problem. My server is set to localhost as well and I send e-mails like crazy…

http://www.bluefinatlantic.com/chmod.php

It might be that your server has the mail() function disabled. Many servers do that to deter spammers from sending out mass mails. You might just want to check with them…

or is it working, just not 100% accurately?

hmmm…maybe that’s problem. I will talk with system adminstrator to resolve this problem…

thks for the help

Look, the function mail is like that:

$message=“hello world!”;
mail("nunoleao@mail.com", “the subject”, $message,
"From: webmaster@{$_SERVER[‘SERVER_NAME’]}
"
."Reply-To: webmaster@{$_SERVER[‘SERVER_NAME’]}
"
.“X-Mailer: PHP/” . phpversion());

isn’t it ?

jesuz it was a mistake!!

it work good! 2h lost in this grrrrr

jebba thks for everthing, u really are a nice person!

sorry, *jubba :slight_smile:

I’m glad you figured it out. ! :slight_smile: