hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Problem: using php mail script on windows server
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

Problem: using php mail script on windows server

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 05-14-2004, 04:27 PM
demopoint demopoint is offline
New Member
 
Join Date: May 2004
Posts: 3

Problem: using php mail script on windows server


I have a few scripts for a client that is based on a windows server.. these scri[pts work flawless on Unix type servers but are giving me problems on this windows server for my client.

The host enabled PHP to be used and it works on some scripts, but this form mail script I have is not working on it for some reason..

Heres the errors:
Notice: Undefined variable: separator in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 47

Notice: Undefined variable: newline in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 50

Notice: Undefined variable: email in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 140

Notice: Undefined offset: 1 in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 91

Notice: Undefined variable: required in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 274

Notice: Undefined variable: require in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 277

Notice: Undefined variable: email in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 300

Notice: Undefined variable: EMAIL in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 300

Notice: Undefined variable: ZIP_CODE in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 309

Notice: Undefined variable: zip_code in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 309

Notice: Undefined variable: PHONE_NO in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 317

Notice: Undefined variable: phone_no in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 317

Notice: Undefined variable: FAX_NO in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 325

Notice: Undefined variable: fax_no in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 325

Notice: Undefined variable: sort in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 333

Notice: Undefined variable: sort in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 335

Notice: Undefined variable: sort in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 340

Notice: Undefined variable: content in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 194

Notice: Undefined variable: attachment_name in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 343

Notice: Undefined variable: file_name in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 355

Notice: Undefined variable: file2_name in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 369

Notice: Undefined variable: env_report in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 383

Notice: Undefined variable: subject in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 401

Notice: Undefined variable: email in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 401

Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 237

Notice: Undefined variable: ar_file in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 402

Notice: Undefined variable: redirect in C:\CustomerWebs\FirstLiberty\firstlibertynew\owensboro\securemail.php on line 410
Thank you for your submission

This form is powered by Jack's Formmail.php 5.0!

Reply With Quote


Sponsored Links
  #2  
Old 05-14-2004, 04:37 PM
demopoint demopoint is offline
New Member
 
Join Date: May 2004
Posts: 3
Heres part of the PHP.INI file... can someone help me.. can something be changed in the PHP.INI file for this.. again it works fine in Unix type servers but on this windows machine it bugs out and doesnt mail

[mail function]
; For Win32 only.
SMTP = localhost ; for Win32 only
sendmail_from= extweb@ngenx(dot)com ; for Win32 only

; For Win32 only.
;sendmail_from = extweb@ngenx(dot)com

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =



and this one
; Issue a PHP warning for each failed assertion.
;assert.warning = On

can these 2 be causing it

Reply With Quote
  #3  
Old 05-14-2004, 04:40 PM
BF-Gary BF-Gary is offline
Blue, Furry and Comfortable
 
Join Date: Aug 2003
Location: Vancouver, BC
Posts: 1,891
This should be in the programing section and can you paste a snippet of the code from line 47, 50 and so on? sounds like you need to set a config file somewhere and didn't do so.

__________________
Gary Jones

BlueFur.com - Canada Web Hosting


Reply With Quote
Sponsored Links
  #4  
Old 05-14-2004, 04:40 PM
blockcipher blockcipher is offline
Web Hosting Master
 
Join Date: Oct 2003
Location: California
Posts: 1,271
Not sure if this would help you. But when putting a mail script of mine onto a windows box, I was getting the undefined variable errors as well. But works fine on a linux box.

I had to place the form contents for example

$name=$_POST['name'];

above my variables

$subject
$message

etc.

Not sure if this is the case with yours, but fixed mine up.

__________________
http://www.wavesoftech.com

Reply With Quote
  #5  
Old 05-14-2004, 05:02 PM
Douglas Douglas is offline
Community Guide
 
Join Date: Apr 2003
Location: Atlanta, Jawja
Posts: 2,902
The code may not have been written to work on a Windows platform. I know that when I code, it's only for a Unix/Linux platform. That's all I can really add to this thread, sorry.

__________________
Douglas Hazard - Blog: DLHazard.com | @BearlyDoug on Twitter
FortressITX.com Infrastructure Operations Analyst
(Dang it! I got roped back in! )
GridironHistory.com - Your ONE source for Collegiate Football History!

Reply With Quote
  #6  
Old 05-14-2004, 11:22 PM
choon choon is offline
Retired Moderator
 
Join Date: Jul 2001
Location: Singapore
Posts: 1,790
Moved from Web Hosting Forum to Programming Discussion forum.

__________________
Giam Teck Choon
:: Join choon.net Community today to share your tips and tricks on server issues please ::
:: Singapore Dedicated Servers :: Singapore Virtual Private Servers :: Linux/FreeBSD Server Management ::


Reply With Quote
  #7  
Old 05-15-2004, 03:34 AM
Burhan Burhan is offline
Community Guide
 
Join Date: Jul 2003
Location: Kuwait
Posts: 5,100
The notices are for variable that are being used but are not defined. You should check to make sure that the script is properly including all files that it requires. Also check the PHP version of both servers.

register_globals has been turned off by default on recent php versions (from 4.2+ I believe). If your script relies on register globals, then you will be getting those notices.

Also, for Windows servers, you have to make sure that the following line
Code:
SMTP = localhost ; for Win32 only
in your php.ini points to a server that is running SMTP. Its not always localhost (which is a symbolic name for the server the script is running on).

Without seeing the code itself, these are the only hints I can give you.

__________________
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise

Reply With Quote
  #8  
Old 05-15-2004, 12:56 PM
demopoint demopoint is offline
New Member
 
Join Date: May 2004
Posts: 3
I checked those varibles, and they were being used and defined, but like me check on the hostname and globals

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Web Hosts, Cloud Hosts Launch Services Based on Windows Server 2012 Web Hosting News 2012-09-05 13:51:50
Web Host OrcsWeb Offers Support for Windows Server 2012 Web Hosting News 2012-08-24 11:08:35
Microsoft Updates Licensing, Offers Four Versions of Windows Server 2012 Web Hosting News 2012-07-06 10:31:48
Microsoft Web Server Market Share Decreases Despite Windows 8 Beta Release Web Hosting News 2012-04-04 14:01:01
Web Host Netcetera Launches Managed Windows Cloud Server Web Hosting News 2011-06-13 22:06:29


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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 Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?