Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 21st June 2007, 01:02
golan golan is offline
Junior Member
 
Join Date: Apr 2007
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
Default contact.php is not working

Hi,
I have a contact.php which i tested on the other website which is hosted by other company and it works fine. But when i am using it on the other website which i am hosting it by myself it is not working!
Is it any configuration on my Apache servre which i need to do to make this page working?

Your help is appreciated.

Thanks
Golan

The Contact file is:
----------------------------------------------------------------------
<?
Error_Reporting(E_ALL & ~E_NOTICE);

while ($request = current($_REQUEST)) {
if (key($_REQUEST)!='recipient') {
$pre_array=split ("&777&", $request);
$post_vars[key($_REQUEST)][0]=$pre_array[0];
$post_vars[key($_REQUEST)][1]=$pre_array[1];
}
next($_REQUEST);
}



reset($post_vars);
$subject="From ".$post_vars['your_name'][0] ;
$headers= "From: ".$post_vars['your_email'][0] ."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';
$message='';
while ($mess = current($post_vars)) {
if ((key($post_vars)!="i") && (key($post_vars)!="your_email") && (key($post_vars)!="your_name")) {

$message.="<strong>".$mess[1]."</strong>&nbsp;&nbsp;&nbsp;".$mess[0]."<br>";
}
next($post_vars);
}

mail("hosebra@yahoo.com", $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$message."
</body>
</html>" , $headers);
echo ("Your message was successfully sent!");

?>
<script>
resizeTo(300, 300);
</script>
Reply With Quote
Sponsored Links
  #2  
Old 21st June 2007, 11:49
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,778
Thanks: 821
Thanked 5,333 Times in 4,184 Posts
Default

Which lines get added to the mail log file when you send a email with your php script?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 21st June 2007, 18:30
golan golan is offline
Junior Member
 
Join Date: Apr 2007
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Hi Till,
I dont get what do you mean, would you please explaine it a bit more?

Thanks
Reply With Quote
  #4  
Old 21st June 2007, 23:32
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,778
Thanks: 821
Thanked 5,333 Times in 4,184 Posts
Default

Have a look at your mail log file which i in the directoyr /var/log/ and post the line that got added to this file when you send a email with the above php script.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 21st June 2007, 23:41
golan golan is offline
Junior Member
 
Join Date: Apr 2007
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Hi Till,
Here is the lines:

Jun 21 14:38:24 localhost postfix/pickup[11260]: EF7B3BB0072: uid=48 from=<apache>
Jun 21 14:38:25 localhost postfix/cleanup[13184]: EF7B3BB0072: message-id=<20070621213824.EF7B3BB0072@localhost.localdoma in>
Jun 21 14:38:25 localhost postfix/qmgr[25099]: EF7B3BB0072: from=<apache@localhost.localdomain>, size=424, nrcpt=1 (queue active)
Jun 21 14:38:26 localhost postfix/smtp[13186]: EF7B3BB0072: to=<hosebra@yahoo.com>, relay=f.mx.mail.yahoo.com[209.191.88.247]:25, delay=1.3, delays=0.08/0.2/0.75/0.27, dsn=2.0.0, status=sent (250 ok dirdel)
Jun 21 14:38:26 localhost postfix/qmgr[25099]: EF7B3BB0072: removed
Reply With Quote
  #6  
Old 21st June 2007, 23:45
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,778
Thanks: 821
Thanked 5,333 Times in 4,184 Posts
Default

Ok, this means your script and server is working fine and the email has been sent to the yahoo account. I guess that yahoo has deleted your email as it was sent from the sender address "apache@localhost.localdomain". You should check that you have set a valid hostname for your server.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 21st June 2007, 23:47
golan golan is offline
Junior Member
 
Join Date: Apr 2007
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Hi Till,
how can i check it?

Thanks
Reply With Quote
  #8  
Old 22nd June 2007, 01:12
golan golan is offline
Junior Member
 
Join Date: Apr 2007
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
Default

In regard to this issue when i am sending to my email address at xxxx@mydomainname it works prefect.

Thanks
Reply With Quote
  #9  
Old 22nd June 2007, 13:55
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

What's the output of
Code:
hostname
and
Code:
hostname -f
and
Code:
postconf -n
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #10  
Old 22nd June 2007, 18:05
golan golan is offline
Junior Member
 
Join Date: Apr 2007
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
 
Default

Output of hostname and hostname -f is: localhost.localdomain
and output of postconf -n is:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailbox_command =
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = /etc/postfix/local-host-names
mynetworks = 127.0.0.0/8
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting e-mail working hansoffate Installation/Configuration 29 13th August 2008 16:33
DNS stop working MZH General 3 22nd February 2008 11:10
spamassassin stop working after woody to sarge update shark_tico Server Operation 1 19th October 2006 14:01
PHP & MySQL working, but AREN'T WORKING???? lipp9000 Installation/Configuration 4 21st July 2006 17:01
ftp not working pesja Installation/Configuration 3 17th July 2006 12:37


All times are GMT +2. The time now is 04:45.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.