How To: mail() in php - Disablement ?

cdedicated

Verified User
Joined
Jan 7, 2004
Messages
44
How To: mail() in php - Disablement ?

I would like to disable "mail() in php" in order to prevent spamming from our server.
How do i able to do this?

Thanks a lot
CDedicated.com
 

l0rdphi1

Verified User
Joined
Jun 22, 2003
Messages
1,471
Haven't tried this, but in php.ini there is this setting:
; This directive allows you to disable certain functions for security reasons.
disable_functions =
So you ought to change that to:
Code:
disable_functions = mail
?
 

ProWebUK

Verified User
Joined
Jun 9, 2003
Messages
2,326
Location
UK
looks like that may work....

restart apache after making chnages also.

Chris
 

l0rdphi1

Verified User
Joined
Jun 22, 2003
Messages
1,471
cdedicated said:
where is this file?
and in which line should i add this command?
Should be /usr/local/lib/php.ini

If you use vi, you can
Code:
:find disable_functions
to locate the right spot.
 

cdedicated

Verified User
Joined
Jan 7, 2004
Messages
44
done ,i hope every thing will work fine :)
i restarted apache:
root@sv31 [~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [Thu Jan 8 21:33:57 2004] [warn] module perl_module is already loaded, skipping
[ OK ]
 

ProWebUK

Verified User
Joined
Jun 9, 2003
Messages
2,326
Location
UK
As i mentioned to you earlier, the perl error is nothing to worry about :)

Chris
 
Top