Why This Error? - PHP script fault

free web hosting
Free Web Hosting, No Ads > 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.

 

 

 


Reply

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.

Reply

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.

Reply

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.

Reply

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

Thanks.

Reply



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*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. what dose ntkrnlmp.exe mean - 150.10 hr back. (1)
Similar Topics

Keywords : error, php, script, fault

  1. An Error Thought I'd Let The Admins Know About.
    Bad link. (4)
  2. Mysql Db Is Down Getting Following Error
    (2)
    My Mysql is Down can I get some help please? Appreciate it. Patrick Domain: patrickcurl.com Error:
    phpMyAdmin - Error #2002 - The server is not responding (or the local MySQL server's socket is
    not correctly configured)....
  3. Seeking Help With Javascript
    Need help with drag and drop type script (1)
    What i want to make is a script that has a table, which is a menu for my site, and when you click
    the top of the table you can drag it to another place in the page. This is the code: Test
    run - Right click menu - ©Jack McCrea 2008 <script type="text/javascript"> function
    coordinates(event) { if (event.button==2) { var x=event.x; var y=event.y;
    document.getElementById("element").style.left=x; document.getElementById("element").style.top=y;
    document.getElementById("element").style.visibility="visible"; var oldx=x; var oldy=y; } }
    <script type="....
  4. Browser Compatibility Problem With Firefox - Javascript + Css
    Having trouble making a script work right - any suggestions? (3)
    Hi, Im working on a website, and im trying to make a right-click menu, which opens on right click,
    wherever the cursor is, and closes on mouse out. I wrote the code below, and when i ran it in IE it
    ran fine, just how i wanted it to work. However in firefox, the menu just opened in the top left. im
    presuming this is because it doesnt like my style changing in the javascript. Any ideas, and
    suggestions? If i cant make this work, i will just make it so it works slightly differently when
    viewev in firefox so that it can just open in one place. All ideas appreciated. ....
  5. Hosting Problem [resolved]
    403 Forbidden Error occurs whenever I try to access my site (22)
    First off, let me say that I have spent considerable effort and time going through the forums
    seeking solutions for this problem. I have even gone as far as to seek help from the Xisto Live
    support team (they suggested I wait 2 hours and then get back to them. Well I did that, and there
    has been no change, and live support is now down). I've also tried changing permissions on both
    files and folders via Cpanel, but to no avail. I still end up with the same error: QUOTE
    Forbidden You don't have permission to access /index.php on this server. Additionally, a 4....
  6. How To Make Php Newsletter Script
    (3)
    I have seen a post on here somewhere which shows how to make a simple newsletter php script. I
    cvant find it anywhere and I wanted to ask some questions of the author. Does anyone know the one I
    mean? Cheers ....
  7. Wordpress Error - Bytes Exausted [resolved]
    NextGEN Gallery (7)
    Hey, I have just gotten my blog up and migrated it from my own webserver. I have fixed up most
    problems but one issue remains. When I try to upload an image to NextGEN Gallery I get and error
    when it tries to generate a thumbnail. QUOTE Fatal error: Allowed memory size of 33554432 bytes
    exhausted (tried to allocate 1992 bytes) in
    /home/samlock/public_html/wp-content/plugins/nextgen-gallery/lib/thumbnail.inc.php on line 183
    It does it for EVERY image size, so it's not because of a big image. Help, please.....
  8. Php Guest Online Script
    (3)
    make an index.php copy and paste this code CODE <?php $db_host = "localhost";
    $db_user = "root"; $db_pass = ""; $db_name = "test";
    $dbc = mysql_connect($db_host, $db_user, $db_pass); $dbs =
    mysql_select_db($db_name); $tm = time(); $timeout = $tm -
    (30*60);
    if($_SERVER["REMOTE_ADDR"]){$ip=$_SERVER["REMOTE_ADDR
    "];} else{$ip=$_SERVER["HTTP_X_FORWARDED_FOR"];}....
  9. Help Me _ Error Message: "could Not Retrieve Session Record"
    IPB-Forum error message (2)
    Hi ... Please I need help quickly ... I am an administrator of a "IPB-Invision Power Board Forum"
    and I cannot login in the ACP (Admin Control Panel) anymore. When I write the user name and password
    both are accepted and the login is successfull but then suddenly I get an error message that says:
    Could not retrieve session record What can I do to solve the problem ? Please help me
    !!!!!....
  10. Phpbb3 - Error 28
    (5)
    I get the following error when I try changing a users group of my Phpbb3 powered forums. QUOTE
    SQL ERROR Got error 28 from storage engine SQL SELECT ug.*, g.* FROM groups g, user_group ug
    WHERE ug.user_id = 83 AND g.group_id = ug.group_id ORDER BY g.group_type DESC, ug.user_pending ASC,
    g.group_name BACKTRACE FILE: includes/db/mysql.php LINE: 158 CALL: dbal->sql_error() FILE:
    includes/acp/acp_users.php LINE: 1881 CALL: dbal_mysql->sql_query() FILE:
    includes/functions_module.php LINE: 471 CALL: acp_users->main() FILE: adm/index.php LINE: 74 CALL:
    p_master->l....
  11. Phpizabi Social Network Script
    (1)
    Hello everyone not been on for AGES! we had net problems and i had to move to qupis and now
    I've got problems. I'm making a social networking site using this script and I cant get it
    to install Everytime I go to the install page i get this QUOTE Warning: session_start() :
    open_basedir restriction in effect. File(/home/kasiks1/tmp) is not within the allowed path(s):
    (/home/karlos:/usr/lib/php:/usr/local/lib/php:/tmp) in
    /home/karlos/public_html/phpazi/install/index.php on line 1 Fatal error: session_start() : Failed
    to initialize storage module: file....
  12. Error 28 (on Phpmyadmin)
    What does this error message mean? (10)
    I have a shopping cart system on my website. It always worked before, but all of a sudden, when I
    try to access it i get "Got error 28 from storage engine". Has that got something to do with the
    recent problems again, or can someone tell me what this error message means? Thanks. After posting
    this I noticed I cannot get into my PHPAdmin anymore. It gives loads of errors: QUOTE Warning:
    session_write_close() : SQLite: session write query failed: database is full in
    /usr/local/cpanel/base/3rdparty/phpMyAdmin/index.php on line 42 Warning: session_write_close() :
    Fai....
  13. Guessing Php Script
    (2)
    I am looking for: freeware php quess the person in the photo game script....
  14. Login Script For Vbulletin.
    (9)
    For some reason when I try to logon from the main page it doesnt work, it just brings me to the
    forums unlogged. Anyone here have any ideas whats wrong with my coding? Heres the webpage:
    www.ageofilluminati.com Heres the coding im Using: QUOTE
    Forgot password? Register for free! ....
  15. Php Downloads Script
    (4)
    I've been looking all over the net for a PHP script which can provide an interface to browse a
    downloads database. The database could be powered by MySQL. If you know a script like this, please
    post it here. Thanks in advance, Ironchicken.....
  16. Loaing Script
    (3)
    hello, I'm looking for a preloader script for my site. like it will display an loading
    image while the site is loading and the once the page has loaded the image will disapear. i tryed
    searching for one on google but i could not find one, i think i searched for the worng thing. if
    some one knows how to make one or where i can find one that would be great. Thanks....
  17. Error E74? (xbox 360)
    (10)
    Okay so me and my friend were playing guitar hero and all of a sudden the screen got all block like
    and the graphics all turned into green swirly squares. So we thought maybe the A/v cord was loose or
    something i turned off the xbox and re-plugged the a/v cords in now every time i turn the xbox on it
    flashes 1 red light and says Error E74 in about every language i know of... I have called
    1-800-4myxbox and all they said is that they only fix xbox's with the 3 red light error.... what
    do i do? thanks.....
  18. Invite Script..
    (2)
    I didn't know where else to put it /sad.gif" style="vertical-align:middle" emoid=":("
    border="0" alt="sad.gif" /> If moderators find another forum more suitable plz move this one
    /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> I am looking
    for some sort of sript or program that let's people on your website invite friends. Like they
    put in their Emailadress and mails are send to everyone in their list.. I hope someone can help me
    /sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> Greetzz....
  19. Background Image Swap Script
    Change a Background Image based on clock time (15)
    Background Image Changer Script To swap the background image from your CSS file according to the
    Server Clock Time. 1.) In your CSS file, add the following rule: CODE body {
        background: url(time.png); } 2.) Create a "folder" named time.png. 3.) Into the
    folder, place three images named morning.png, day.png, night.png. 4.) Also, in the same folder,
    create an index.php file and copy/paste the following script. CODE <?php $hour =
    date('H'); if ($hour < 12 ) {     $image =
    "morning.png"; } ....
  20. Generic Host Error
    Anyone know how to fix it? (8)
    I've been receiving this errors for months and it seems not get get fixed... I'm using
    Windows XP SP2 Home edition... CODE Generic Host Process for Win32 Services encountered a
    problem and needed to close. I've tried whatever I can do, googling it, reading almost
    everything possible and this error seems to be keep poping out everytime after I get my computer
    started and my sound driver seems not to be working after that... I've even tried the hotfix
    provided by Microsoft and kept my laptop up to date with the Windows Update and this error seems t....
  21. Psp Error- Tut On How To Fix
    When you try to use the internet does your psp get an internal error? (30)
    First of all, psp can browse the internet with its simple browser. BUT! What you may not know
    is that there is a bug where when you try to search or use a wireless lan connection (WLAN) the psp
    may say something like: Internal Error (80410A0B) To fix this without any memory loss, take out
    the UMD which is in the psp, and also take out the memory card. Next, go to settings, then system
    settings and click restore settings, the psp may freeze up, but it is not broken, take out the
    batter pack and put it back in, the settings should be restored and all should work.....
  22. Watermark Your Image With Simple Php Script
    found it on the net (35)
    This script was found on the net http://tips-scripts.com/?tip=watermark#tip B&T's Tips &
    Scripts site. Just in case the site may not show, I will include the code here: List of things
    needed: 1. your image in any format 2. watermark image--in gif format with transparent background 3.
    script below with name (i.e. watermark.php) CODE <?php // this script creates a watermarked
    image from an image file - can be a .jpg .gif or .png file // where watermark.gif is a mostly
    transparent gif image with the watermark - goes in the same directory as this script // ....
  23. Gmail: 502 Server Error
    GMail: 502 Server Error (22)
    Hey The topic name says it all. Well I have been trying for the last half an hour to log into my
    GMail account, but it kept on occuring a Server 502 error. Just wondering if it is just me
    or....yeah. QUOTE Server Error The server encountered a temporary error and could not complete
    your request. Please try again in 30 seconds. Yep I have tried every minute..for the last half
    an hour...(The Time now is 12.13pm Australian Eastern Standard Time) ....
  24. Verifying Email Addresses
    Using a simple PHP script (9)
    This simple script will allow you to run some basic checks to make sure that any email address
    entered is actually an email address. There is no guarantee offered that this will stop every single
    fake email address, but it'll provide some protection. Now, the code! First we need to get
    the email address to verify. Here, I get it using POST from an HTML form. CODE <?php //Load
    email address from web form $email = $_POST['email']; Now, we move on
    to our first check. Does the text that has been entered look like it could b....
  25. Delay X Seconds In Flash
    how to action script that (1)
    How do i have to do, to tell a frame to wait x seconds after it continues playing? In Macromedia
    Flash, of course... Like: CODE stop(); "wait  x seconds"; play();
    Thanks....
  26. 403 Forbidden Error When Accessing My Site
    (11)
    umm this is a problem that i have been looking in other topics to try to fix but i can't seem to
    find a answer to what i lookin for. I got my site workin again the other day ok and so i went on to
    see it (so i can make more changes) and when i got there i got this QUOTE Forbidden You
    don't have permission to access / on this server. Additionally, a 403 Forbidden error was
    encountered while trying to use an ErrorDocument to handle the request. Apache/1.3.33 Server at
    www.clansga.trap17.com Port 80 now i looked at everything and i can't seem to find t....
  27. Error Installing Windows Xp -error 7 Ntkrnlmp.exe
    (11)
    i have tried to install windows xp on my pc and i get an error right after it ask at the bottom of
    the screen to press f2 to restore an error pops up saying FILE
    \$win_nt$.~bt\NTKRNLMP.EXE cannot be open error 7 setup cannot complete and has
    to close i have had windows xp on the pc before so i know its compatible but i used a different
    version of windows before ,this tinme im using a new one and i get this error i seem to find no
    solution anywhere about how to resolve this and I was wondering if possible theres something i need
    to do,I am not to sm....
  28. Virtual Memory Error... Windows Xp
    (5)
    Im tryin 2 Install an Ebook & when I click the "setup" file, itz givin an error sayin "This program
    requires at least 3MB of free Virtual Memory to run"... There r 3 partitions on the Disk Viz., C,
    E, F... The Page file size is set as "1536-3072 MB" for C Drive, but other Drives do not hav any
    Page File Size set... i've windows xp and win 2000 Plz help me wid thiz problem... Thanx, ....
  29. Web Surfing- Script Needed
    (2)
    We all know of anonymouse web surfing, Sites like http://anonymouse.ws/cgi-bin/anon-www.cgi Offer
    peope to surf the internet anonymousely, The site has baners and ads showing up and does not support
    all links. Does anyone know what script they use or where i could get one from, What script do they
    use? Also if anyone jnows how to make my own? I really want this as a addon for my site, So all help
    would be appriciated. Thanks, Mbd5882....
  30. Could Someone Make A Php Script For Me?
    Script to manage clans and players (3)
    Does someone know a script where you can 1. Add clans to a roster 2. Edit clans on a roster 3. Add
    players too a clan 4. Edit players 5. Schedule matches 6. Add clan Leaders to manage their own clan
    + members 7. Add members to edit their own information And maybe some sort of scoreboard integrated
    where you can put Wins, Draws and loses and that automaticly puts best clans on the top? If there
    isnt such a script could someone create 1 for me? (its for a league ^^)....

    1. Looking for error, php, script, fault

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for error, php, script, fault

*MORE FROM TRAP17.COM*
Similar
An Error Thought I'd Let The Admins Know About. - Bad link.
Mysql Db Is Down Getting Following Error
Seeking Help With Javascript - Need help with drag and drop type script
Browser Compatibility Problem With Firefox - Javascript + Css - Having trouble making a script work right - any suggestions?
Hosting Problem [resolved] - 403 Forbidden Error occurs whenever I try to access my site
How To Make Php Newsletter Script
Wordpress Error - Bytes Exausted [resolved] - NextGEN Gallery
Php Guest Online Script
Help Me _ Error Message: "could Not Retrieve Session Record" - IPB-Forum error message
Phpbb3 - Error 28
Phpizabi Social Network Script
Error 28 (on Phpmyadmin) - What does this error message mean?
Guessing Php Script
Login Script For Vbulletin.
Php Downloads Script
Loaing Script
Error E74? (xbox 360)
Invite Script..
Background Image Swap Script - Change a Background Image based on clock time
Generic Host Error - Anyone know how to fix it?
Psp Error- Tut On How To Fix - When you try to use the internet does your psp get an internal error?
Watermark Your Image With Simple Php Script - found it on the net
Gmail: 502 Server Error - GMail: 502 Server Error
Verifying Email Addresses - Using a simple PHP script
Delay X Seconds In Flash - how to action script that
403 Forbidden Error When Accessing My Site
Error Installing Windows Xp -error 7 Ntkrnlmp.exe
Virtual Memory Error... Windows Xp
Web Surfing- Script Needed
Could Someone Make A Php Script For Me? - Script to manage clans and players
advertisement



Why This Error? - PHP script fault



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE