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 install a custom php.ini in your public_html directory, or in the root directory of any subdomain. Contact support if you want us to provide a template for you to edit.

If you have a subdirectory that requires different settings than your main directory, you can place separate php.ini in that directory. You will also need to include an .htaccess file containing this directive: suPHP_ConfigPath /home/username/public_html/path/to/subdirectory

Copyright © 2002-2017 YoHost.com
terms   privacy   contact