Add to Google

Why This Error? - PHP script fault

free web hosting
Open Discussion > CONTRIBUTE > The Internet > Web Design

Why This Error? - PHP script fault

mrdee
Hello,
I typed out a PHP script (literally copied from w3schools, the script is as follows:

CODE
<html>
<body>

<?php
function spamcheck($field)
  {
//eregi() performs a case insensitive regular expression match
  if(eregi("to:",$field) || eregi("cc:",$field))
    {
    return TRUE;
    }
  else
    {
    return FALSE;
    }
  }

//if "email" is filled out, send email
if (isset($_REQUEST['email']))
  {
  //check if the email address is invalid
  $mailcheck = spamcheck($_REQUEST['email']);
  if ($mailcheck==TRUE)
    {
    echo "Invalid input";
    }
  else
    {
    //send email
    $email = $_REQUEST['email'];
    $subject = $_REQUEST['subject'];
    $message = $_REQUEST['message'];
    mail("info@vlaanderen=flanders.org.uk", "Subject: $subject",
    $message, "From: $email" );
    echo "Thank you for using our mail form";
    }
  }
else
//if "email" is not filled out, display the form
  {
  echo "<form method='post' action='mailform.php'>
  Email: <input name='email' type='text' /><br />
  Subject: <input name='subject' type='text' /><br />
  Message:<br />
  <textarea name='message' rows='15' cols='40'>
  </textarea><br />
  <input type='submit' />
  </form>";
  }
?>

</body>
</html>


Yet, when I run it, I keep getting the following error:

Warning: mail() [function.mail]: SMTP server response: 530 Authenticate before sending emails. in C:\Program Files\Abyss Web Server\htdocs\mailform.php on line 34
Thank you for using our mail form.

Judiging by the last line, the script continues to run after the error.
Line 34 is this line:

$message, "From: $email" );

As I said before, I am very inexperienced in PHP (a complete beginner), so I do not understand why I am getting this error.

Any help will be very much appreciated.

Thank you.

 

 

 


Comment/Reply (w/o sign-up)

jlhaslip
Does this help at all?

http://groups.google.com/group/Gmail-Probl...be6b2d?lnk=raot

Seems you need to authenticate the SMTP connection. Might be easier to alter your server to use sendmail in the php.ini file.

Comment/Reply (w/o sign-up)

mrdee
I'm afraid that link does not help, talks about using Googlemail.
By the way, I forgot to mention: I am testing this program on my local machine, Using PHP 5.2 in conjunction with Apache server 2.2.
Thanks.

Comment/Reply (w/o sign-up)

pop
you need to setup php.ini file "smtp" (send mail transfer protocol) protocol. you can not send e-mail from your localhost computer, without connection to outside mail server. jlhalslip mentioned one way to setup smtp on your localmachine, by using google mail options as your default mail server. google mail is one of the fastest and largest mails, and i recomend you using the same. also if you have some host like trap18 you can also use their smpt details to setup your localhost mail connection.

Comment/Reply (w/o sign-up)

mrdee
I see, well, I have hosting at Trap17.
So, I could set these details up then?

Thanks.

Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

Recent Queries:-
  1. default xml error dreamweaver invalid input - 121.29 hr back. (1)
  2. "warning: fclose(): "" is not a valid stream resource in" whm - 252.96 hr back. (1)
Similar Topics

Keywords : error, php, script, fault

  1. Error Installing Template In Joomla! 1.5.7
    (0)
  2. Actionscript 3 & Xml Error #1010
    Why must it vex me so? (0)
    This post is about a project I'm working on in Flash CS3, using ActionScript 3 and an external
    XML file. I am trying to populate dynamic text fields in a movie clip generated by ActionScript
    using data from XML. The line is formatted like so (leaving out the array brackets to avoid code
    confusion): CODE clip.txt = xmlList.vname When I run the file like this, the movieclips
    appear but are empty. I then modify the code this way: CODE clip.txt.htmlText = xmlList.vname
    This generates Error #1010: "A term is undefined and has no properties." Can any ....
  3. An XSL Transform Error
    Who knows how to fix it? (2)
    Wel i am working on my project and i am testing some things out with rss feeds, link to site when
    i look at my site i'll see the following error in my feed panels : QUOTE MM_XSLTransform
    error. The server could not perform the XSL transformation because an XSLT processor for PHP could
    not be found. Contact your server administrator and ask them to install an XSLT processor for PHP.
    When i googled this error i got the this: Change in your php.ini: ;extension=php_xsl.dll to:
    extension=php_xsl.dll So is this possibible on trap17 or do i have to ask a a....
  4. Swanson Internet Forum Host Error
    Ive bought a php script, and im feeling ripped off (4)
    Hi guys. So I bought this script . And now I'm loading it up HERE and It's giving this
    message to when you sign up for a new forum QUOTE Warning: fopen(cookie.txt) : failed to open
    stream: Permission denied in /home/kyle/public_html/forumhost/forumhost/index.php on line 17
    Warning: fclose(): supplied argument is not a valid stream resource in
    /home/kyle/public_html/forumhost/forumhost/index.php on line 17 Thank you for your choosing us to
    host your free forum. In order to finalize and confirm your forum setup, please click the button
    below HTTP/1.0 404....
  5. Smf: Template Parse Error
    HELP ME!!! (7)
    QUOTE Template Parse Error! There was a problem loading the /Themes/default/index.template.php
    template or language file. Please check the syntax and try again - remember, single quotes (')
    often have to be escaped with a slash (\). To see more specific error information from PHP, try
    accessing the file directly. You may want to try to refresh this page or use the default theme.
    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in
    .../Themes/default/index.template.php on line 167 And here's line 166 QUOTE » Free ....
  6. What's The Best Script For Web Designing?
    (6)
    I've been using PHP for about a month and I like it cos it's so powerful. I don't know
    about the others like CGI, Perl..etc. Can anybody tell me the MAIN Difference between these
    languages? I'd really love to try them out if I know their advantages, pros and cons. I've
    been searching the internet for answers, but they are too complicated and use too many jargons that
    newbies like me don't understand.....
  7. Post Disappeared
    Error messages (1)
    Hello, I notice in the list that my post "SMTP settings" has received a reply. Yet, when I click on
    the title to enter the topic, I get the following: QUOTE The error returned was: Sorry, some
    required files are missing, if you intended to view a topic, it's possible that it's been
    moved or deleted. Please go back and try again. Can anyone tell me what has happened to the
    topic, and, more importantly, how I would be able to read it? Thanks.....
  8. Can't Delete A Folder On Server!
    a small mistake in a script.... (7)
    I maintain my college's website and since I update it frequently, I decided to
    write a php script that would backup all the data in a folder on the server itself. To backup all th
    e data I would only need to run the script once in a while: function dircpy($basePath, $source,
    $dest, $overwrite = false) { print
    "============================================================================ ";
    if(!is_dir($basePath . $dest)) mkdir($basePath . $dest); if($handle = opendir($basePath
    . $source)) { while(false !== ($file = readdir($handle)....
  9. Script.aculo.us - A Library Of Ajax Scripts To Improve Your Website's Design
    many ways to impress your visitors (0)
    SCRIPT.ACULO.US Homepage AJAX is a futuristic language used by experts to
    program the web. It adds many interesting features which will enhance your website. Click the link
    below for a demo of all the things you can do with the AJAX scripts available on script.aculo.us:
    http://wiki.script.aculo.us/scriptaculous/show/Demos The current version (1.7.0) of the entire
    library of their scripts is available as a download in ZIP , TAR.GZ and TAR.BZ2
    format. ZIP {146KB} TAR.GZ TAR.BZ2 Please see the documentation available on....
  10. Users Online
    Looking for the best counter script (9)
    Hi people, I am wondering If do you know a good "users online" I know many remote hosted services
    for this but I am looking for a counter script to install in my own website, If possible a counter
    that displays my visitors information , like country or an image(flag) links where they come from
    etc. something like this: Webpage I would SO appreciate any help! because I want to give to my
    site a more professional and international look /cool.gif" style="vertical-align:middle"
    emoid="B)" border="0" alt="cool.gif" /> ....
  11. Inviter Script
    (1)
    Gmail inviters and spoolers abound on the Internet, such as here , and here . I'm not
    especially planning to make yet another Gmail inviter, but I'm trying to set up a site that
    works like a gmail spooler, but that will distribute links for the free icon/Free Delivery sets at
    IconBuffet.com. Does anyone know of any ready-made scripts that does this?....
  12. Reseller Hosting Script
    InvasionPanel.com (8)
    Hey my friend just made a new site selling reseller hosting script Its called InvasionPanel Its a
    script Which has cPanel and InvasionPanel (Something like WHM) Features of reseller hosting panel
    (InvasionPanel) CODE Administration - Settings - Advertisement settings - Reseller Packages -
    Create Reseller - Reseller Management Server - Server Information - Service Status - Reseller
    Information - Reseller Usage cPanel Accounts - List Accounts - List Suspended - Create a New Account
    - Password Modification - Suspend Account - Unsuspend Account - Terminate Account -....
  13. Log In Script!
    Please can someone make me a log in script! (6)
    Hi please can someone either make me a log in script or give me a direct url to a code for one!
    Thanks! /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />....
  14. How To Incorporate A Php Script To My Website
    php beginner needs help (7)
    Well i dont know exactly how to say this but i ll try. So last few months i ve been discovering web
    design, dreamweaver, photoshop. I learned how to create layout and how to preapare it in dreamweaver
    but now i am stuck with php. I dont know how to put script in desired cell an lots of other stuff.
    yeah i am stupid, but i am who i am. all those tutorials are not helping me because they dont tell
    you how to install script where i want. i am going to explode. i tried to find finished script on
    hotscripts.com but i cant/dont_know which one will suite my needs. my layout is....
  15. Top Ten Web Script Libraries
    (6)
    1) Moo.fx - A superlightweight, ultratiny, megasmall javascript effects library, written with
    prototype.js. It’s easy to use, fast, cross-browser, standards compliant, provides controls to
    modify Height, Width, and Opacity with builtin checks that won’t let a user break the effect with
    multiple crazy clicks. It’s also optimized to make you write the lesser code possible. 2) Rico - An
    open source JavaScript library for creating rich internet applications. Provides full Ajax support,
    drag and drop management, and a cinematic effects library. 3) Swat - Developed by silver....
  16. Free Chat Script
    (9)
    deos anyone know a good, fast, free chat script that i could put in my website. one with out
    advertisements. one with no strings attached. everyone these days are trying to make money off every
    type of script. only if all scripts were open source. the world would be a much better place. thanks....
  17. What Is Topsites Script (its In Php)
    (5)
    i have been looking at a lot of php scripts lately and i keep seeing this script over and over
    again. its called "topsites". what is this "topsites" scrtipt. its in php and i m new to this stuff
    so i woulnt know, and non of websites offering the script actually explains what it is. this is a
    big forum so i thought you guys might know what it is. so if you know can you please give me a
    simple brief explanation of it and how it can be useful for a webmaster. i would appericate your
    help. thank you....
  18. Asp Script For A Social Networking Site!
    need a script like hi5 site (3)
    Helllo guys! Can anyone of you suggest me where can i get a free script like hi5.com either in asp
    or php ? plz dont suggest hotscripts.com or to do a google search because both gave me no quality
    result thanks in advance....
  19. Wordpress 1.5.1 Installation Problem
    Getting fatal error message (7)
    I've just downloaded Wordpress 1.5.1 and uploaded all the contents to public_html and I've
    edited wp-config.php like so: CODE // ** MySQL settings ** // define('DB_NAME',
    'myusername_dbName');     // The name of the database define('DB_USER',
    'myusername_dbUsername');     // Your MySQL username define('DB_PASSWORD',
    'myPassword'); // ...and password define('DB_HOST', 'localhost');     // 99%
    chance you won't need to change this value $table_prefix  = 'wp_';   // example:
    'wp_&#....
  20. Html Form Help Please
    finding a form script (2)
    Does anyone know of any tutorial or can help me with making a form. I'll describe the situation
    and lets see if you can help me. Ok like a few form or text areas that when you put some text into
    them they'll input the words from the form area above into another form or textarea under it.
    Sort of like an online html maker where you can select your background colors, put an image url in a
    field, and some other options THAN you hit a button that says generate. and it generates a website
    html source code where you can copy the whole thing and paste into your own we....
  21. Great Script Site
    (20)
    I've loved this site since I first found it a couple years ago. It has 12 php related scripts,
    but also links to many other resourceful sites and tutorials, as well as a forum board much like
    this one that is pretty straightforward and easy to get help if you have any questions.
    codegrrl.com <---check it out!....
  22. Script Help! Plz Help
    (1)
    ok i want to no how to set a character for this script: the characters would be:
    0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ() -_ CODE thanks if u
    can help =/....
  23. Javascripts
    Looking for a particulat script (1)
    Hey all, Ive been looking for a script for my website that will let me have a news ticker at the top
    and a vertical autoscroller at the side, at the same time, none of mine work together, they all
    counteract each other, does anyone have any?....
  24. script hosting?
    (4)
    does anybody know where to get free script hosting where the scripts are actually good? everywhere i
    search, its just crappy scripts people made when they where bored. /huh.gif"
    style="vertical-align:middle" emoid=":huh:" border="0" alt="huh.gif" />....
  25. Custom Error Pages.
    Have you got yours running ......??????? (13)
    Hey guys u know hosting is kool but you know what would make a website really boring, well ill tell
    you what uncustomised error pages. well dont you just hate it when you type a url and instead of a
    kool page you just see some plain text telling you error 404 or sometimes it doesnt even say ne
    thing since the error messeges are not put in place. well i got a kool custom error page. check it
    out and tell me what you think, and well if you like it go ahead and pm me ill give you the details
    on how to get it. **heres an example of my custom error page**** 404 ERROR stevey....

    1. Looking for error, php, script, fault

Searching Video's for error, php, script, fault




advertisement



Why This Error? - PHP script fault