1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

is PHP support PEAR?

Discussion in 'Plesk 9.x for Windows Issue, Fixes, How-To' started by Helen Pang, Sep 6, 2010.

  1. Helen Pang

    Helen Pang Basic Pleskian

    18
    85%
    Joined:
    Jun 23, 2010
    Messages:
    55
    Likes Received:
    0
    Hi,

    May I know if PHP in Plesk Windows support PEAR? I checked in phpinfo(), i saw this:

    include_path .;./includes;./pear .;./includes;./pear

    But when i enter below code

    <?php
    require_once 'System.php';
    var_dump(class_exists('System'));
    ?>

    It shows:
    Warning: require_once(System.php) [function.require-once]: failed to open stream: No such file or directory in D:\inetpub\vhosts\oxy.com.my\httpdocs\php\mailtest.php on line 2

    Fatal error: require_once() [function.require]: Failed opening required 'System.php' (include_path='.;./includes;./pear') in D:\inetpub\vhosts\oxy.com.my\httpdocs\php\mailtest.php on line 2

    I read from another forum, they advice to change the path in php.ini. My current config in php.ini is:

    ; Windows: "\path1;\path2"
    ;include_path = ".;c:\php\includes"
    include_path = ".;./includes;./pear"

    Please advice.

    Thanks.
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,576
    Likes Received:
    1,244
    Location:
    Novosibirsk, Russia
  3. Helen Pang

    Helen Pang Basic Pleskian

    18
    85%
    Joined:
    Jun 23, 2010
    Messages:
    55
    Likes Received:
    0
    other than PEAR, what else can customer use to send out email using PHP script? They tried to use mail() but failed, is it blocked in Plesk?
     
  4. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,576
    Likes Received:
    1,244
    Location:
    Novosibirsk, Russia
    PHP mail() function should work without any problems. Make sure that php.ini has SMTP host as localhost.
    And test it using the following sample script,

     
  5. Helen Pang

    Helen Pang Basic Pleskian

    18
    85%
    Joined:
    Jun 23, 2010
    Messages:
    55
    Likes Received:
    0
    I've checked the php.ini, it shows

    [mail function]
    ; For Win32 only.
    SMTP = localhost
    smtp_port = 25

    but when i tested it with the script you given, it shows:

    Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:\inetpub\vhosts\domain.com\httpdocs\php\mailtest.php on line 2

    please help.

    Thanks.
     
  6. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,576
    Likes Received:
    1,244
    Location:
    Novosibirsk, Russia
    Do you have opened port 25 on your Plesk server? Try to check it with

    telnet localhost 25

    If you have SMTP server started outside your Plesk server - specify it in php.ini instead localhost.
     
Loading...