Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Web Design & Development
Tag Cloud
access acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming graphics hard drive hardware hdmi internet laptop malware memory monitor motherboard network operating system printer problem ram registry router slow software sound svchost.exe trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Very strange PHP e-mail error

Reply  
Thread Tools
ubaldc's Avatar
Computer Specs
Junior Member with 4 posts.
 
Join Date: May 2009
Experience: Advanced
26-May-2009, 03:48 PM #1
Question Very strange PHP e-mail error
we have some php code running on a linux machine. (sgi based).
php is V5.0 accessing a mysql database. this web code has worked for years on an irix based machine.

problem: e-mail (using sendmail) is only working in certain circumstances.
all code calls the same code as follows:

$mailer = popen("/usr/sbin/sendmail -t -i","wb");
fwrite($mailer, "From:$email_from_name<$email_from_mail>\n");
fwrite($mailer, "To: $email_to\n");
fwrite($mailer, "Cc: $email_cc\n");
fwrite($mailer, "Subject: $email_subject\n");
fwrite($mailer, "X-Mailer: PHP/" . phpversion(). "\n");
fwrite($mailer, "X-Sender-IP: $REMOTE_ADDR\n");
fwrite($mailer, "Content-Type: text/html");
fwrite($mailer, "\n".$emailbody."\n");
pclose($mailer);

here is the problem: the code if executed in the main window, will cause IE V6.0 to ask you to close the browser. you can select no, and the e-mail will be sent. we also have a javascript generated secondary window that this code will work through without asking to close the browser.

any direction would be greatly appreciated.
MMJ's Avatar
MMJ MMJ is offline
Senior Member with 3,637 posts.
 
Join Date: Oct 2006
27-May-2009, 01:23 AM #2
IE 6 is asking to close the browser? What?

What's the output you are returning to the browser?

Why don't you use mail()?
ubaldc's Avatar
Computer Specs
Junior Member with 4 posts.
 
Join Date: May 2009
Experience: Advanced
27-May-2009, 02:02 PM #3
1. ie6 is trying to close the browser.
2. output to browser is just another web page or the return to the previous. part of this system is to generate an e-mail to tell the user something has occured.
3. mail() from what I can see this points back to whatever you sent it to, in our case linux/unix sendmail.

i am in no way sending a message to tell the browser to close.

our PC's in UTC are locked down. i believe this is related to an IE setting.
i am hoping to contact the powers that be and see if I can change the settings.

thanks for the quick reply.

Chris
MMJ's Avatar
MMJ MMJ is offline
Senior Member with 3,637 posts.
 
Join Date: Oct 2006
27-May-2009, 08:20 PM #4
Can you take a screenshot of IE? I'm pretty curious about whats going on.
ubaldc's Avatar
Computer Specs
Junior Member with 4 posts.
 
Join Date: May 2009
Experience: Advanced
28-May-2009, 11:06 AM #5
gladly.. i am not sure I can attach file://d:/close_error.doc
why don't I think this will work.. but if not, the text is:
the web page you are viewing is trying to close the window.
do you want to close this window. yes or no.
the border title is "Microsoft Internet Explorer"

thanks for your help. this one has me completely befuddled.
MMJ's Avatar
MMJ MMJ is offline
Senior Member with 3,637 posts.
 
Join Date: Oct 2006
28-May-2009, 12:35 PM #6
Hmm.

Are you trying to close the window with JavaScript?

Try changing the security settings.
ubaldc's Avatar
Computer Specs
Junior Member with 4 posts.
 
Join Date: May 2009
Experience: Advanced
28-May-2009, 02:00 PM #7
i am not trying to close the window, anywhere. i am just sending an e-mail and moving on. that is the mystery.

security settings are locked thanks to corporate IT "we know what is best for you" thinking. i can't change anything.

thanks
Reply

Tags
email, php

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 01:49 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.