Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

individual meseges

the mail() function

Moderators: macek, egami, gesf

individual meseges

Postby xxhelmutxx » Wed May 11, 2011 9:47 am

my code is

<?php
$sender="xxhelmutxx1@web.de";
$mailto="xxhelmutxx1@web.de";
$browser=$HTTP_SERVER_VARS['HTTP_USER_AGENT'];
$ip=$HTTP_SERVER_VARS['REMOTE_ADDR'];
$wasfehlt=$HTTP_SERVER_VARS['REQUEST_URI'];
$woher=$HTTP_SERVER_VARS['HTTP_REFERER'];
$nr=$HTTP_GET_VARS['nr'];
$header="Content-Type:text/plain; charset=\"us-ascii\"\n";
$header.="FROM:$sender\n";//eMail-Adresse des Absenders
$msg="Fehlernummer $nr\n\n";//Error-Code
$msg.="Browser:$browser\n\n";//Verwendeter Browser
$msg.="IP-Adresse:$ip\n\n";//IP-Adresse
$msg.="Angeforderte URL:$wasfehlt\n\n";//URL der Datei die angefordert wurde
$msg.="vorhergehende URL:$woher\n\n";//URL die auf diese Datei verweist
mail("$mailto","Fehler$nr","%msg","$header");
?>

and my browser said always

Warning: mail() has been disabled for security reasons in /srv/www/httpd/phost/x/com/pytalhost/xxhelmutxx/web/error.php on line 16

i can't understand why can anyone help me? PLEASE i need that file
xxhelmutxx
New php-forum User
New php-forum User
 
Posts: 2
Joined: Wed May 11, 2011 9:41 am

Re: individual meseges

Postby egami » Wed May 11, 2011 11:41 am

Either your system administrator has disabled the mail() function in /etc/php.ini or
The system administrator has disabled the mail() function in your /~$HOME/php.ini, or
/bin/sendmail doesn't exist, or the apache user does not have privileges to read/execute.

Suggestion:
echo phpinfo();

Else

If you have shell access, see if you can telnet to port 25 on mail.yahoo.de
If so,
echo "this is a test" | mail your_email_address@yahoo.de

If you receive that test, your username does have access to use /bin/sendmail.
User avatar
egami
php-forum GURU
php-forum GURU
 
Posts: 2197
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: individual meseges

Postby xxhelmutxx » Thu May 12, 2011 5:26 am

a big thanks @egami

the mail function was disabled
i hope that this was the mistake
xxhelmutxx
New php-forum User
New php-forum User
 
Posts: 2
Joined: Wed May 11, 2011 9:41 am


Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron