Results 1 to 4 of 4

Thread: how to customize php.ini or alternative way to send an email?

  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    1

    Default how to customize php.ini or alternative way to send an email?

    Hi,

    In our application(PHP), we have to send an email, but after uploading the application on cPanel, when we try to send the email we get an error as follows:

    SMTP -> ERROR: Failed to connect to server: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (0)
    SMTP Error: Could not connect to SMTP host.

    For this we have to make a small change in php.ini. We are not able to customize php.ini.

    Can somebody please provide us with directions on how to proceed with this? Or may be an alternative by which we can send email through the application without having to make changes to php.ini.

    Thank You.

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Oct 2008
    Posts
    49

    Default

    Hi;

    Editing the php.ini on the server depends on how you have compiled PHP/Apache on the server. If you are running php as an apache module (DSO) then php.ini won't work (customized) and php parameters need to be changed in .htaccess file inside the particular account.

    However if you are running Suphp on the server then you can customize the php.ini directly after copying it inside the particular account.
    JaguarPC
    jaguarpc.com

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jul 2005
    Location
    New Jersey, USA
    Posts
    395

    Default

    You can first try editing the server wide php.ini at /usr/local/lib/php.ini

  4. #4
    BANNED
    Join Date
    Jun 2005
    Posts
    2,023

    Lightbulb

    Quote Originally Posted by JPC-Shaun View Post
    However if you are running Suphp on the server then you can customize the php.ini directly after copying it inside the particular account.
    Actually what you describe is for phpSuExec which is an older method
    of CGI owner based execution of PHP scripts that parsed PHP.INI files
    automatically from the user's account.

    SuPHP does have a provision for custom PHP.INI but it need not be
    in the user's account and could be wherever the administrator chooses
    based upon the directive added to the user's account configuration.

    The third method of PHP setting customization is that of .HTACCESS
    and Apache directives in httpd.conf which was the common method
    for PHP running as a DSO (Apache module).

    Although limited in use, the forth method of PHP setting changes is
    by the use of "ini_set()" within the PHP scripts themselves.

Similar Threads

  1. (php run in what mode the following, the user can customize your php.ini)
    By liang3391 in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 03-17-2010, 12:55 AM
  2. php.ini and override default php.ini
    By areh in forum cPanel & WHM Discussions
    Replies: 6
    Last Post: 08-24-2009, 05:45 PM
  3. Send Email From PHP Using SMTP Authentication (Guide)
    By WhmSonic in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 10-23-2008, 10:43 AM
  4. PHP email - not able to send externally
    By zerokarma in forum cPanel & WHM Discussions
    Replies: 10
    Last Post: 10-16-2008, 02:48 PM
  5. Customize email CPanel send
    By birkoss in forum E-mail Discussions
    Replies: 2
    Last Post: 03-12-2005, 04:21 PM