+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Php Help please

  1. #1
    thezone1 is offline x10 Sophmore thezone1 is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    192

    Php Help please

    Hey ppl i recently started teaching myself php,
    im running through a few simple projects to get my wits about it but iv run into a dead end.....

    I have got a local webserver set up to test my work but im stuck on a mailfunction, i made a simple form to get user feed back heres the php command


    // process the email
    if (array_key_exists('send', $_POST)) {
    $to = 'me@example.com'; // use your own email address
    $subject = 'Feedback from Japan Journey site';

    // process the $_POST variables
    $name = $_POST['name'];
    $email = $_POST['email'];
    $comments = $_POST['comments'];


    // build the message
    $message = "Name: $name\n\n";
    $message .= "Email: $email\n\n";
    $message .= "Comments: $comments";
    // limit line length to 70 characters
    $message = wordwrap($message, 70);

    // send it
    $mailSent = mail($to, $subject, $message);
    }

    all the veriables are there and so on yet when i try to send it i get the error
    Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\WEBSERVER\ROOT\php\contact.php on line 25

    in my php.ini file i have set the option to my x10 mail setting
    ?? any help is very apreciated thanks

  2. #2
    Slothie's Avatar
    Slothie is offline Lord Of The Keys Slothie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Singapore
    Posts
    1,432

    Re: Php Help please

    Ask for an upgrade to phpv2.

    Easiest 70 points you'll make on x10

    Feel free to add my reputation by clicking on the if you found my post helpful to you :P


    If I am not responding to your PMs, that means I am ignoring you. Take a hint.



    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0


  3. #3
    thezone1 is offline x10 Sophmore thezone1 is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    192

    Re: Php Help please

    I have version 5.2.4 on my local network and cannot change it as far as the hosting version is concerned i see no point in changing it lol ;) since i'm testing on my local network....

  4. #4
    Slothie's Avatar
    Slothie is offline Lord Of The Keys Slothie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Singapore
    Posts
    1,432

    Re: Php Help please

    Since you're on windows, you have to specify a smtp server in your php.ini

    It should be in \windows\php.ini

    Easiest 70 points you'll make on x10

    Feel free to add my reputation by clicking on the if you found my post helpful to you :P


    If I am not responding to your PMs, that means I am ignoring you. Take a hint.



    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0


  5. #5
    thezone1 is offline x10 Sophmore thezone1 is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    192

    Re: Php Help please

    i know and i set it to my hosting accounts outgoin mail server but i still get the error for some reason might it be the port?? or is their a way i can do a custom from header for that code ???

    thanks in advance

  6. #6
    Thewinator is offline x10 Lieutenant Thewinator is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    [NL]
    Posts
    256

    Re: Php Help please

    As far as I can tell: '"sendmail_from" not set'
    Its not set at all. Make sure to restart your webserver after changing settings.



  7. #7
    thezone1 is offline x10 Sophmore thezone1 is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    192

    Re: Php Help please

    thanks for your reply, i have set it here are the settings

    [mail function]
    ; For Win32 only.
    SMTP = mail.thezone.x10hosting.com
    smtp_port = 25

    ;For Win32 only.
    sendmail_from = 'admin@thezone.x10hosting.com' (i have tried this without quotes)

    is there some way i have to set this other than this ???
    this one is really givin me a headache now lol (im actualy considering givin up)

    Again thanks for all replys

  8. #8
    Thewinator is offline x10 Lieutenant Thewinator is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    [NL]
    Posts
    256

    Re: Php Help please

    try phpinfo();
    to check if the settings are actualy working.
    otherwise you might be looking at the wrong ini file?



  9. #9
    nakg0d is offline x10Hosting Member nakg0d is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    USA
    Posts
    70

    Re: Php Help please

    there are several php.ini files with some PHP installations, such as xampp.

    i had some trouble configuring the cURL library locally some months ago, but i realized that i was editing the incorrect settings file
    I love PHP. :cool:

  10. #10
    thezone1 is offline x10 Sophmore thezone1 is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    192

    Re: Php Help please

    gez lol so how do i find out where the right file is ??

    i realli do hope php gets easier lol

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. tons of PHP Resources
    By Chris S in forum Scripts & 3rd Party Apps
    Replies: 10
    Last Post: 01-16-2009, 10:07 AM
  2. Unstand PHP?
    By o0slowpaul0o in forum Tutorials
    Replies: 8
    Last Post: 01-07-2008, 09:16 PM
  3. Sigo con problemas con phpbb2
    By reciecho in forum Soporte
    Replies: 7
    Last Post: 10-20-2007, 06:28 PM
  4. "PHP Startup: Invalid Library" - Interesting error
    By javaguy78 in forum Free Hosting
    Replies: 5
    Last Post: 03-27-2007, 02:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers