xs2usun Posted February 27, 2006 Share Posted February 27, 2006 I cannot find anything similar when I search this forum. The problem is that I receive an error after I hit the 'Confirm Order' button. I think it has something to do with localhost and the actual domain name in configuration.php. When I have everything in configuration.php set to localhost everything is fine. But when I change it to the actual domain name, I receive the following error: Warning: Server Error in d:\phpdev\www\jdm2\includes\classes\email.php on line 520 Warning: Cannot add header information - headers already sent by (output started at d:\phpdev\www\jdm2\includes\classes\email.php:520) in d:\phpdev\www\jdm2\includes\functions\general.php on line 33 So no screen appears with the announcement that I have ordered anything. But the order is sent. The customer will a receive a email confirmation and the order exists in the database. I also noticed that when I disable (clear the email adres) the option 'Send extra order emails to' in Configuration of Admin , then I also don't receive any errors. And everything is fine. But I want to be notified when an order is placed. Does anyone know what the problem might be? Link to comment Share on other sites More sharing options...
Guest Posted February 27, 2006 Share Posted February 27, 2006 I cannot find anything similar when I search this forum. The problem is that I receive an error after I hit the 'Confirm Order' button.I think it has something to do with localhost and the actual domain name in configuration.php. When I have everything in configuration.php set to localhost everything is fine. But when I change it to the actual domain name, I receive the following error: So no screen appears with the announcement that I have ordered anything. But the order is sent. The customer will a receive a email confirmation and the order exists in the database. I also noticed that when I disable (clear the email adres) the option 'Send extra order emails to' in Configuration of Admin , then I also don't receive any errors. And everything is fine. But I want to be notified when an order is placed. Does anyone know what the problem might be? Perhaps, the code of --- redirect ... --- appears twice or more times or appears in wrong place, check your code! Link to comment Share on other sites More sharing options...
rabbitseffort Posted February 27, 2006 Share Posted February 27, 2006 I had this error once and it was a line of extra whitespace in one of my files--I forget which one--my error was slightly different but mostly the same--so maybe look into the white space thing "I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings." ---Margaret Mead--- "The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer. --Ken Kesey" Link to comment Share on other sites More sharing options...
xs2usun Posted March 7, 2006 Author Share Posted March 7, 2006 Thank you very much for your reply's. I've looked in email.php and general.php. I removed the last white line, but I'm still receiving the error. Does anyone know which file I have to check? edit: Ok, I've found something else. I'm also receiving the same error when I try to send an email with the 'Contact us' option. Link to comment Share on other sites More sharing options...
Avec Posted March 8, 2006 Share Posted March 8, 2006 Search the forum on 'header already sent' I think it has been discussed before. Link to comment Share on other sites More sharing options...
xs2usun Posted March 8, 2006 Author Share Posted March 8, 2006 Ok, thank you very much! I will try on that search string. I couldn't find it before because this knowledge base is getting quite huge... <_< Link to comment Share on other sites More sharing options...
custodian Posted March 8, 2006 Share Posted March 8, 2006 Thank you very much for your reply's. I've looked in email.php and general.php. I removed the last white line, but I'm still receiving the error. Does anyone know which file I have to check? edit: Ok, I've found something else. I'm also receiving the same error when I try to send an email with the 'Contact us' option. This will answer your question http://www.oscommerce.info/kb/osCommerce/G...mon_Problems/15 My Contributions Henry Smith Link to comment Share on other sites More sharing options...
xs2usun Posted March 8, 2006 Author Share Posted March 8, 2006 I've already looked in the explanation, but there are no white spaces in the files involved in the warning message, email.php and general.php. I double checked in Dreamweaver and Notepad. So I'm pretty sure that it has to exist in some other file. It is also email related as it only happens when email has to be sent. But when I email from the Admin area, the email is sent succesfully. Link to comment Share on other sites More sharing options...
custodian Posted March 8, 2006 Share Posted March 8, 2006 I've already looked in the explanation, but there are no white spaces in the files involved in the warning message, email.php and general.php. I double checked in Dreamweaver and Notepad. So I'm pretty sure that it has to exist in some other file. It is also email related as it only happens when email has to be sent. But when I email from the Admin area, the email is sent succesfully. You checked both files? for whitespace at the top and the bottom? Tell you what, both of those files contain nothing but code (ie: no personal info) No send them to me and I'll send them right back. Sorry, I merely find it hard to beleive that there aren't any white spaces. My Contributions Henry Smith Link to comment Share on other sites More sharing options...
xs2usun Posted March 8, 2006 Author Share Posted March 8, 2006 Thanks a lot! I sent you a PM. I also replaced email.php, general.php, header.php with the original files from the installation package, but the error remains. Link to comment Share on other sites More sharing options...
custodian Posted March 8, 2006 Share Posted March 8, 2006 Thanks a lot! I sent you a PM. I also replaced email.php, general.php, header.php with the original files from the installation package, but the error remains. Every file you sent me had a single white space at the end of them It is possible that your editor is adding these lines afterwards, or for some other odd reason. Try using them without opening them first. Or if you tend to be paranoid, make a copy of them and open the copies, but leave at least one set unopened (in case your editor is adding lines). Upload the un-opened set and try it again My Contributions Henry Smith Link to comment Share on other sites More sharing options...
xs2usun Posted March 8, 2006 Author Share Posted March 8, 2006 Herny, Thank you very much. Can you please tell me which editor you used? But, unfortunately the error remains. I've overwritten all three files with the files you sent me and the error remains exactly the same. I also tried on another pc and have deleted all IE history files and cache files. Error: Warning: Server Error in d:\phpdev\www\jdm2\includes\classes\email.php on line 520 Warning: Cannot add header information - headers already sent by (output started at d:\phpdev\www\jdm2\includes\classes\email.php:520) in d:\phpdev\www\jdm2\includes\functions\general.php on line 33 I just don't understand what's the problem. Maybe it's something else then the white spaces or maybe it concerns some other file which contains whitespaces... Thanks anyway for being so kind to look at my files. I'm really puzzled now. Link to comment Share on other sites More sharing options...
xs2usun Posted March 28, 2006 Author Share Posted March 28, 2006 Ok, I found the solution :D http://www.oscommerce.com/forums/index.php?showtopic=34221&st=20 For anyone still having osCommerce email/smtp issues, you need to install a SMTP Relay Server on you Windows PC, It works with-out a glitch, download this SMTP Relay Server, The software can be used a Shareware for Free, or you can Purchase a License for US$49, Why? I dont know yet but Im using it for free, no drama's or limitations either.. download size is small 2mb MAX!, simple install it, it runs a start-up in your system tray, records all outgoing email you send, and any errors. can also be used to send you Microsoft Outlook and/or Outlook Express emails, much quicker than you own ISP mail sending, the mail is sent direct to the reciepient rather then to you ISP 1st. http://www.getfreefile.com/localsrv.html anyway to make it work with osCommerce, install it, press OK - bypass registrations payment sign-ups ect.. dont tick any Microsoft Outlook and/or Outlook Express Options as it will automatically configure your email clients to use "itself" rather then your ISP, much quicker (only sends email ok, it does not recieve email). thats it with the install.. you then need to open your PHP.ini file in Windows. Can be found in C:/winnt/PHP.ini (Windows 2000/NT) or C:/Windows/PHP.ini (98/ME/XP) open that file with Notepad or other Text/PHP Editing software.. search or seek for this (aprox line 590) CODE [mail function] ; For Win32 only. SMTP = ; for Win32 only ; For Win32 only. sendmail_from = ; for Win32 only and change it to:CODE [mail function] ; For Win32 only. SMTP = localhost; for Win32 only ; For Win32 only. sendmail_from = you@youremail_address.com; for Win32 only use your return/recieving email in the above line, this will return error message emails to you if there are problems on the recipients end ect. Save that file (php.ini) and close it.. now go to your osCommerce Admin, "Configuration Options" -- "Email Options" and set up like so?: QUOTE E-Mail Transport Method smtp E-Mail Linefeeds CRLF Use MIME HTML When Sending Emails false Verify E-Mail Addresses Through DNS false Send E-Mails true Thats it!!, OSCOMMERCE should function correctly now, no email smtp errors headers allready sent ect.. Cheers MaxiDVD Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.