YoHost Home
Sign Up
Linux Hosting
Linux Hosting Plans
Linux Control Panel Demo
Reseller Information
Linux FAQ
Windows Hosting
Frequently Asked Questions
Pre-Sales FAQ
Linux Hosting FAQ
Windows Hosting FAQ
Support

YoHost Linux Hosting FAQ: PHP
(Updated for our new server, May 2009)

What version of PHP is running?

  Click here for complete details.

What is the path to SendMail?

  /usr/sbin/sendmail

Do PHP scripts run under my own username?

  Yes, (effective May 2009) the server is configured with suPHP so that scripts run under your own username. This eliminates almost all issues related to permissions or file ownership.

How can I configure the Return-path of email I send via PHP?

  It is a good idea to configure the Return-path in order to make sure you receive notification of any bounced mail, and also to eliminate the "on behalf of" notice that may appear in Outlook.

One way to configure Return-path is to use the fifth paramater of the mail() function, for example:

    $Sender = 'sender@senderdomain.com';
    mail ( 'recipient@somedomain.com', 'Hello', 'Message Content', "From:$Sender", "-f$Sender" );

Another way is to configure the sendmail_path setting in a custom php.ini file in your public_html directory, for example

    sendmail_path = "/usr/sbin/sendmail -t -i -f sender@senderdomain.com"

Note, on Linux you cannot use the sendmail_from setting nor can you use ini_set() to control sendmail_path.

Is there anything else I should know about using PHP to send email?

  Yes. First of all, keep in mind that we do not allow our customers to send unsolicited bulk mail (spam).

I require a special installation of PHP, or I need specific settings in php.ini. Can you help?

  Yes, you can use the MultiPHP INI Editor in CPanel to adjust the settings.

Copyright © 2002-2024 YoHost.com
terms   privacy   contact